mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix repair cargo not added to zeus created objects (#4201)
- Fix #4200 (add delay for units created via zeus) - Use ace_settingsInitialized to add events
This commit is contained in:
parent
0a56ab1fc4
commit
afe3e5ccd3
@ -22,13 +22,11 @@ class Extended_InitPost_EventHandlers {
|
||||
class Car {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(addRepairActions));
|
||||
serverInit = QUOTE([ARR_3(_this select 0,1,'ACE_Wheel')] call DFUNC(addSpareParts));
|
||||
};
|
||||
};
|
||||
class Tank {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(addRepairActions));
|
||||
serverInit = QUOTE([ARR_3(_this select 0,1,'ACE_Track')] call DFUNC(addSpareParts));
|
||||
};
|
||||
};
|
||||
class Motorcycle {
|
||||
|
@ -5,3 +5,14 @@
|
||||
|
||||
// wheels
|
||||
[QGVAR(setWheelHitPointDamage), {(_this select 0) setHitPointDamage [_this select 1, _this select 2]}] call CBA_fnc_addEventHandler;
|
||||
|
||||
if (isServer) then {
|
||||
["ace_settingsInitialized", {
|
||||
TRACE_1("ace_settingsInitialized eh", GVAR(addSpareParts));
|
||||
if (!GVAR(addSpareParts)) exitWith {};
|
||||
if (!(["ace_cargo"] call EFUNC(common,isModLoaded))) exitWith {};
|
||||
|
||||
["Car", "Init", {[_this select 0, 1, "ACE_Wheel"] call FUNC(addSpareParts)}, true, [], true] call CBA_fnc_addClassEventHandler;
|
||||
["Tank", "Init", {[_this select 0, 1, "ACE_Track"] call FUNC(addSpareParts)}, true, [], true] call CBA_fnc_addClassEventHandler;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
};
|
||||
|
@ -33,4 +33,6 @@ if (!EGVAR(common,settingsInitFinished)) exitWith {
|
||||
if (!_force && !GVAR(addSpareParts)) exitWith {};
|
||||
|
||||
// Load
|
||||
["ace_addCargo", [_part, _vehicle, _amount]] call CBA_fnc_localEvent;
|
||||
[{
|
||||
["ace_addCargo", _this] call CBA_fnc_localEvent;
|
||||
}, [_part, _vehicle, _amount]] call CBA_fnc_execNextFrame;
|
||||
|
Loading…
Reference in New Issue
Block a user