mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
#2437 - Warn users when mods break XEH
This commit is contained in:
parent
2c7a2b4140
commit
0e32c28552
@ -104,3 +104,25 @@ addMissionEventHandler ["Draw3D", DFUNC(render)];
|
||||
}];
|
||||
};
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
|
||||
//Debug to help end users identify mods that break CBA's XEH
|
||||
["SettingsInitialized", {
|
||||
private ["_badClassnames"];
|
||||
_badClassnames = [];
|
||||
{
|
||||
if ((isNil (format [QGVAR(Act_%1), typeOf _x])) || {isNil (format [QGVAR(SelfAct_%1), typeOf _x])}) then {
|
||||
if (!((typeOf _x) in _badClassnames)) then {
|
||||
_badClassnames pushBack (typeOf _x);
|
||||
ACE_LOGERROR_3("Compile checks bad for (classname: %1)(addon: %2) %1", (typeOf _x), (unitAddons (typeOf _x)), _x);
|
||||
};
|
||||
};
|
||||
} forEach (allUnits + vehicles);
|
||||
if ((count _badClassnames) == 0) then {
|
||||
ACE_LOGINFO("All compile checks passed");
|
||||
} else {
|
||||
ACE_LOGERROR_1("%1 Classnames failed compile check!!! (bad XEH / missing cba_enable_auto_xeh.pbo)", (count _badClassnames));
|
||||
["ACE Interaction failed to compile for some units (try adding cba_enable_auto_xeh.pbo)"] call BIS_fnc_error;
|
||||
};
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user