Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cScripts/functions/logistics/fn_doStarterCrateSupplies.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ private _container = switch (_companySelector) do {
case "TITAN";
case "RAIDER";
case "SPARROW";
case "ALPHA": {["alpha_company"] call EFUNC(logistics,getContainer);};
case "ALPHA": {GET_CONTAINER(alpha_company);};

case "ATLAS": {["bravo_company_atlas"] call EFUNC(logistics,getContainer);};
case "ATLAS": {GET_CONTAINER(bravo_company_atlas);};
case "SABER";
case "VIKING";
case "BRAVO": {["bravo_company_viking"] call EFUNC(logistics,getContainer);};
case "BRAVO": {GET_CONTAINER(bravo_company_viking);};

case "BANDIT";
case "MISFIT";
case "CHARLIE": {["charlie_company"] call EFUNC(logistics,getContainer);};
case "CHARLIE": {GET_CONTAINER(charlie_company);};

case "FULL";
case "ALL": {
Expand Down
2 changes: 1 addition & 1 deletion cScripts/functions/logistics/fn_doSupplyCrate.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ clearBackpackCargoGlobal _crate;
if (isServer) then {
[{!isNil{EGVAR(DATABASE,DONE)} && EGVAR(DATABASE,DONE);}, {
_this params ["_crate"];
private _container = ["crate_resupply_general"] call EFUNC(logistics,getContainer);
private _container = GET_CONTAINER(crate_resupply_general);
[_crate, _container] call FUNC(addCargo);
}, [_crate, _quickSelectScale]] call CBA_fnc_waitUntilAndExecute;
};
Expand Down
28 changes: 14 additions & 14 deletions cScripts/functions/systems/fn_getArsenalWhitelist.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,32 @@ _unitItems = parseSimpleArray ("[" + _unitItems + "]");
_unitItems = _unitItems arrayIntersect _unitItems select {_x isEqualType "" && {_x != ""}};


private _commonGear = ["arsenal_common", true] call EFUNC(logistics,getContainer);
private _commonGear = GET_CONTAINER_KEYS(arsenal_common);


private _company = call FUNC(getCompanyVariable);
private _companyItems = switch (_company) do {
case "alpha": {["alpha_company", true] call EFUNC(logistics,getContainer);};
case "bravo": {["bravo_company", true] call EFUNC(logistics,getContainer);};
case "charlie": {["charlie_company", true] call EFUNC(logistics,getContainer);};
default {["arsenal_company_fallback", true] call EFUNC(logistics,getContainer);};
case "alpha": {GET_CONTAINER_KEYS(alpha_company);};
case "bravo": {GET_CONTAINER_KEYS(bravo_company);};
case "charlie": {GET_CONTAINER_KEYS(charlie_company);};
default {GET_CONTAINER_KEYS(arsenal_company_fallback);};
};


private _medicRole = getNumber (missionConfigFile >> "CfgLoadouts" >> _classname >> "abilityMedic");
private _medicGear = if (_medicRole >= 1) then {["bravo_company_atlas", true] call EFUNC(logistics,getContainer);} else {[]};
private _medicGear = if (_medicRole >= 1) then {GET_CONTAINER_KEYS(bravo_company_atlas);} else {[]};


private _roleSpecific = switch ([player] call EFUNC(gear,getLoadoutRole)) do {
case "officer": {["arsenal_role_officer", true] call EFUNC(logistics,getContainer);};
case "squadleader": {["arsenal_role_squadleader", true] call EFUNC(logistics,getContainer);};
case "fireteamleader": {["arsenal_role_fireteamleader", true] call EFUNC(logistics,getContainer);};
case "weapons": {["arsenal_role_weapons", true] call EFUNC(logistics,getContainer);};
case "officer": {GET_CONTAINER_KEYS(arsenal_role_officer);};
case "squadleader": {GET_CONTAINER_KEYS(arsenal_role_squadleader);};
case "fireteamleader": {GET_CONTAINER_KEYS(arsenal_role_fireteamleader);};
case "weapons": {GET_CONTAINER_KEYS(arsenal_role_weapons);};
case "pilot";
case "rotarypilot": {["arsenal_role_rotarypilot", true] call EFUNC(logistics,getContainer);};
case "rotarycrew": {["arsenal_role_pilotcrew", true] call EFUNC(logistics,getContainer);};
case "pilotfighter": {["arsenal_role_pilotfighter", true] call EFUNC(logistics,getContainer);};
case "pilottransport": {["arsenal_role_pilottransport", true] call EFUNC(logistics,getContainer);};
case "rotarypilot": {GET_CONTAINER_KEYS(arsenal_role_rotarypilot);};
case "rotarycrew": {GET_CONTAINER_KEYS(arsenal_role_pilotcrew);};
case "pilotfighter": {GET_CONTAINER_KEYS(arsenal_role_pilotfighter);};
case "pilottransport": {GET_CONTAINER_KEYS(arsenal_role_pilottransport);};
default {[]};
};

Expand Down
50 changes: 25 additions & 25 deletions cScripts/functions/vehicle/fn_vehicle_addInventory.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,23 @@ if (_vehicle iskindOf "I_APC_Wheeled_03_cannon_F") then {
case "cav_dragoon_WD_V4": {
// Vehicle Inventory
[_vehicle,
"vehicle_strykerDragoon_V4" call EFUNC(logistics,getContainer)
GET_CONTAINER(vehicle_strykerDragoon_V4)
] call FUNC(addCargo);

// Supply Crate
["Box_NATO_Equip_F",
"crate_strykerDragoon_resupply" call EFUNC(logistics,getContainer),
GET_CONTAINER(crate_strykerDragoon_resupply),
_vehicle, nil, "Supply Crate"
] call FUNC(createCargoCrate);

// 4x 60mm mortars with ammo
["Box_Syndicate_WpsLaunch_F",
"crate_strykerDragoon_60mm" call EFUNC(logistics,getContainer),
GET_CONTAINER(crate_strykerDragoon_60mm),
_vehicle, nil, "4x 60mm mortars with ammo"
] call FUNC(createCargoCrate);

// Ammo for 2x 82mm mortars
private _mortar_ammo_82mm = "crate_strykerDragoon_82mm" call EFUNC(logistics,getContainer);
private _mortar_ammo_82mm = GET_CONTAINER(crate_strykerDragoon_82mm);
["ACE_Box_82mm_Mo_Combo",
_mortar_ammo_82mm,
_vehicle, nil, "Ammo for 2x 82mm mortars"
Expand All @@ -93,12 +93,12 @@ if (_vehicle iskindOf "I_APC_Wheeled_03_cannon_F") then {

// Vehicle Inventory
[_vehicle,
"vehicle_strykerDragoon" call EFUNC(logistics,getContainer)
GET_CONTAINER(vehicle_strykerDragoon)
] call FUNC(addCargo);

// Supply Crate
["Box_NATO_Equip_F",
"crate_strykerDragoon_resupply" call EFUNC(logistics,getContainer),
GET_CONTAINER(crate_strykerDragoon_resupply),
_vehicle, nil, "Resupply Crate"
] call FUNC(createCargoCrate);
};
Expand All @@ -109,11 +109,11 @@ if (_vehicle iskindOf "I_APC_Wheeled_03_cannon_F") then {
case "cav_dragoon_Unarmed_D";
case "MED": {
[_vehicle,
["vehicle_medicalAtlas"] call EFUNC(logistics,getContainer)
GET_CONTAINER(vehicle_medicalAtlas)
] call FUNC(addCargo);

["ace_medicalSupplyCrate",
["crate_medicalAtlas"] call EFUNC(logistics,getContainer),
GET_CONTAINER(crate_medicalAtlas),
_vehicle, nil, "Medical Supply Crate"
] call FUNC(createCargoCrate);
};
Expand All @@ -122,12 +122,12 @@ if (_vehicle iskindOf "I_APC_Wheeled_03_cannon_F") then {
default {
// Vehicle Inventory
[_vehicle,
"vehicle_strykerDragoon" call EFUNC(logistics,getContainer)
GET_CONTAINER(vehicle_strykerDragoon)
] call FUNC(addCargo);

// Supply Crate
["Box_NATO_Equip_F",
"crate_strykerDragoon_resupply" call EFUNC(logistics,getContainer),
GET_CONTAINER(crate_strykerDragoon_resupply),
_vehicle, nil, "Resupply Crate"
] call FUNC(createCargoCrate);
};
Expand Down Expand Up @@ -158,11 +158,11 @@ if (_vehicle iskindOf "MRAP_01_base_F") then {
case "rhsusf_m998_w_2dr_fulltop";
case "MED": {
[_vehicle,
["vehicle_medicalAtlas"] call EFUNC(logistics,getContainer)
GET_CONTAINER(vehicle_medicalAtlas)
] call FUNC(addCargo);

["ace_medicalSupplyCrate",
["crate_medicalAtlas"] call EFUNC(logistics,getContainer),
GET_CONTAINER(crate_medicalAtlas),
_vehicle
] call FUNC(createCargoCrate);
};
Expand All @@ -171,12 +171,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,
"vehicle_HMMWV" call EFUNC(logistics,getContainer)
GET_CONTAINER(vehicle_HMMWV)
] call FUNC(addCargo);
};
default {
[_vehicle,
"vehicle_HMMWV" call EFUNC(logistics,getContainer)
GET_CONTAINER(vehicle_HMMWV)
] call FUNC(addCargo);
};
};
Expand All @@ -192,11 +192,11 @@ if (_vehicle iskindOf "Truck_01_base_F") then {
case "rhsusf_M1230a1_usarmy_d";
case "MED": {
[_vehicle,
["vehicle_medicalAtlas"] call EFUNC(logistics,getContainer)
GET_CONTAINER(vehicle_medicalAtlas)
] call FUNC(addCargo);

["ace_medicalSupplyCrate",
["crate_medicalAtlas"] call EFUNC(logistics,getContainer),
GET_CONTAINER(crate_medicalAtlas),
_vehicle
] call FUNC(createCargoCrate);
};
Expand All @@ -218,17 +218,17 @@ if (_vehicle iskindOf "rhsusf_stryker_base") then {
case "rhsusf_stryker_m1126_m2_wd";
case "MED": {
[_vehicle,
["vehicle_medicalAtlas"] call EFUNC(logistics,getContainer)
GET_CONTAINER(vehicle_medicalAtlas)
] call FUNC(addCargo);

["ace_medicalSupplyCrate",
["crate_medicalAtlas"] call EFUNC(logistics,getContainer),
GET_CONTAINER(crate_medicalAtlas),
_vehicle
] call FUNC(createCargoCrate);
};
default {
[_vehicle,
"vehicle_strykerDragoon" call EFUNC(logistics,getContainer)
GET_CONTAINER(vehicle_strykerDragoon)
] call FUNC(addCargo);
};
};
Expand All @@ -239,7 +239,7 @@ if (_vehicle iskindOf "RHS_M2A2_Base") then {
[_vehicle, 4, -1, false, false] call FUNC(setCargoAttributes);

[_vehicle,
"vehicle_bradley" call EFUNC(logistics,getContainer)
GET_CONTAINER(vehicle_bradley)
] call FUNC(addCargo);

["ACE_Track", _vehicle, true] call ace_cargo_fnc_loadItem;
Expand All @@ -250,7 +250,7 @@ if (_vehicle iskindOf "rhsusf_m1a1tank_base") then {
["ACE_Track", _vehicle, true] call ace_cargo_fnc_loadItem;

[_vehicle,
["vehicle_bradley"] call EFUNC(logistics,getContainer)
GET_CONTAINER(vehicle_bradley)
] call FUNC(addCargo);
};

Expand All @@ -266,25 +266,25 @@ if (_vehicle iskindOf "Heli_Transport_01_base_F") then {
case "RHS_UH60M_MEV";
case "MED": {
[_vehicle,
["vehicle_medicalAtlas"] call EFUNC(logistics,getContainer)
GET_CONTAINER(vehicle_medicalAtlas)
] call FUNC(addCargo);

["ace_medicalSupplyCrate",
["crate_medicalAtlas"] call EFUNC(logistics,getContainer),
GET_CONTAINER(crate_medicalAtlas),
_vehicle
] call FUNC(createCargoCrate);
};
default {
[_vehicle,
["vehicle_heliTransport"] call EFUNC(logistics,getContainer)
GET_CONTAINER(vehicle_heliTransport)
] call FUNC(addCargo);
};
};
};

if (_vehicle iskindOf "Heli_Transport_02_base_F") then {
[_vehicle,
["vehicle_heliTransport"] call EFUNC(logistics,getContainer)
GET_CONTAINER(vehicle_heliTransport)
] call FUNC(addCargo);
};

Expand Down
5 changes: 5 additions & 0 deletions cScripts/script_macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
#define FORMAT_7(STR,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) format[STR, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7]
#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)


/* LOGGING */
#define LOG_SYS(COMPONANT,MESSAGE,CHAT,SERVER) [MESSAGE,COMPONANT,CHAT,SERVER] call FUNC(log)
#define INFO_SYS(COMPONANT,MESSAGE,CHAT,SERVER) [MESSAGE,COMPONANT,CHAT,SERVER] call FUNC(info)
Expand Down