2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2016-01-23 23:45:59 +00:00
|
|
|
/*
|
|
|
|
* Author: Ruthberg, commy2, esteldunedain
|
2017-03-15 15:11:37 +00:00
|
|
|
* Checks if a unit can dig a trench.
|
2016-01-23 23:45:59 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Can dig <BOOL>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [ACE_player] call ace_trenches_fnc_canDigTrench
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2016-03-22 07:10:37 +00:00
|
|
|
params ["_unit"];
|
2016-01-23 23:45:59 +00:00
|
|
|
|
2022-09-04 22:21:29 +00:00
|
|
|
if !(_unit call FUNC(hasEntrenchingTool)) exitWith {false};
|
2016-01-23 23:45:59 +00:00
|
|
|
|
2017-03-15 15:11:37 +00:00
|
|
|
_unit call EFUNC(common,canDig)
|