mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
5ea2069b76
* Arma 1.82 compat * Add tank to required addons
43 lines
1.3 KiB
Plaintext
43 lines
1.3 KiB
Plaintext
#include "script_component.hpp"
|
|
|
|
ADDON = false;
|
|
|
|
PREP_RECOMPILE_START;
|
|
#include "XEH_PREP.hpp"
|
|
PREP_RECOMPILE_END;
|
|
|
|
["ACE_RepairItem_Base", "killed", {
|
|
params ["_object"];
|
|
|
|
[{deleteVehicle _this}, _object, 5] call CBA_fnc_waitAndExecute;
|
|
}] call CBA_fnc_addClassEventHandler;
|
|
|
|
// load tracks and wheels
|
|
if (isServer) then {
|
|
private _fnc_addSpareItems = {
|
|
if (!GVAR(addSpareParts)) exitWith {};
|
|
params ["_vehicle"];
|
|
|
|
private _spareTracks = _vehicle getVariable QGVAR(editorLoadedTracks);
|
|
if (isNil "_spareTracks") then {
|
|
_spareTracks = [0, 1] select (_vehicle isKindOf "Tank"); // must match eden attribute default
|
|
};
|
|
if (_spareTracks > 0) then {
|
|
[_vehicle, _spareTracks, "ACE_Track"] call FUNC(addSpareParts);
|
|
};
|
|
|
|
private _spareWheels = _vehicle getVariable QGVAR(editorLoadedWheels);
|
|
if (isNil "_spareWheels") then {
|
|
_spareWheels = [0, 1] select (_vehicle isKindOf "Car"); // must match eden attribute default
|
|
};
|
|
if (_spareWheels > 0) then {
|
|
[_vehicle, _spareWheels, "ACE_Wheel"] call FUNC(addSpareParts);
|
|
};
|
|
};
|
|
|
|
["Tank", "initPost", _fnc_addSpareItems] call CBA_fnc_addClassEventHandler;
|
|
["Car", "initPost", _fnc_addSpareItems] call CBA_fnc_addClassEventHandler;
|
|
};
|
|
|
|
ADDON = true;
|