ソースを参照

Add refuel action, remove config action

m3ales 3 年 前
コミット
3498adfc46

+ 11 - 0
addons - Copy/RD501_Main/XEH_postinit.sqf

@@ -16,6 +16,17 @@ call macro_fnc_name(nightvision);
 
 // Drone Recharge
 RD501_DRONE_BATTERY = "RD501_r2_charge_pack_x10_mag";
+private _refuelAction = [
+	"RD501_Drone_Refuel", 
+	"Refuel Drone", 
+	"", 
+	rd501_fnc_refuelUAVDrone, 
+	rd501_fnc_canRefuel,[], 
+	{call ace_interaction_fnc_getVehiclePos}, 
+	4
+] call ACE_interact_menu_fnc_createAction;
+
+["RD501_Drone_Clone_Recon_Droid", 0, ["ACE_MainActions"], _refuelAction, true] call ACE_interact_menu_fnc_addActionToClass;
 
 //Force Walk
 RD501_FORCE_WALK_WEAPONS = [macro_quote(macro_new_weapon_nofam(z1000))];

+ 0 - 15
addons - Copy/RD501_Vehicles/air/drones/config.cpp

@@ -99,21 +99,6 @@ class CfgVehicles
         fuelCapacity = 90;
         fuelConsumptionRate = 1;
 		faction = macro_republic_faction;
-		class ACE_Actions {
-            distance = 4;
-            condition = macro_quote(true);
-            class ACE_MainActions {
-                condition = macro_quote(true);
-                class RD501_Drone_Refuel
-                {
-                    displayName = "Refuel Drone";
-                    distance = 4;
-                    condition = macro_quote([ARR_2(_player,_target)] call macro_fnc_name(canRefuel));
-                    statement = macro_quote([ARR_2(_player,_target)] call macro_fnc_name(refuelUAVDrone));
-                    position = macro_quote(call ace_interaction_fnc_getVehiclePos);
-                };
-            };
-        };
 		class assembleInfo
 		{
 			dissasembleTo[]=