From 49fa0c39d2c5d477c5a25af7c218293f9b4077e1 Mon Sep 17 00:00:00 2001 From: IndigoFox Date: Sun, 28 Jan 2024 21:14:22 -0800 Subject: [PATCH] makes supply boxes ignore weight restrictions for drag and carry --- functions/client/fn_addZenModules.sqf | 6 ++++-- functions/resupply/fn_createBox.sqf | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/functions/client/fn_addZenModules.sqf b/functions/client/fn_addZenModules.sqf index f410814..ec7ca94 100644 --- a/functions/client/fn_addZenModules.sqf +++ b/functions/client/fn_addZenModules.sqf @@ -32,9 +32,11 @@ if ( !hasInterface ) exitWith {}; _args params ["_pos", "_target", "_keysSorted"]; - if ([_target, _typeOptionSelected, _pos] call milsim_fnc_createBox) then { - ["Resupply Box", format["Created a %1 box", _typeOptionSelected]] call BIS_fnc_curatorHint; + private _box = [_target, _typeOptionSelected, _pos] call milsim_fnc_createBox; + if (isNull _box) exitWith { + ["Resupply Box", "WARNING: Failed to locate or create box!"] call BIS_fnc_curatorHint; }; + ["Resupply Box", format["Created a %1 box", _typeOptionSelected]] call BIS_fnc_curatorHint; }, {}, [_pos, _target, _options] diff --git a/functions/resupply/fn_createBox.sqf b/functions/resupply/fn_createBox.sqf index 6bb8e57..0917746 100644 --- a/functions/resupply/fn_createBox.sqf +++ b/functions/resupply/fn_createBox.sqf @@ -96,4 +96,6 @@ clearWeaponCargoGlobal _box; [_box,1] call ace_cargo_fnc_setSize; -true; \ No newline at end of file +// ignore weight restrictions for carry/drag +_box setVariable ["ace_ignoreWeightCarry", true, true]; +_box; \ No newline at end of file