mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
4e93b9c72d
Privates Cleanup debug Add repair actions for sub turrets Cleanup Fix Header Error Handling Cleanup setHitpointDamage Fix common ACE_isEngineer to handle scalar or bool Claim and release repair objects (wheel/track) Repair sub-turrets
28 lines
701 B
Plaintext
28 lines
701 B
Plaintext
/*
|
|
* Author: commy2
|
|
* Check if the unit can replace given track of the vehicle.
|
|
*
|
|
* Arguments:
|
|
* 0: Unit that does the repairing <OBJECT>
|
|
* 1: Vehicle to repair <OBJECT>
|
|
* 2: Selected hitpoint <STRING>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [unit, vehicle, "hitpoint"] call ace_repair_fnc_canReplaceTrack
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_unit", "_target", "_hitPoint"];
|
|
TRACE_3("params",_unit,_target,_hitPoint);
|
|
|
|
if !([_unit, _target, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
|
|
|
//check for a near track object is handled by claimObjects[] config
|
|
|
|
(_target getHitPointDamage _hitPoint >= 1)
|