mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Headless - Add warning about duplicate loadout validation (#9878)
* Warn users about duplicate loadout validation * Update XEH_postInit.sqf
This commit is contained in:
parent
34362d48eb
commit
7a6c837f1b
@ -1,5 +1,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!isMultiplayer) exitWith {};
|
||||
|
||||
["CBA_settingsInitialized", {
|
||||
// Register and remove HCs if not client that is not server and distribution or end mission enabled
|
||||
if ((!hasInterface || isServer) && {XGVAR(enabled) || XGVAR(endMission) != 0}) then {
|
||||
@ -25,6 +27,23 @@
|
||||
(_rebalance == FORCED_REBALANCE) call FUNC(rebalance);
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// If CBA's loadout validation is enabled, warn users
|
||||
if (XGVAR(transferLoadout) > 0 && {(missionNamespace getVariable ["CBA_network_loadoutValidation", 0]) isEqualTo 2}) then {
|
||||
WARNING("CBA_network_loadoutValidation is enabled - acex_headless_transferLoadout should therefore be disabled");
|
||||
[QEGVAR(common,displayTextStructured), ["CBA_network_loadoutValidation is enabled - acex_headless_transferLoadout should therefore be disabled", 3]] call CBA_fnc_globalEvent;
|
||||
};
|
||||
|
||||
["CBA_SettingChanged", {
|
||||
params ["_setting", "_value"];
|
||||
|
||||
if (_setting != "CBA_network_loadoutValidation") exitWith {};
|
||||
|
||||
if (XGVAR(transferLoadout) > 0 && {_value isEqualTo 2}) then {
|
||||
WARNING("CBA_network_loadoutValidation is enabled - acex_headless_transferLoadout should therefore be disabled");
|
||||
[QEGVAR(common,displayTextStructured), ["CBA_network_loadoutValidation is enabled - acex_headless_transferLoadout should therefore be disabled", 3]] call CBA_fnc_globalEvent;
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
} else {
|
||||
// Register HC (this part happens on HC only)
|
||||
[QXGVAR(headlessClientJoined), [player]] call CBA_fnc_globalEvent; // Global event for API purposes
|
||||
|
Loading…
Reference in New Issue
Block a user