From b06990293397d4b6d0374097f09d1cc5679216e3 Mon Sep 17 00:00:00 2001 From: hybrid Date: Thu, 11 Jun 2026 19:55:04 +0300 Subject: init --- Common/Functions/Common_ChangeSideSupply.sqf | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Common/Functions/Common_ChangeSideSupply.sqf (limited to 'Common/Functions/Common_ChangeSideSupply.sqf') diff --git a/Common/Functions/Common_ChangeSideSupply.sqf b/Common/Functions/Common_ChangeSideSupply.sqf new file mode 100644 index 0000000..6bcdc91 --- /dev/null +++ b/Common/Functions/Common_ChangeSideSupply.sqf @@ -0,0 +1,11 @@ +Private ['_amount','_change','_currentSupply','_side']; + +_side = _this select 0; +_amount = _this select 1; + +_currentSupply = (_side) Call GetSideSupply; +if (isNil '_currentSupply') then {_currentSupply = 0}; +_change = _currentSupply + _amount; +if (_change < 0) then {_change = _currentSupply - _amount}; + +WF_Logic setVariable [Format["%1Supplies",_side],_change,true]; \ No newline at end of file -- cgit v1.3.1