mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
742626ff1a
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
47 lines
1.1 KiB
Plaintext
47 lines
1.1 KiB
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: mharis001
|
|
* Assigns object as repair vehicle.
|
|
*
|
|
* Arguments:
|
|
* 0: The module logic <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [LOGIC] call ace_zeus_fnc_moduleSetRepairVehicle
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_logic"];
|
|
|
|
if !(local _logic) exitWith {};
|
|
|
|
if !(["ace_repair"] call EFUNC(common,isModLoaded)) then {
|
|
[LSTRING(RequiresAddon)] call FUNC(showMessage);
|
|
} else {
|
|
private _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]);
|
|
|
|
if ((_mouseOver select 0) != "OBJECT") then {
|
|
[LSTRING(NothingSelected)] call FUNC(showMessage);
|
|
} else {
|
|
private _unit = _mouseOver select 1;
|
|
|
|
if (_unit isKindOf "Man" || (_unit isKindOf "Building")) then {
|
|
[LSTRING(OnlyVehicles)] call FUNC(showMessage);
|
|
} else {
|
|
if !(alive _unit) then {
|
|
[LSTRING(OnlyAlive)] call FUNC(showMessage);
|
|
} else {
|
|
if !([_unit] call EFUNC(repair,isRepairVehicle)) then {
|
|
_unit setVariable ["ACE_isRepairVehicle", 1, true];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
deleteVehicle _logic;
|