2015-03-28 10:08:17 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
* Check if the unit can replace given wheel of the vehicle.
|
|
|
|
*
|
|
|
|
* Arguments:
|
2015-08-16 18:14:54 +00:00
|
|
|
* 0: Unit that does the repairing <OBJECT>
|
|
|
|
* 1: Vehicle to repair <OBJECT>
|
|
|
|
* 2: Selected hitpoint <STRING>
|
2015-03-28 10:08:17 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2015-08-16 18:14:54 +00:00
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [unit, vehicle, "hitpoint"] call ace_repair_fnc_canReplaceWheel
|
|
|
|
*
|
|
|
|
* Public: No
|
2015-03-28 10:08:17 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-09-26 04:36:35 +00:00
|
|
|
params ["_unit", "_target", "_hitPoint"];
|
|
|
|
TRACE_3("params",_unit,_target,_hitPoint);
|
2015-03-28 10:08:17 +00:00
|
|
|
|
2015-09-19 16:07:03 +00:00
|
|
|
if !([_unit, _target, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-28 10:08:17 +00:00
|
|
|
|
2015-09-26 04:36:35 +00:00
|
|
|
//check for GVAR(engineerSetting_Wheel) is handeled by requiredEngineer config
|
|
|
|
//check for a near wheel object is handled by claimObjects[] config
|
2015-04-22 19:01:22 +00:00
|
|
|
|
2015-09-26 04:36:35 +00:00
|
|
|
(_target getHitPointDamage _hitPoint >= 1)
|