2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-08-09 16:08:53 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
2015-08-16 19:39:42 +00:00
|
|
|
* Check if the unit can remove given wheel/track of the vehicle.
|
2015-08-09 16:08:53 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit that does the repairing <OBJECT>
|
2015-08-16 18:14:54 +00:00
|
|
|
* 1: Vehicle to repair <OBJECT>
|
2015-08-09 16:08:53 +00:00
|
|
|
* 2: Selected hitpoint <STRING>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2015-08-16 19:39:42 +00:00
|
|
|
* Can Remove <BOOL>
|
2015-08-16 18:14:54 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2015-08-16 19:39:42 +00:00
|
|
|
* [unit, vehicle, "hitpoint"] call ace_repair_fnc_canRemove
|
2015-08-16 18:14:54 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
2015-08-09 16:08:53 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_unit", "_target", "_hitPoint"];
|
|
|
|
TRACE_3("params",_unit,_target,_hitPoint);
|
|
|
|
|
2015-09-19 16:07:03 +00:00
|
|
|
if !([_unit, _target, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
|
|
|
|
2015-08-09 16:08:53 +00:00
|
|
|
alive _target && {_target getHitPointDamage _hitPoint < 1}
|