From fd8d1722aa26ced08ffb95019879be9d2e2ce524 Mon Sep 17 00:00:00 2001 From: Jonah Pool Date: Sat, 2 Mar 2024 17:56:36 -0500 Subject: [PATCH] Added a unified resupply module (#1143) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Broström.A | Evul --- cScripts/CfgFunctions.hpp | 4 +- .../functions/init/fn_init_zenModuels.sqf | 7 - .../logistics/fn_doStarterCrateSupplies.sqf | 10 +- .../functions/logistics/fn_doSupplyCrate.sqf | 55 +++++--- .../functions/mission/fn_doSupplyCrate.sqf | 128 ------------------ .../fn_zenModule_createSupplyCrate.sqf | 44 +++--- .../vehicle/fn_vehicle_addInventory.sqf | 58 ++++---- cScripts/script_macros.hpp | 4 +- 8 files changed, 101 insertions(+), 209 deletions(-) delete mode 100644 cScripts/functions/mission/fn_doSupplyCrate.sqf diff --git a/cScripts/CfgFunctions.hpp b/cScripts/CfgFunctions.hpp index c55fd33e6..75b0e02aa 100644 --- a/cScripts/CfgFunctions.hpp +++ b/cScripts/CfgFunctions.hpp @@ -45,6 +45,7 @@ class cScripts { class doStarterCrateSupplies {}; class doFieldHospital {}; + class doSupplyCrate {}; class doEmptyCrate {}; @@ -102,7 +103,6 @@ class cScripts { class addStagingZone {}; class doStarterCrate {}; - class doSupplyCrate {}; class makeAgent {}; }; @@ -202,8 +202,6 @@ class cScripts { file = "cScripts\functions\modules"; class zenModule_EnableUnitSimulation {}; - class zenModule_CreateFieldHospital {}; - class zenModule_CreateMedicalCrate {}; class zenModule_CreateStarterCrate {}; class zenModule_CreateSupplyCrate {}; diff --git a/cScripts/functions/init/fn_init_zenModuels.sqf b/cScripts/functions/init/fn_init_zenModuels.sqf index c9c27e2f4..2a8e61ade 100644 --- a/cScripts/functions/init/fn_init_zenModuels.sqf +++ b/cScripts/functions/init/fn_init_zenModuels.sqf @@ -64,13 +64,6 @@ INFO("init", "Initializing custom Zen Modules."); "\A3\ui_f\data\map\vehicleicons\iconCrate_ca.paa" ] call zen_custom_modules_fnc_register; -["7Cav Logistics", "Spawn Medical Crate", - { - params ["_modulePos", "_objectPos"]; - [_modulePos, _objectPos] call EFUNC(zenModule,CreateMedicalCrate); - }, - "\z\ACE\addons\medical_gui\ui\cross.paa" -] call zen_custom_modules_fnc_register; ["7Cav Utilities", "Apply Loadout", { diff --git a/cScripts/functions/logistics/fn_doStarterCrateSupplies.sqf b/cScripts/functions/logistics/fn_doStarterCrateSupplies.sqf index f454aa882..f4d82f2ad 100644 --- a/cScripts/functions/logistics/fn_doStarterCrateSupplies.sqf +++ b/cScripts/functions/logistics/fn_doStarterCrateSupplies.sqf @@ -43,22 +43,22 @@ private _container = switch (_companySelector) do { case "TITAN"; case "RAIDER"; case "SPARROW"; - case "ALPHA": {GET_CONTAINER(alpha_company);}; + case "ALPHA": {GET_CONTAINER("alpha_company");}; - case "ATLAS": {GET_CONTAINER(bravo_company_atlas);}; + case "ATLAS": {GET_CONTAINER("bravo_company_atlas");}; case "SABER"; case "VIKING"; - case "BRAVO": {GET_CONTAINER(bravo_company_viking);}; + case "BRAVO": {GET_CONTAINER("bravo_company_viking");}; case "BANDIT"; case "MISFIT"; - case "CHARLIE": {GET_CONTAINER(charlie_company);}; + case "CHARLIE": {GET_CONTAINER("charlie_company");}; case "FULL"; case "ALL": { private _fullContainer = []; { - private _items = _x call EFUNC(logistics,getContainer); + private _items = GET_CONTAINER(_x); _fullContainer append _items; } forEach ["alpha_company", "bravo_company_atlas", "bravo_company_viking", "charlie_company"]; }; diff --git a/cScripts/functions/logistics/fn_doSupplyCrate.sqf b/cScripts/functions/logistics/fn_doSupplyCrate.sqf index 16f8ccbae..04ae8aee1 100644 --- a/cScripts/functions/logistics/fn_doSupplyCrate.sqf +++ b/cScripts/functions/logistics/fn_doSupplyCrate.sqf @@ -1,40 +1,58 @@ #include "..\script_component.hpp"; /* - * Author: CPL.Brostrom.A + * Author: CPL.Brostrom.A, J.Turn * This populats a given object with items. * Use for mission resupplies. * * Arguments: - * 0: Crate - * 1: Scale cargo ammount (Default: 1) + * 0: Module Position (Default: [0.0,0.0,0.0]) + * 1: Crate Type (Default: "crate_resupply_general") * * Example: - * [this,0.5] call cScripts_fnc_doSupplyCrate; - * [this,1] call cScripts_fnc_doSupplyCrate; + * [[0.0,0.0,0.0],"crate_resupply_general"] call cScripts_fnc_doSupplyCrate; + * [[0.0,0.0,0.0],"crate_medicalAtlas"] call cScripts_fnc_doSupplyCrate; */ if (!isServer) exitWith {}; -params [["_crate", objNull, [objNull]]]; +params [ + ["_modulePos", [0.0,0.0,0.0], [[0.0,0.0,0.0]]], + ["_crateType","crate_resupply_general",[""]] +]; + +// Crate model changes based on container of the crate +private _crateModel = ""; -clearWeaponCargoGlobal _crate; -clearMagazineCargoGlobal _crate; -clearItemCargoGlobal _crate; -clearBackpackCargoGlobal _crate; +switch (_crateType) do { + case "crate_medicalAtlas"; + case "crate_medicalInfantry": { + _crateModel = "ace_medicalSupplyCrate"; + }; + case "crate_stinger": { + _crateModel = "Box_NATO_WpsLaunch_F"; + }; + default { + _crateModel = "Box_NATO_Equip_F"; + }; +}; + +// Create crate at module position +INFO_2("Logistics", "Spawning %1 on %2", _crateType, _modulePos); +private _crate = _crateModel createVehicle _modulePos; // Add items from logistics database entry if (isServer) then { [{!isNil{EGVAR(DATABASE,DONE)} && EGVAR(DATABASE,DONE);}, { - _this params ["_crate"]; - private _container = GET_CONTAINER(crate_resupply_general); + _this params ["_crate","_crateType"]; + private _container = GET_CONTAINER(_crateType); [_crate, _container] call FUNC(addCargo); -}, [_crate, _quickSelectScale]] call CBA_fnc_waitUntilAndExecute; +}, [_crate, _crateType]] call CBA_fnc_waitUntilAndExecute; }; -// Change ace logistics size of crate -[_crate, 1] remoteExec ["ace_cargo_fnc_setSize",0,true]; -[_crate, true] remoteExec ["ace_dragging_fnc_setDraggable",0,true]; -[_crate, true] remoteExec ["ace_dragging_fnc_setCarryable",0,true]; +// Change ace characteristics of crate +[_crate, 1] call ace_cargo_fnc_setSize; +[_crate, true] call ace_dragging_fnc_setDraggable; +[_crate, true] call ace_dragging_fnc_setCarryable; // If a correct classname add texture private _smallBox = [ @@ -70,3 +88,6 @@ if (typeOf _crate in _smallBox) then { if (typeOf _crate in _largeBox) then { _crate setObjectTextureGlobal [1, "\z\cav\addons\supplies\data\Ammobox_7CAV_co.paa"]; }; + +// Add object to the curator for all Zeuses +_crate call ace_zeus_fnc_addObjectToCurator; diff --git a/cScripts/functions/mission/fn_doSupplyCrate.sqf b/cScripts/functions/mission/fn_doSupplyCrate.sqf deleted file mode 100644 index c0ab11889..000000000 --- a/cScripts/functions/mission/fn_doSupplyCrate.sqf +++ /dev/null @@ -1,128 +0,0 @@ -#include "..\script_component.hpp"; -/* - * Author: CPL.Brostrom.A - * This populats a given object with items. - * Use for mission resupplies. - * - * Arguments: - * 0: Crate - * 1: Scale cargo ammount (Default: 1) - * - * Example: - * [this,0.5] call cScripts_fnc_doSupplyCrate; - * [this,1] call cScripts_fnc_doSupplyCrate; - */ - -if (!isServer) exitWith {}; - -params [["_crate", objNull, [objNull]]]; - -private _quaScale = 1; - -clearweaponcargoGlobal _crate; -clearmagazinecargoGlobal _crate; -clearitemcargoGlobal _crate; -clearbackpackcargoGlobal _crate; - -//================== RADIOS ==================\\ - -//================== WEAPONS ==================\\ - -_crate addWeaponCargoGlobal ["rhs_weap_M136_hedp", (_quaScale * 8)]; - -//================== AMMO ==================\\ - -_crate addMagazineCargoGlobal ["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tracer_Red", (_quaScale * 50)]; -_crate addMagazineCargoGlobal ["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tracer_Red", (_quaScale * 20)]; -_crate addMagazineCargoGlobal ["rhsusf_200rnd_556x45_mixed_soft_pouch", (_quaScale * 15)]; -_crate addMagazineCargoGlobal ["rhsusf_100Rnd_762x51_m62_tracer", (_quaScale * 15)]; -_crate addMagazineCargoGlobal ["MRAWS_HEAT_F",4]; -_crate addMagazineCargoGlobal ["MRAWS_HE_F",4]; -_crate addMagazineCargoGlobal ["NDS_M_6Rnd_60mm_HE_0",5]; -_crate addMagazineCargoGlobal ["NDS_M_6Rnd_60mm_HE",5]; -_crate addMagazineCargoGlobal ["NDS_M_6Rnd_60mm_SMOKE",2]; -_crate addMagazineCargoGlobal ["NDS_M_6Rnd_60mm_ILLUM",2]; -_crate addMagazineCargoGlobal ["rhs_fgm148_magazine_AT", (_quaScale * 3)]; -_crate addMagazineCargoGlobal ["rhs_fim92_mag", (_quaScale * 3)]; - -//================== GRENADES ==================\\ - -_crate addMagazineCargoGlobal ["HandGrenade", (_quaScale * 20)]; -_crate addMagazineCargoGlobal ["SmokeShell", (_quaScale * 30)]; -_crate addMagazineCargoGlobal ["SmokeShellRed", (_quaScale * 10)]; -_crate addMagazineCargoGlobal ["SmokeShellBlue", (_quaScale * 10)]; -_crate addMagazineCargoGlobal ["ACE_M84", (_quaScale * 10)]; -_crate addMagazineCargoGlobal ["rhs_mag_M433_HEDP", (_quaScale * 40)]; -_crate addMagazineCargoGlobal ["rhs_mag_m714_White", (_quaScale * 20)]; -_crate addMagazineCargoGlobal ["ACE_HUNTIR_M203", (_quaScale * 5)]; -_crate addMagazineCargoGlobal ["ACE_40mm_Flare_white", (_quaScale * 10)]; -_crate addMagazineCargoGlobal ["ACE_40mm_Flare_IR", (_quaScale * 10)]; -_crate addMagazineCargoGlobal ["ACE_Chemlight_HiRed", (_quaScale * 15)]; -_crate addMagazineCargoGlobal ["ACE_Chemlight_HiBlue", (_quaScale * 15)]; -_crate addMagazineCargoGlobal ["ACE_Chemlight_IR", (_quaScale * 15)]; - -//================== EXPLOSIVES ==================\\ - -_crate addMagazineCargoGlobal ["SatchelCharge_Remote_Mag", (_quaScale * 2)]; -_crate addMagazineCargoGlobal ["DemoCharge_Remote_Mag", (_quaScale * 4)]; - -//================== ITEMS ==================\\ - -//_crate addItemCargoGlobal ["ACE_WaterBottle", (_quaScale * 50)]; -//_crate addItemCargoGlobal ["ACE_MRE_BeefStew", (_quaScale * 10)]; -//_crate addItemCargoGlobal ["ACE_MRE_ChickenTikkaMasala", (_quaScale * 10)]; -//_crate addItemCargoGlobal ["ACE_MRE_ChickenHerbDumplings", (_quaScale * 10)]; -//_crate addItemCargoGlobal ["ACE_MRE_CreamChickenSoup", (_quaScale * 10)]; -//_crate addItemCargoGlobal ["ACE_MRE_CreamTomatoSoup", (_quaScale * 10)]; -//_crate addItemCargoGlobal ["ACE_MRE_LambCurry", (_quaScale * 10)]; -//_crate addItemCargoGlobal ["ACE_MRE_MeatballsPasta", (_quaScale * 10)]; -//_crate addItemCargoGlobal ["ACE_MRE_SteakVegetables", (_quaScale * 10)]; -//_crate addItemCargoGlobal ["ACE_Chemlight_Shield", (_quaScale * 5)]; - -//================== MEDICAL ==================\\ - -_crate addItemCargoGlobal ["ACE_EarPlugs", (_quaScale * 3)]; -_crate addItemCargoGlobal ["ACE_quikclot", (_quaScale * 80)]; -_crate addItemCargoGlobal ["ACE_tourniquet", (_quaScale * 15)]; - -//================== BACKPACKS ==================\\ - -// Change ace logistics size of crate -[_crate, 1] remoteExec ["ace_cargo_fnc_setSize",0,true]; -[_crate, true] remoteExec ["ace_dragging_fnc_setDraggable",0,true]; -[_crate, true] remoteExec ["ace_dragging_fnc_setCarryable",0,true]; - -// If a correct classname add texture -private _smallBox = [ - "Box_T_East_Ammo_F", - "Box_East_Ammo_F", - "Box_NATO_Ammo_F", - - "Box_T_East_WpsSpecial_F", - "Box_East_WpsSpecial_F", - "Box_T_NATO_WpsSpecial_F", - "Box_NATO_WpsSpecial_F", - - "Box_East_AmmoOrd_F", - "Box_NATO_AmmoOrd_F", - - "Box_T_East_Wps_F", - "Box_East_Wps_F", - "Box_T_NATO_Wps_F", - "Box_NATO_Wps_F", - - "Box_East_Grenades_F", - "Box_NATO_Grenades_F", - - "Box_East_WpsLaunch_F", - "Box_NATO_WpsLaunch_F" -]; -private _largeBox = [ - "B_CargoNet_01_ammo_F" -]; -if (typeOf _crate in _smallBox) then { - _crate setObjectTextureGlobal [0, "\z\cav\addons\supplies\data\Ammobox_7CAV_co.paa"]; -}; -if (typeOf _crate in _largeBox) then { - _crate setObjectTextureGlobal [1, "\z\cav\addons\supplies\data\Ammobox_7CAV_co.paa"]; -}; diff --git a/cScripts/functions/modules/fn_zenModule_createSupplyCrate.sqf b/cScripts/functions/modules/fn_zenModule_createSupplyCrate.sqf index 144f00a14..1737f84e7 100644 --- a/cScripts/functions/modules/fn_zenModule_createSupplyCrate.sqf +++ b/cScripts/functions/modules/fn_zenModule_createSupplyCrate.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp"; /* - * Author: CPL.Brostrom.A + * Author: CPL.Brostrom.A, J.Turn * This module function spawn a supply crate. * * Arguments: @@ -14,31 +14,39 @@ */ params ["_modulePos", "_objectPos"]; +// The crate type that will be passed to the supply crate spawner. +private _crateTypeList = [ + 'crate_resupply_general', + 'crate_medicalAtlas', + 'crate_medicalInfantry', + 'crate_stinger' +]; +// Display text for the crate list selection. This is what the zeus sees. +private _displayTextList = [ - "7th Cavalry Supply Crate", + ['Infantry Resupply', "Contains weapons, ammo, and supplies for one infantry platoon"], + ['Atlas Team', "Contains enough supplies to sustain two Atlas teams as well supplementing one infantry platoon."], + ['Infantry Medical', "Contains enough medical supplies for one infantry platoon."], + ['Stinger MANPAD', "Contains 1 launcher and 2 missiles."] +]; +[ + "7th Cavalry Supply Crates", [ - ["SLIDER:PERCENT", ["Supply size", "Regulate the total amount of supplies in the crate"], [0, 1, 1], false] + ["LIST", ["Crate Type", "Select the type of unit you are supplying with this crate"], + [ + _crateTypeList, + _displayTextList, + 0, + 4 + ], false] ], { params ["_arg", "_pos"]; - _arg params ["_size"]; + _arg params ["_crateType"]; _pos params ["_modulePos"]; - - private _crate = "Box_NATO_Equip_F" createVehicle _modulePos; - [_crate, _size] remoteExec [QFUNC(doSupplyCrate), 0, true]; - - - // Change ace characteristics of crate - [_crate, 1] call ace_cargo_fnc_setSize; - [_crate, true] call ace_dragging_fnc_setDraggable; - [_crate, true] call ace_dragging_fnc_setCarryable; - - // Add object to Zeus - [{ - _this call ace_zeus_fnc_addObjectToCurator; - }, _crate] call CBA_fnc_execNextFrame; + [_modulePos, _crateType] remoteExec [QFUNC(doSupplyCrate), 2, false]; }, {}, [_modulePos] diff --git a/cScripts/functions/vehicle/fn_vehicle_addInventory.sqf b/cScripts/functions/vehicle/fn_vehicle_addInventory.sqf index 0b4fa37c7..6b6c67cbc 100644 --- a/cScripts/functions/vehicle/fn_vehicle_addInventory.sqf +++ b/cScripts/functions/vehicle/fn_vehicle_addInventory.sqf @@ -56,23 +56,23 @@ if (_vehicle iskindOf "I_APC_Wheeled_03_cannon_F") then { case "cav_dragoon_WD_V4": { // Vehicle Inventory [_vehicle, - GET_CONTAINER(vehicle_strykerDragoon_V4) + GET_CONTAINER("vehicle_strykerDragoon_V4") ] call FUNC(addCargo); // Supply Crate ["Box_NATO_Equip_F", - GET_CONTAINER(crate_strykerDragoon_resupply), + GET_CONTAINER("crate_strykerDragoon_resupply"), _vehicle, nil, "Supply Crate" ] call FUNC(createCargoCrate); // 4x 60mm mortars with ammo ["Box_Syndicate_WpsLaunch_F", - GET_CONTAINER(crate_strykerDragoon_60mm), + GET_CONTAINER("crate_strykerDragoon_60mm"), _vehicle, nil, "4x 60mm mortars with ammo" ] call FUNC(createCargoCrate); // Ammo for 2x 82mm mortars - private _mortar_ammo_82mm = GET_CONTAINER(crate_strykerDragoon_82mm); + private _mortar_ammo_82mm = GET_CONTAINER("crate_strykerDragoon_82mm"); ["ACE_Box_82mm_Mo_Combo", _mortar_ammo_82mm, _vehicle, nil, "Ammo for 2x 82mm mortars" @@ -84,7 +84,7 @@ if (_vehicle iskindOf "I_APC_Wheeled_03_cannon_F") then { ] call FUNC(createCargoCrate); ["Box_NATO_WpsLaunch_F", - GET_CONTAINER(crate_stinger), + GET_CONTAINER("crate_stinger"), _vehicle, nil, "MANPAD" ] call FUNC(createCargoCrate); }; @@ -103,17 +103,17 @@ if (_vehicle iskindOf "I_APC_Wheeled_03_cannon_F") then { // Vehicle Inventory [_vehicle, - GET_CONTAINER(vehicle_strykerDragoon) + GET_CONTAINER("vehicle_strykerDragoon") ] call FUNC(addCargo); // Supply Crate ["Box_NATO_Equip_F", - GET_CONTAINER(crate_strykerDragoon_resupply), + GET_CONTAINER("crate_strykerDragoon_resupply"), _vehicle, nil, "Resupply Crate" ] call FUNC(createCargoCrate); ["Box_NATO_WpsLaunch_F", - GET_CONTAINER(crate_stinger), + GET_CONTAINER("crate_stinger"), _vehicle, nil, "MANPAD" ] call FUNC(createCargoCrate); }; @@ -124,11 +124,11 @@ if (_vehicle iskindOf "I_APC_Wheeled_03_cannon_F") then { case "cav_dragoon_Unarmed_D"; case "MED": { [_vehicle, - GET_CONTAINER(vehicle_medicalAtlas) + GET_CONTAINER("vehicle_medicalAtlas") ] call FUNC(addCargo); ["ace_medicalSupplyCrate", - GET_CONTAINER(crate_medicalAtlas), + GET_CONTAINER("crate_medicalAtlas"), _vehicle, nil, "Medical Supply Crate" ] call FUNC(createCargoCrate); }; @@ -137,17 +137,17 @@ if (_vehicle iskindOf "I_APC_Wheeled_03_cannon_F") then { default { // Vehicle Inventory [_vehicle, - GET_CONTAINER(vehicle_strykerDragoon) + GET_CONTAINER("vehicle_strykerDragoon") ] call FUNC(addCargo); // Supply Crate ["Box_NATO_Equip_F", - GET_CONTAINER(crate_strykerDragoon_resupply), + GET_CONTAINER("crate_strykerDragoon_resupply"), _vehicle, nil, "Resupply Crate" ] call FUNC(createCargoCrate); ["Box_NATO_WpsLaunch_F", - GET_CONTAINER(crate_stinger), + GET_CONTAINER("crate_stinger"), _vehicle, nil, "MANPAD" ] call FUNC(createCargoCrate); }; @@ -177,11 +177,11 @@ if (_vehicle iskindOf "MRAP_01_base_F") then { case "rhsusf_m998_w_2dr_fulltop"; case "MED": { [_vehicle, - GET_CONTAINER(vehicle_medicalAtlas) + GET_CONTAINER("vehicle_medicalAtlas") ] call FUNC(addCargo); ["ace_medicalSupplyCrate", - GET_CONTAINER(crate_medicalAtlas), + GET_CONTAINER("crate_medicalAtlas"), _vehicle ] call FUNC(createCargoCrate); }; @@ -190,12 +190,12 @@ if (_vehicle iskindOf "MRAP_01_base_F") then { case "rhsusf_m1165a1_gmv_m2_m240_socom_w"; case "rhsusf_m1165a1_gmv_mk19_m240_socom_w": { [_vehicle, - GET_CONTAINER(vehicle_HMMWV) + GET_CONTAINER("vehicle_HMMWV") ] call FUNC(addCargo); }; default { [_vehicle, - GET_CONTAINER(vehicle_HMMWV) + GET_CONTAINER("vehicle_HMMWV") ] call FUNC(addCargo); }; }; @@ -211,11 +211,11 @@ if (_vehicle iskindOf "Truck_01_base_F") then { case "rhsusf_M1230a1_usarmy_d"; case "MED": { [_vehicle, - GET_CONTAINER(vehicle_medicalAtlas) + GET_CONTAINER("vehicle_medicalAtlas") ] call FUNC(addCargo); ["ace_medicalSupplyCrate", - GET_CONTAINER(crate_medicalAtlas), + GET_CONTAINER("crate_medicalAtlas"), _vehicle ] call FUNC(createCargoCrate); }; @@ -237,17 +237,17 @@ if (_vehicle iskindOf "rhsusf_stryker_base") then { case "rhsusf_stryker_m1126_m2_wd"; case "MED": { [_vehicle, - GET_CONTAINER(vehicle_medicalAtlas) + GET_CONTAINER("vehicle_medicalAtlas") ] call FUNC(addCargo); ["ace_medicalSupplyCrate", - GET_CONTAINER(crate_medicalAtlas), + GET_CONTAINER("crate_medicalAtlas"), _vehicle ] call FUNC(createCargoCrate); }; default { [_vehicle, - GET_CONTAINER(vehicle_strykerDragoon) + GET_CONTAINER("vehicle_strykerDragoon") ] call FUNC(addCargo); }; }; @@ -258,7 +258,7 @@ if (_vehicle iskindOf "RHS_M2A2_Base") then { [_vehicle, 4, -1, false, false] call FUNC(setCargoAttributes); [_vehicle, - GET_CONTAINER(vehicle_bradley) + GET_CONTAINER("vehicle_bradley") ] call FUNC(addCargo); ["ACE_Track", _vehicle, true] call ace_cargo_fnc_loadItem; @@ -269,7 +269,7 @@ if (_vehicle iskindOf "rhsusf_m1a1tank_base") then { ["ACE_Track", _vehicle, true] call ace_cargo_fnc_loadItem; [_vehicle, - GET_CONTAINER(vehicle_bradley) + GET_CONTAINER("vehicle_bradley") ] call FUNC(addCargo); }; @@ -305,17 +305,17 @@ if (_vehicle iskindOf "Heli_Transport_01_base_F") then { case "RHS_UH60M_MEV"; case "MED": { [_vehicle, - GET_CONTAINER(vehicle_medicalAtlas) + GET_CONTAINER("vehicle_medicalAtlas") ] call FUNC(addCargo); ["ace_medicalSupplyCrate", - GET_CONTAINER(crate_medicalAtlas), + GET_CONTAINER("crate_medicalAtlas"), _vehicle ] call FUNC(createCargoCrate); }; default { [_vehicle, - GET_CONTAINER(vehicle_heliTransport) + GET_CONTAINER("vehicle_heliTransport") ] call FUNC(addCargo); }; }; @@ -323,7 +323,7 @@ if (_vehicle iskindOf "Heli_Transport_01_base_F") then { if (_vehicle iskindOf "Heli_Transport_02_base_F") then { [_vehicle, - GET_CONTAINER(vehicle_heliTransport) + GET_CONTAINER("vehicle_heliTransport") ] call FUNC(addCargo); }; @@ -335,7 +335,7 @@ if (_vehicle iskindOf "TF373_SOAR_MH47G_Base") then { if (_vehicle iskindOf "vtx_MH60M") then { [_vehicle, - GET_CONTAINER(vehicle_heliTransport) + GET_CONTAINER("vehicle_heliTransport") ] call FUNC(addCargo); }; diff --git a/cScripts/script_macros.hpp b/cScripts/script_macros.hpp index f3b674733..180011f71 100644 --- a/cScripts/script_macros.hpp +++ b/cScripts/script_macros.hpp @@ -56,8 +56,8 @@ #define FORMAT_8(STR,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) format[STR, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8] /* Logistics macros */ -#define GET_CONTAINER(BOX) [QUOTE(BOX)] call EFUNC(logistics,getContainer) -#define GET_CONTAINER_KEYS(BOX) [QUOTE(BOX),true] call EFUNC(logistics,getContainer) +#define GET_CONTAINER(BOX) [BOX] call EFUNC(logistics,getContainer) +#define GET_CONTAINER_KEYS(BOX) [BOX,true] call EFUNC(logistics,getContainer) /* LOGGING */