2015-03-10 17:05:56 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
ADDON = false;
|
|
|
|
|
2016-11-23 19:35:25 +00:00
|
|
|
PREP_RECOMPILE_START;
|
2016-02-22 14:20:36 +00:00
|
|
|
#include "XEH_PREP.hpp"
|
2016-11-23 19:35:25 +00:00
|
|
|
PREP_RECOMPILE_END;
|
2015-03-10 17:05:56 +00:00
|
|
|
|
2018-07-05 16:29:32 +00:00
|
|
|
#include "initSettings.sqf"
|
|
|
|
|
2016-09-16 11:51:41 +00:00
|
|
|
["ACE_RepairItem_Base", "killed", {
|
|
|
|
params ["_object"];
|
|
|
|
|
|
|
|
[{deleteVehicle _this}, _object, 5] call CBA_fnc_waitAndExecute;
|
|
|
|
}] call CBA_fnc_addClassEventHandler;
|
|
|
|
|
2017-12-07 14:29:54 +00:00
|
|
|
// 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
|
|
|
|
};
|
2018-04-11 20:18:05 +00:00
|
|
|
if (_spareTracks > 0) then {
|
|
|
|
[_vehicle, _spareTracks, "ACE_Track"] call FUNC(addSpareParts);
|
|
|
|
};
|
2017-12-07 14:29:54 +00:00
|
|
|
|
|
|
|
private _spareWheels = _vehicle getVariable QGVAR(editorLoadedWheels);
|
|
|
|
if (isNil "_spareWheels") then {
|
|
|
|
_spareWheels = [0, 1] select (_vehicle isKindOf "Car"); // must match eden attribute default
|
|
|
|
};
|
2018-04-11 20:18:05 +00:00
|
|
|
if (_spareWheels > 0) then {
|
|
|
|
[_vehicle, _spareWheels, "ACE_Wheel"] call FUNC(addSpareParts);
|
|
|
|
};
|
2017-12-07 14:29:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
["Tank", "initPost", _fnc_addSpareItems] call CBA_fnc_addClassEventHandler;
|
|
|
|
["Car", "initPost", _fnc_addSpareItems] call CBA_fnc_addClassEventHandler;
|
|
|
|
};
|
|
|
|
|
2015-03-10 17:05:56 +00:00
|
|
|
ADDON = true;
|