Browse Source

Add deploy CCP interact

m3ales 4 years ago
parent
commit
6b8d7b3314

+ 6 - 1
addons - Copy/RD501_Main/XEH_postinit.sqf

@@ -46,4 +46,9 @@ rd501_flip_vehicle_validBackpacks = ["RD501_JLTS_Clone_Flip_backpack"];
 call macro_fnc_name(fortify_tool);
 
 // Medical CCP Building
-rd501_medical_ccp_building = "Land_Medevac_house_V1_F";
+rd501_medical_ccp_building = "Land_Medevac_house_V1_F";
+
+// Medical CCP Interaciton
+_action = ["rd501_medical_deploy_ccp", "Deploy CCP", "",  { _this call rd501_fnc_deployCcp }, {true}] call ace_interact_menu_fnc_createAction;
+["RD501_resuppy_box_platoon_medical_tent", 0, ["ACE_MainActions"], _action, true] call ace_interact_menu_fnc_addActionToClass;
+["RD501_resuppy_box_small_medical", 0, ["ACE_MainActions"], _action, true] call ace_interact_menu_fnc_addActionToClass;

+ 0 - 13
addons - Copy/RD501_Main/config.cpp

@@ -595,19 +595,6 @@ class CfgVehicles
 			};
 		};
 	};
-	class macro_new_vehicle(resuppy_box,platoon_medical_tent)
-	{
-		class ACE_Actions {
-			class ACE_MainActions {
-				class rd501_deploy_medical_ccp {
-					displayName = "Deploy CCP";
-					statement = "_this call rd501_fnc_deployCcp";
-					icon = "rd501_main\ui_icons\medical_emblem.paa";
-					exceptions[] = {};
-				};
-			};
-		};
-	};
 	class Tank : LandVehicle
 	{
 		class ACE_Actions {

+ 7 - 3
addons - Copy/RD501_Main/functions/medical_ccp/fnc_deployCcp.sqf

@@ -1,12 +1,16 @@
-params ["_target", "_player", "_params"];
-//_target is the box in an ace interact
+params [
+	["_target"], 
+	["_player"], 
+	["_params"]
+];
+
 _position = position _target;
 deleteVehicle _target;
 
 [
 	{
 		params["_position"];
-		systemChat format["Creating CCP at %1", _position];
+		systemChat format["Deploying CCP"];
 		_spawner = rd501_medical_ccp_building createVehicle _position;
 	},
 	[_position],

+ 0 - 7
addons - Copy/RD501_Vehicles/land/resupply_box/config.cpp

@@ -77,13 +77,6 @@ class CfgVehicles
 		editorSubcategory = macro_editor_cat(resupply)
 		class TransportItems{};
 		class EventHandlers :DefaultEventhandlers{};
-		class assembleInfo
-		{
-			dissasembleTo[]=
-			{
-				"Land_Medevac_house_V1_F";
-			};
-		};
 	};
 
 	class macro_new_vehicle(resuppy_box,platoon_ammo): plp_ct_HighSecContBlack