2023-09-12 18:58:10 +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 {
|
2022-09-04 22:21:29 +00:00
|
|
|
if !(_unit call FUNC(hasEntrenchingTool)) then {
|
2016-02-04 20:42:12 +00:00
|
|
|
[_unit] call FUNC(placeCancel);
|
2016-01-23 23:45:59 +00:00
|
|
|
};
|
|
|
|
};
|