2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-09-26 01:16:55 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
* Handle the InventoryChanged event.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
* 1: Weapon <STRING>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [bob, "weapon"] call ace_sandbag_fnc_handlePlayerInventoryChanged
|
|
|
|
*
|
2015-09-26 01:16:55 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_unit"];
|
|
|
|
|
|
|
|
if (_unit getVariable [QGVAR(isDeploying), false]) then {
|
2018-09-17 19:03:28 +00:00
|
|
|
if !("ACE_Sandbag_empty" in (_unit call EFUNC(common,uniqueItems))) then {
|
2015-09-26 01:16:55 +00:00
|
|
|
[_unit] call FUNC(deployCancel);
|
|
|
|
};
|
|
|
|
};
|