2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2016-01-23 23:45:59 +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:
|
2020-04-25 06:41:45 +00:00
|
|
|
* [bob, "weapon"] call ace_trenches_fnc_handlePlayerInventoryChanged
|
2017-06-08 13:31:51 +00:00
|
|
|
*
|
2016-01-23 23:45:59 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_unit"];
|
|
|
|
|
2016-02-04 20:42:12 +00:00
|
|
|
if (_unit getVariable [QGVAR(isPlacing), false]) then {
|
2018-09-17 19:03:28 +00:00
|
|
|
if !("ACE_EntrenchingTool" in (_unit call EFUNC(common,uniqueItems))) then {
|
2016-02-04 20:42:12 +00:00
|
|
|
[_unit] call FUNC(placeCancel);
|
2016-01-23 23:45:59 +00:00
|
|
|
};
|
|
|
|
};
|