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:
|
|
|
|
* [bob, "weapon"] call ace_trenches_fnc_handlePlayerInverntoryChanged
|
|
|
|
*
|
2016-01-23 23:45:59 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
params ["_unit"];
|
|
|
|
|
2016-02-04 20:42:12 +00:00
|
|
|
if (_unit getVariable [QGVAR(isPlacing), false]) then {
|
2016-01-23 23:45:59 +00:00
|
|
|
if !("ACE_EntrenchingTool" in items _unit) then {
|
2016-02-04 20:42:12 +00:00
|
|
|
[_unit] call FUNC(placeCancel);
|
2016-01-23 23:45:59 +00:00
|
|
|
};
|
|
|
|
};
|