Convert ACE_settings to CBA_settings (#4895)

* Convert ACE_settings to CBA_settings

* Run Modules Globaly, BWC for SetSetting

* Add support for string settings

* ACE_ServerSettings warning

* Add handler for global setting being changed

* Add deprecated and replaced not to Settings Framework doc

* Remove options menu UI, Move Debug and HeadBug Fix to Options in Pause Menu

* Change modules scope to 1

* Disable debug
This commit is contained in:
PabstMirror 2017-11-11 13:21:55 -06:00 committed by jonpas
parent 9ea1f6839f
commit cd30b09b4f
78 changed files with 455 additions and 1345 deletions

View File

@ -1,7 +1,7 @@
class CfgVehicles { class CfgVehicles {
class ACE_Module; class ACE_Module;
class GVAR(ModuleSettings): ACE_Module { class GVAR(ModuleSettings): ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(DisplayName); displayName = CSTRING(DisplayName);
icon = QPATHTOF(UI\Icon_Module_Wind_ca.paa); icon = QPATHTOF(UI\Icon_Module_Wind_ca.paa);
category = "ACE"; category = "ACE";
@ -84,4 +84,4 @@ class CfgVehicles {
description = CSTRING(Description); description = CSTRING(Description);
}; };
}; };
}; };

View File

@ -5,7 +5,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(DisplayName); displayName = CSTRING(DisplayName);
function = QFUNC(moduleSettings); function = QFUNC(moduleSettings);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
isTriggerActivated = 0; isTriggerActivated = 0;
icon = QPATHTOF(UI\Icon_Module.paa); icon = QPATHTOF(UI\Icon_Module.paa);

View File

@ -7,7 +7,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(Category); displayName = CSTRING(Category);
function = QFUNC(moduleInit); function = QFUNC(moduleInit);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
icon = QPATHTOF(UI\Icon_Module_AdvancedThrowing_ca.paa); icon = QPATHTOF(UI\Icon_Module_AdvancedThrowing_ca.paa);
class Arguments { class Arguments {

View File

@ -17,8 +17,6 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
if (!isServer) exitWith {};
params ["_logic", "_units", "_activated"]; params ["_logic", "_units", "_activated"];
if (!_activated) exitWith {}; if (!_activated) exitWith {};

View File

@ -152,7 +152,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(ModuleSurrender_DisplayName); displayName = CSTRING(ModuleSurrender_DisplayName);
function = QFUNC(moduleSurrender); function = QFUNC(moduleSurrender);
scope = 2; //show in editor scope = 1; //show in editor
isGlobal = 0; //run on server isGlobal = 0; //run on server
isTriggerActivated = 1; //Wait for triggers isTriggerActivated = 1; //Wait for triggers
icon = QPATHTOF(UI\Icon_Module_Make_Unit_Surrender_ca.paa); icon = QPATHTOF(UI\Icon_Module_Make_Unit_Surrender_ca.paa);
@ -168,7 +168,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(ModuleHandcuffed_DisplayName); displayName = CSTRING(ModuleHandcuffed_DisplayName);
function = QFUNC(moduleHandcuffed); function = QFUNC(moduleHandcuffed);
scope = 2; //show in editor scope = 1; //show in editor
isGlobal = 0; //run on server isGlobal = 0; //run on server
isTriggerActivated = 1; //Wait for triggers isTriggerActivated = 1; //Wait for triggers
icon = QPATHTOF(UI\Icon_Module_Make_Unit_Handcuffed_ca.paa); icon = QPATHTOF(UI\Icon_Module_Make_Unit_Handcuffed_ca.paa);
@ -186,7 +186,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(ModuleSettings_DisplayName); displayName = CSTRING(ModuleSettings_DisplayName);
function = QFUNC(moduleSettings); function = QFUNC(moduleSettings);
scope = 2; scope = 1;
icon = QPATHTOF(UI\Icon_Module_settings_ca.paa); icon = QPATHTOF(UI\Icon_Module_settings_ca.paa);
isGlobal = 1; isGlobal = 1;
isSingular = 1; isSingular = 1;

View File

@ -8,7 +8,7 @@ class CfgVehicles {
}; };
class ACE_Module: Module_F {}; class ACE_Module: Module_F {};
class ACE_moduleCargoSettings: ACE_Module { class ACE_moduleCargoSettings: ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(SettingsModule_DisplayName); displayName = CSTRING(SettingsModule_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Cargo_ca.paa); icon = QPATHTOF(UI\Icon_Module_Cargo_ca.paa);
category = "ACE_Logistics"; category = "ACE_Logistics";
@ -40,7 +40,7 @@ class CfgVehicles {
}; };
}; };
class GVAR(makeLoadable): ACE_Module { class GVAR(makeLoadable): ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(makeLoadable_displayName); displayName = CSTRING(makeLoadable_displayName);
icon = QPATHTOF(UI\Icon_Module_makeLoadable_ca.paa); icon = QPATHTOF(UI\Icon_Module_makeLoadable_ca.paa);
category = "ACE_Logistics"; category = "ACE_Logistics";
@ -451,7 +451,7 @@ class CfgVehicles {
GVAR(size) = 1; GVAR(size) = 1;
GVAR(canLoad) = 1; GVAR(canLoad) = 1;
}; };
class Scrapyard_base_F; class Scrapyard_base_F;
class Land_PaperBox_closed_F: Scrapyard_base_F { class Land_PaperBox_closed_F: Scrapyard_base_F {
class EventHandlers { class EventHandlers {
@ -785,7 +785,7 @@ class CfgVehicles {
class Land_PaperBox_01_small_closed_base_F: Items_base_F { class Land_PaperBox_01_small_closed_base_F: Items_base_F {
GVAR(size) = 1; GVAR(size) = 1;
GVAR(canLoad) = 1; GVAR(canLoad) = 1;
maximumLoad = 1000; maximumLoad = 1000;
transportMaxBackpacks = 12; transportMaxBackpacks = 12;
transportMaxMagazines = 64; transportMaxMagazines = 64;

View File

@ -17,8 +17,6 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
if (!isServer) exitWith {};
params ["_logic", "", "_activated"]; params ["_logic", "", "_activated"];
if (!_activated) exitWith {}; if (!_activated) exitWith {};

View File

@ -14,10 +14,6 @@ class ACE_Settings {
* values[] = {"Disabled", "Enabled", "Only Cursor", "Only On Keypress", "Only Cursor and KeyPress"}; // Stringtable entries that describe the options * values[] = {"Disabled", "Enabled", "Only Cursor", "Only On Keypress", "Only Cursor and KeyPress"}; // Stringtable entries that describe the options
* }; * };
*/ */
class GVAR(forceAllSettings) {
value = 0;
typeName = "BOOL";
};
class GVAR(checkPBOsAction) { class GVAR(checkPBOsAction) {
value = 0; value = 0;
typeName = "SCALAR"; typeName = "SCALAR";

View File

@ -33,7 +33,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(CheckPBO_DisplayName); displayName = CSTRING(CheckPBO_DisplayName);
function = QFUNC(moduleCheckPBOs); function = QFUNC(moduleCheckPBOs);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
isSingular = 1; isSingular = 1;
icon = QPATHTOF(UI\Icon_Module_CheckPBO_ca.paa); icon = QPATHTOF(UI\Icon_Module_CheckPBO_ca.paa);

View File

@ -1,8 +1,12 @@
TRACE_1("",QUOTE(ADDON));
PREP(cbaSettings);
PREP(cbaSettings_loadFromConfig);
PREP(cbaSettings_settingChanged);
PREP(actionKeysNamesConverted); PREP(actionKeysNamesConverted);
PREP(addCanInteractWithCondition); PREP(addCanInteractWithCondition);
PREP(addLineToDebugDraw); PREP(addLineToDebugDraw);
PREP(addSetting);
PREP(addToInventory); PREP(addToInventory);
PREP(assignedItemFix); PREP(assignedItemFix);
PREP(assignObjectsInList); PREP(assignObjectsInList);
@ -109,9 +113,6 @@ PREP(isUnderwater);
PREP(lightIntensityFromObject); PREP(lightIntensityFromObject);
PREP(loadPerson); PREP(loadPerson);
PREP(loadPersonLocal); PREP(loadPersonLocal);
PREP(loadSettingsFromProfile);
PREP(loadSettingsOnServer);
PREP(loadSettingsLocalizedText);
PREP(moduleCheckPBOs); PREP(moduleCheckPBOs);
PREP(moduleLSDVehicles); PREP(moduleLSDVehicles);
PREP(muteUnit); PREP(muteUnit);
@ -130,7 +131,6 @@ PREP(playerSide);
PREP(positionToASL); PREP(positionToASL);
PREP(progressBar); PREP(progressBar);
PREP(readSettingFromModule); PREP(readSettingFromModule);
PREP(readSettingsFromParamsArray);
PREP(receiveRequest); PREP(receiveRequest);
PREP(removeCanInteractWithCondition); PREP(removeCanInteractWithCondition);
PREP(removeSpecificMagazine); PREP(removeSpecificMagazine);
@ -152,7 +152,6 @@ PREP(setPitchBankYaw);
PREP(setPlayerOwner); PREP(setPlayerOwner);
PREP(setProne); PREP(setProne);
PREP(setSetting); PREP(setSetting);
PREP(setSettingFromConfig);
PREP(setVariableJIP); PREP(setVariableJIP);
PREP(setVariablePublic); PREP(setVariablePublic);
PREP(setVolume); PREP(setVolume);

View File

@ -74,20 +74,6 @@ if (isServer) then {
}]; }];
}; };
// Listens for global "SettingChanged" events, to update the force status locally
["ace_settingChanged", {
params ["_name", "_value", "_force"];
if (_force) then {
private _settingData = [_name] call FUNC(getSettingData);
if (_settingData isEqualTo []) exitWith {};
_settingData set [6, _force];
};
}] call CBA_fnc_addEventHandler;
// Event to log Fix Headbug output // Event to log Fix Headbug output
[QGVAR(headbugFixUsed), { [QGVAR(headbugFixUsed), {
params ["_profileName", "_animation"]; params ["_profileName", "_animation"];
@ -192,60 +178,6 @@ call FUNC(checkFiles);
] call FUNC(checkPBOs) ] call FUNC(checkPBOs)
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
// Create a pfh to wait until all postinits are ready and settings are initialized
[{
params ["_args"];
_args params ["_waitingMsgSent"];
// If post inits are not ready then wait
if !(SLX_XEH_MACHINE select 8) exitWith {};
// If settings are not initialized then wait
if (isNil QGVAR(settings) || {!isServer && isNil QEGVAR(modules,serverModulesRead)}) exitWith {
if !(_waitingMsgSent) then {
_args set [0, true];
INFO("Waiting on settings from server...");
};
};
[_this select 1] call CBA_fnc_removePerFrameHandler;
INFO("Settings received from server.");
if (isServer) then { //read settings from paramsArray
[] call FUNC(readSettingsFromParamsArray);
};
// Event so that ACE_Modules have their settings loaded:
[QGVAR(initSettingsFromModules), []] call CBA_fnc_localEvent;
if (isServer) then {
// Publish all settings data after all configs and modules are read
publicVariable QGVAR(settings);
};
// Load user settings from profile
if (hasInterface) then {
call FUNC(loadSettingsFromProfile);
call FUNC(loadSettingsLocalizedText);
};
INFO("Settings initialized.");
//Event that settings are safe to use:
["ace_settingsInitialized", []] call CBA_fnc_localEvent;
//Set init finished and run all delayed functions:
GVAR(settingsInitFinished) = true;
INFO_1("%1 delayed functions running.",count GVAR(runAtSettingsInitialized));
{
(_x select 1) call (_x select 0);
false
} count GVAR(runAtSettingsInitialized);
GVAR(runAtSettingsInitialized) = nil; //cleanup
}, 0, [false]] call CBA_fnc_addPerFrameHandler;
/***************************************************************************/ /***************************************************************************/

View File

@ -18,10 +18,8 @@ GVAR(runAtSettingsInitialized) = [];
//Debug //Debug
ACE_COUNTERS = []; ACE_COUNTERS = [];
// Load settings on the server and broadcast them // Load ace_settings into CBA Settings
if (isServer) then { [] call FUNC(cbaSettings);
call FUNC(loadSettingsOnServer);
};
GVAR(statusEffect_Names) = []; GVAR(statusEffect_Names) = [];
GVAR(statusEffect_isGlobal) = []; GVAR(statusEffect_isGlobal) = [];

View File

@ -1,43 +0,0 @@
/*
* Author: esteldunedain
* Adds a new setting at runtime, with all it's metadata.
* If has only local effects.
*
* Arguments:
* 0: name <STRING>
* 1: typeName <STRING>
* 2: isClientSetable <BOOL>
* 3: localizedName <STRING>
* 4: localizedDescription <STRING>
* 5: possibleValues <ARRAY>
* 6: isForced <BOOL>
* 7: defaultValue <ANY>
*
* Return Value:
* None
*
* Example:
* ["bob", "type", true, "bob", "person", [1,2,3], true, 5] call ace_common_fnc_addSettings
*
* Public: No
*/
#include "script_component.hpp"
params ["_name", "", "", "", "", "", "", "_value"]; //["_name", "_typeName", "_isClientSetable", "_localizedName", "_localizedDescription", "_possibleValues", "_isForced", "_value"];
private _settingData = [_name] call FUNC(getSettingData);
// Exit if the setting already exists
if (count _settingData > 0) exitWith {};
// Update the variable
TRACE_2("Setting added",_name,_value);
// Init the variable
missionNamespace setVariable [_name, _value];
// Add the setting data
GVAR(settings) pushBack _this;
// Raise event locally
["ace_settingChanged", [_name, _value]] call CBA_fnc_localEvent;

View File

@ -0,0 +1,112 @@
/*
* Author: PabstMirror
* Called at pre-init: Loads all ace_settings and converts them to CBA Settings.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call ace_common_fnc_cbaSettings;
*
* Public: No
*/
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
LOG("Adding ACE_Settings to CBA_settings");
// Init Vars:
GVAR(cbaSettings_forcedSettings) = [];
GVAR(cbaSettings_missionSettings) = [];
GVAR(settings) = []; // will stay empty - for BWC?
// Add Event Handlers:
[QGVAR(setSetting), {
params ["_settingName", "_value"];
TRACE_2("setSettingMission from setSetting",_settingName,_value);
["CBA_settings_setSettingMission", [_settingName, _value, true]] call CBA_fnc_localEvent;
["CBA_settings_refreshSetting", [_settingName]] call CBA_fnc_localEvent;
}] call CBA_fnc_addEventHandler;
["CBA_beforeSettingsInitialized", {
TRACE_1("CBA_beforeSettingsInitialized EH",_this);
// First: Process missionConfig settings:
{
_x params ["_settingName", "_value"];
TRACE_2("setSettingMission from missionConfig",_settingName,_value);
["CBA_settings_setSettingMission", [_settingName, _value, true]] call CBA_fnc_localEvent;
} forEach GVAR(cbaSettings_missionSettings);
GVAR(cbaSettings_missionSettings) = nil;
// Second: Read settings from mission params
[] call FUNC(readSettingsFromParamsArray);
// Third: Event so that ACE_Modules have their settings loaded:
[QGVAR(initSettingsFromModules), []] call CBA_fnc_localEvent;
TRACE_1("Finished mission settings",_this);
}] call CBA_fnc_addEventHandler;
["CBA_settingsInitialized", {
TRACE_1("CBA_settingsInitialized EH",_this);
if !(SLX_XEH_MACHINE select 8) then {WARNING("PostInit not finished");};
INFO("Settings initialized.");
//Event that settings are safe to use:
["ace_settingsInitialized", []] call CBA_fnc_localEvent;
//Set init finished and run all delayed functions:
GVAR(settingsInitFinished) = true;
INFO_1("%1 delayed functions running.",count GVAR(runAtSettingsInitialized));
{
(_x select 1) call (_x select 0);
false
} count GVAR(runAtSettingsInitialized);
GVAR(runAtSettingsInitialized) = nil; //cleanup
}] call CBA_fnc_addEventHandler;
private _start = diag_tickTime;
private _settingsConfig = configFile >> "ACE_Settings";
private _countOptions = count _settingsConfig;
TRACE_1("Reading settings from configFile",_countOptions);
for "_index" from 0 to (_countOptions - 1) do {
private _optionEntry = _settingsConfig select _index;
if (isNil (configName _optionEntry)) then {
[_optionEntry] call FUNC(cbaSettings_loadFromConfig);
} else {
WARNING_1("Setting [%1] - Already defined from somewhere else??",_varName);
};
};
_settingsConfig = missionConfigFile >> "ACE_Settings";
_countOptions = count _settingsConfig;
TRACE_1("Reading settings from missionConfigFile",_countOptions);
for "_index" from 0 to (_countOptions - 1) do {
private _optionEntry = _settingsConfig select _index;
private _settingName = configName _optionEntry;
if ((toLower _settingName) in GVAR(cbaSettings_forcedSettings)) then {
WARNING_1("Setting [%1] - Already Forced - ignoring missionConfig",_varName);
} else {
if (isNil _settingName) then {
// New setting, that was first defined in missionConfigFile
[_optionEntry] call FUNC(cbaSettings_loadFromConfig);
} else {
private _value = (_optionEntry >> "value") call BIS_fnc_getCfgData;
if (isNil "_value") exitWith {ERROR_1("Setting [%1] - Has bad value",_settingName);};
TRACE_2("queuing missionConfig setting",_settingName,_value);
GVAR(cbaSettings_missionSettings) pushBack [_settingName, _value];
};
};
};
// Warning if using a custom ACE_ServerSettings config
if (isServer && {isClass (configFile >> "ACE_ServerSettings")}) then {
WARNING("ACE_ServerSettings is no longer supported and will be ignored");
};
INFO_1("Parsed Settings Configs [%1 ms]",(1000 * (diag_tickTime - _start)) toFixed 1);

View File

@ -0,0 +1,99 @@
/*
* Author: PabstMirror
* Converts a ace_setting config into a cba setting
*
* Arguments:
* 0: Setting config <CONFIG>
*
* Return Value:
* None
*
* Example:
* [] call ace_common_fnc_cbaSettings_loadFromConfig;
*
* Public: No
*/
// #define DEBUG_MODE_FULL
#include "script_component.hpp"
params ["_config"];
private _varName = configName _config;
private _typeName = toUpper getText (_config >> "typeName");
if (_typeName == "") then {
WARNING_1("Setting [%1] Has no typeName",_varName);
_typeName = "SCALAR";
};
TRACE_3("loadFromConfig",_var,_typeName,_config);
private _isClientSettable = (getNumber (_config >> "isClientSettable")) > 0;
private _localizedName = getText (_config >> "displayName");
private _localizedDescription = getText (_config >> "description");
private _isForced = (getNumber (_config >> "force")) > 0;
private _category = getText (_config >> "category");
private _cbaIsGlobal = (!_isClientSettable) || _isForced;
if (_isForced) then {GVAR(cbaSettings_forcedSettings) pushBack (toLower _varName);};
// Basic handling of setting types CBA doesn't support:
if (_typeName == "ARRAY") exitWith {
WARNING_1("Setting [%1] is type ARRAY - limited support",_varName);
private _value = getArray (_config >> "value");
if (isServer) then {missionNamespace setVariable [_varName, _value, true];};
};
private _cbaSettingType = "";
private _cbaValueInfo = [];
switch (_typeName) do {
case ("SCALAR"): { // ACE's Scalar can be a float or an index for a list
if (!isNumber (_config >> "value")) then {WARNING_2("Setting [%1] - value type [%2] is missing number",_varName,_typeName);};
if (isArray (_config >> "values")) then {
_cbaSettingType = "LIST"; // [_values, _valueTitles, _defaultIndex]
private _values = [];
private _valueTitles = [];
{
_values pushBack _forEachIndex;
_valueTitles pushBack (if ((_x select [0, 1]) == "$") then {localize (_x select [1]);} else {_x});
} forEach (getArray (_config >> "values"));
_cbaValueInfo = [_values, _valueTitles, getNumber (_config >> "value")];
} else {
_cbaSettingType = "SLIDER"; // [_min, _max, _default, _trailingDecimals]
_cbaValueInfo = [-1, 5000, getNumber (_config >> "value"), 1];
};
};
case ("BOOL"): {
if (!isNumber (_config >> "value")) then {WARNING_2("Setting [%1] - value type [%2] is missing number",_varName,_typeName);};
_cbaSettingType = "CHECKBOX";
_cbaValueInfo = (getNumber (_config >> "value")) > 0;
};
case ("COLOR"): {
if (!isArray (_config >> "value")) then {WARNING_2("Setting [%1] - value type [%2] is missing array",_varName,_typeName);};
_cbaSettingType = "COLOR";
_cbaValueInfo = getArray (_config >> "value");
};
case ("STRING"): {
if (!isText (_config >> "value")) then {WARNING_2("Setting [%1] - value type [%2] is missing text",_varName,_typeName);};
_cbaSettingType = "EDITBOX";
_cbaValueInfo = getText (_config >> "value");
};
};
if (_cbaSettingType == "") exitWith {ERROR_3("Setting [%1] - value type [%2] is unknown - %3",_varName,_typeName,_cbaValueInfo);};
if (_localizedDescription == "") then {_localizedDescription = _varName};
if (_category == "") then {
// WARNING_1("Setting [%1] - no category",_varName);
_category = "Uncategorized";
};
if (((_varName select [0, 4]) == "ACE_") && {(_category select [0, 3]) != "ACE"}) then {_category = format ["ACE - %1", _category];};
if (((_varName select [0, 5]) == "ACEX_") && {(_category select [0, 4]) != "ACEX"}) then {_category = format ["ACEX - %1", _category];};
private _code = compile format ['["%1", _this] call FUNC(cbaSettings_settingChanged)', _varName];
TRACE_2("setting",_cbaSettingType,_cbaValueInfo);
TRACE_4("",_isForced,_cbaIsGlobal,_category,_cbaValueInfo);
private _return = [_varName, _cbaSettingType, [_localizedName, _localizedDescription], _category, _cbaValueInfo, _cbaIsGlobal, _code] call CBA_settings_fnc_init;
TRACE_1("returned",_return);
if ((isNil "_return") || {_return != 0}) then {ERROR_1("Setting [%1] - CBA Error",_varName);};
_return

View File

@ -0,0 +1,33 @@
/*
* Author: PabstMirror
* Function for handeling a cba setting being changed.
* Adds warning if global setting is changed after ace_settingsInitialized
*
* Arguments:
* 0: Setting Name <STRING>
* 1: New Value <ANY>
* 2: Can be changed mid-mission <BOOL> (default: false)
*
* Return Value:
* None
*
* Example:
* ["ace_medical_level", 1, false] call ace_common_fnc_cbaSettings_settingChanged;
*
* Public: No
*/
// #define DEBUG_MODE_FULL
#include "script_component.hpp"
params ["_settingName", "_newValue", ["_canBeChanged", false]];
TRACE_2("",_settingName,_newValue);
["ace_settingChanged", [_settingName, _newValue]] call CBA_fnc_localEvent;
if (_canBeChanged) exitWith {};
if (!GVAR(settingsInitFinished)) exitWith {}; // Ignore changed event before CBA_settingsInitialized
if (CBA_settings_default getVariable [_settingName, []] param [7, 0] == 0) exitWith {}; // Ignore if not a global setting
if ((getNumber (configFile >> "ACE_settings" >> _settingName >> "canBeChanged")) == 1) exitWith {}; // Ignore if flagged as ok to change
WARNING_1("Global setting [%1] changed mid-mission",_settingName);
[QGVAR(displayTextStructured), [format ["Global setting %1 changed mid-mission. Mission restart may be required to prevent issues", _settingName], 4]] call CBA_fnc_localEvent;

View File

@ -1,40 +0,0 @@
/*
* Author: esteldunedain
* Load the user setable settings from the user profile.
* Config < Server UserConfig < Mission Config < Client settings
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* call ace_common_fnc_loadSettingsFromProfile
*
* Public: No
*/
#include "script_component.hpp"
// Iterate through settings
{
_x params ["_name", "", "_isClientSetable", "", "", "", "_isForced"];
// If setting is user setable
if (_isClientSetable) then {
// If setting is not forced
if !(_isForced) then {
private _profileValue = profileNamespace getVariable _name;
// If the setting is stored on the profile
if !(isNil "_profileValue") then {
// If the profile variable has the correct type
if (_profileValue isEqualType (missionNamespace getVariable _name)) then {
// Load the setting from the profile
missionNamespace setVariable [_name, _profileValue];
};
};
};
};
false
} count GVAR(settings);

View File

@ -1,64 +0,0 @@
/*
* Author: Glowbal
* Parse all settings and load the localized displayName and description for all text
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* call ace_common_fnc_loadSettingsLocalizedText
*
* Public: No
*/
#include "script_component.hpp"
private _fnc_parseConfigForDisplayNames = {
params ["_optionEntry"];
if !(isClass _optionEntry) exitWith {false};
private _values = getArray (_optionEntry >> "values");
_x set [3, getText (_optionEntry >> "displayName")];
_x set [4, getText (_optionEntry >> "description")];
_x set [5, _values];
_x set [8, getText (_optionEntry >> "category")];
{
private _text = _x;
if (_text isEqualType "" && {count _text > 1} && {_text select [0, 1] == "$"}) then {
_text = localize (_text select [1]); //chop off the leading $
_values set [_forEachIndex, _text];
};
} forEach _values;
if (!(_values isEqualTo [])) then {
if (_typeOf != "SCALAR") then {
WARNING_2("Setting [%1] has values[] but is not SCALAR (%2)", _name, _typeOf);
} else {
private _value = missionNamespace getVariable [_name, -1];
if ((_value < 0) || {_value >= (count _values)}) then {
WARNING_3("Setting [%1] out of bounds %2 (values[] count is %3)", _name, _value, count _values);
};
};
};
true
};
// Iterate through settings
{
_x params ["_name", "_typeOf"];
if !([configFile >> "ACE_Settings" >> _name] call _fnc_parseConfigForDisplayNames) then {
if !([configFile >> "ACE_ServerSettings" >> _name] call _fnc_parseConfigForDisplayNames) then {
if !([missionConfigFile >> "ACE_Settings" >> _name] call _fnc_parseConfigForDisplayNames) then {
WARNING_1("Setting found, but couldn't localize [%1] (server has but we don't?)",_name);
};
};
};
false
} count GVAR(settings);

View File

@ -1,59 +0,0 @@
/*
* Author: esteldunedain
* Load the parameters on the server.
* Config < Server UserConfig < Mission Config
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* call ace_common_fnc_loadSettingsOnServer
*
* Public: No
*/
#include "script_component.hpp"
GVAR(settings) = [];
private _fnc_parseConfigForSettings = {
params ["_config"];
private _countOptions = count _config;
for "_index" from 0 to (_countOptions - 1) do {
private _optionEntry = _config select _index;
[_optionEntry] call FUNC(setSettingFromConfig);
};
// Check if all settings should be forced
if (GVAR(forceAllSettings)) then {
{
_x set [6, true];
false
} count GVAR(settings);
};
};
// Order is this way because:
// ACE_Settings should never force any setting by default. Loading it first ensures that all settings from ACE_Settings exist.
// This way, ACE_ServerSettings will override ACE_Settings, even if no force is used.
// Mission settings will override the server config settings, if no force is used.
// This ensures that all settings are of their correct type, in case an outdated or corrupt server config is used , as well as have their correct localized display name and description
// Regular config
[configFile >> "ACE_Settings"] call _fnc_parseConfigForSettings;
// Server config
[configFile >> "ACE_ServerSettings"] call _fnc_parseConfigForSettings;
// mission side settings
[missionConfigFile >> "ACE_Settings"] call _fnc_parseConfigForSettings;
// Publish all setting values
{
publicVariable (_x select 0);
false
} count GVAR(settings);

View File

@ -17,8 +17,6 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
if !(isServer) exitWith {};
params ["_logic", "_units", "_activated"]; params ["_logic", "_units", "_activated"];
if !(_activated) exitWith {}; if !(_activated) exitWith {};

View File

@ -1,7 +1,7 @@
/* /*
* Author: esteldunedain * Author: esteldunedain
* Reads a setting value from a module, set it and force it. Logs if the setting is missing from the module. * Reads a setting value from a module, set it and force it. Logs if the setting is missing from the module.
* Must be called on the server, effect is global. * Must be called on all machines!!!!!!!
* *
* Arguments: * Arguments:
* 0: Module <OBJECT> * 0: Module <OBJECT>
@ -16,12 +16,16 @@
* *
* Public: No * Public: No
*/ */
#define DEBUG_MODE_FULL
#include "script_component.hpp" #include "script_component.hpp"
if !(isServer) exitWith {};
params ["_logic", "_settingName", "_moduleVariable"]; params ["_logic", "_settingName", "_moduleVariable"];
// Check if the variable is already defined
if (isNil _settingName) exitWith {
ERROR_1("readSettingFromModule - param [%1] is not an ace_setting", _settingName);
};
// Check if the parameter is defined in the module // Check if the parameter is defined in the module
if (isNil {_logic getVariable _moduleVariable}) exitWith { if (isNil {_logic getVariable _moduleVariable}) exitWith {
WARNING_2("Warning in %1 module: %2 setting is missing. Probably an obsolete version of the module is used in the mission.",typeOf _logic,_moduleVariable); WARNING_2("Warning in %1 module: %2 setting is missing. Probably an obsolete version of the module is used in the mission.",typeOf _logic,_moduleVariable);
@ -37,5 +41,10 @@ if (_value isEqualTo -1) then {
}; };
}; };
// Set the setting globally and force it if ([_settingName, "mission"] call CBA_settings_fnc_isForced) then {
[_settingName, _value, true, true] call FUNC(setSetting); WARNING_1("Setting [%1] - Already Forced",_settingName);
};
// Set the setting as a mission setting and force it
TRACE_2("setSettingMission from module",_settingName,_value);
["CBA_settings_setSettingMission", [_settingName, _value, true]] call CBA_fnc_localEvent;

View File

@ -14,6 +14,7 @@
* *
* Public: No * Public: No
*/ */
#define DEBUG_MODE_FULL
#include "script_component.hpp" #include "script_component.hpp"
//paramsArray is a normal variable not a command //paramsArray is a normal variable not a command
@ -35,12 +36,6 @@ TRACE_1("Reading missionConfigFile params",_paramsArray);
ERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName); ERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName);
}; };
private _settingData = [_settingName] call FUNC(getSettingData);
_settingData params ["", "_typeName", "", "", "", "", "_isForced"];
// Check if it's already forced and quit
if (_isForced) exitWith {WARNING_1("readSettingsFromParamsArray - param [%1] is already set and forced", _settingName);};
// The setting is not forced, so update the value // The setting is not forced, so update the value
// Read entry and cast it to the correct type from the existing variable // Read entry and cast it to the correct type from the existing variable
private _validValue = false; private _validValue = false;
@ -57,7 +52,12 @@ TRACE_1("Reading missionConfigFile params",_paramsArray);
WARNING_3("readSettingsFromParamsArray - param [%1] type not valid [%2] - expected type [%3]", _settingName,_settingValue,_typeName); WARNING_3("readSettingsFromParamsArray - param [%1] type not valid [%2] - expected type [%3]", _settingName,_settingValue,_typeName);
}; };
// Update the variable globaly and Force if ([_settingName, "mission"] call CBA_settings_fnc_isForced) then {
[_settingName, _settingValue, true, true] call FUNC(setSetting); WARNING_1("Setting [%1] - Already Forced",_settingName);
};
// Set the setting as a mission setting and force it
TRACE_2("setSettingMission from module",_settingName,_value);
["CBA_settings_setSettingMission", [_settingName, _value, true]] call CBA_fnc_localEvent;
}; };
} forEach _paramsArray; } forEach _paramsArray;

View File

@ -18,68 +18,19 @@
* *
* Public: No * Public: No
*/ */
#define DEBUG_MODE_FULL
#include "script_component.hpp" #include "script_component.hpp"
params ["_name", "_value", ["_force", false], ["_broadcastChanges", false]]; params ["_name", "_value", ["_force", false], ["_broadcastChanges", false]];
TRACE_4("setSetting",_name,_value,_force,_broadcastChanges);
private _settingData = [_name] call FUNC(getSettingData); if (!isServer) exitWith {};
if (!_broadcastChanges) exitWith {
// Exit if the setting does not exist ERROR_1("Setting [%1] - SetSetting no longer supports non-global settings",_name);
if (_settingData isEqualTo []) exitWith {
ERROR_1("SetSetting [%1] setting does not exist", _name);
}; };
_settingData params ["", "_typeName", "_isClientSetable", "", "", "", "_isForced"]; if ([_settingName, "mission"] call CBA_settings_fnc_isForced) then {
WARNING_1("Setting [%1] - Already mission forced - Ignoring",_settingName);
// Exit if the setting is already forced
if (_isForced) exitWith {
INFO_1("SetSetting [%1] Trying to set forced setting", _name);
}; };
//This does NOT broadcast changes to GVAR(settings), so clients would not get updated force status [QGVAR(setSetting), [_name, _value], (format [QGVAR(setSetting_%1), _name])] call CBA_fnc_globalEventJIP;
if ((missionNamespace getVariable [QEGVAR(modules,serverModulesRead), false]) && {!(_isForced isEqualTo _force)}) then {
WARNING_3("SetSetting [%1] attempting to broadcast a change to force (%2 to %3)", _name, _isForced, _force);
};
// If the type is not equal, try to cast it
private _failed = false;
if (typeName _value != _settingData select 1) then {
_failed = true;
if ((_typeName == "BOOL") && {_value isEqualType 0}) then {
// If value is not 0 or 1 consider it invalid and don't set anything
if (_value isEqualTo 0) then {
_value = false;
_failed = false;
};
if (_value isEqualTo 1) then {
_value = true;
_failed = false;
};
};
if ((_typeName == "COLOR") && {_value isEqualType []}) then {
_failed = false;
};
};
if (_failed) exitWith {ERROR_3("SetSetting [%1] bad data type expected %2 got %3", _name, _typeName, typeName _value);};
// Force it if it was required
_settingData set [6, _force];
// Exit if the value didn't change
if (_value isEqualTo (missionNamespace getVariable _name)) exitWith {};
// Update the variable
TRACE_2("Variable Updated",_name,_value);
missionNamespace setVariable [_name, _value];
if (isServer && {_broadcastChanges}) then {
// Publicize the new value
publicVariable _name;
// Raise event globally, this publicizes eventual changes in _force status so clients can update it locally
["ace_settingChanged", [_name, _value, _force]] call CBA_fnc_globalEvent;
} else {
// Raise event locally
["ace_settingChanged", [_name, _value, _force]] call CBA_fnc_localEvent;
};

View File

@ -1,117 +0,0 @@
/*
* Author: esteldunedain
* Load a setting from config if it was not previosuly forced. Force if neccesary.
*
* Arguments:
* 0: Config entry <CONFIG>
*
* Return Value:
* None
*
* Example:
* [CONFIG] call ace_common_fnc_setSettingFromConfig
*
* Public: No
*/
#include "script_component.hpp"
params ["_optionEntry"];
private _fnc_getValueWithType = {
params ["_optionEntry", "_typeName"];
private _valueConfig = (_optionEntry >> "value");
private _value = if (isNumber (_optionEntry >> "value")) then {getNumber (_optionEntry >> "value")} else {0};
TRACE_3("_fnc_getValueWithType:", configName _optionEntry, _typeName, _value);
if (_typeName == "BOOL") exitWith {
_value > 0
};
if (_typeName == "STRING") exitWith {
getText (_optionEntry >> "value")
};
if (_typeName == "ARRAY") exitWith {
getArray (_optionEntry >> "value")
};
if (_typeName == "COLOR") exitWith {
getArray (_optionEntry >> "value")
};
_value
};
private _name = configName _optionEntry;
// Check if the variable is already defined
if (isNil _name) then {
// That setting was not loaded yet
// Get type from config
private _typeName = getText (_optionEntry >> "typeName");
if (_typeName == "") then {
_typeName = "SCALAR";
};
// Read entry and cast it to the correct type
private _value = [_optionEntry, _typeName] call _fnc_getValueWithType;
// Init the variable
missionNamespace setVariable [_name, _value];
// Add the setting to a list on the server
// Set the variable to not forced
/*private _settingData = [
name,
typeName,
isClientSettable,
localizedName,
localizedDescription,
possibleValues,
isForced,
defaultValue,
category
];*/
private _settingData = [
_name,
_typeName,
(getNumber (_optionEntry >> "isClientSettable")) > 0,
"", //getText (_optionEntry >> "displayName"), //No need to broadcast, handeled by fnc_loadSettingsLocalizedText
"", //getText (_optionEntry >> "description"), //No need to broadcast, handeled by fnc_loadSettingsLocalizedText
[], //getArray (_optionEntry >> "values"), //No need to broadcast, handeled by fnc_loadSettingsLocalizedText
getNumber (_optionEntry >> "force") > 0,
_value,
"" //getText (_optionEntry >> "category") //No need to broadcast, handeled by fnc_loadSettingsLocalizedText
];
//Strings in the values array won't be localized from the config, so just do that now:
/*private _values = _settingData select 5;
{
private _text = _x;
if (((typeName _text) == "STRING") && {(count _text) > 1} && {(_text select [0,1]) == "$"}) then {
_text = localize (_text select [1, ((count _text) - 1)]); //chop off the leading $
_values set [_forEachIndex, _text];
};
} forEach _values;*/
GVAR(settings) pushBack _settingData;
} else {
// The setting already exists.
// Check if it's already forced and quit
private _settingData = [_name] call FUNC(getSettingData);
if (_settingData select 6) exitWith {};
// The setting is not forced, so update the value
// Read entry and cast it to the correct type from the existing variable
private _value = [_optionEntry, _settingData select 1] call _fnc_getValueWithType;
// Update the variable
missionNamespace setVariable [_name, _value];
// Force the setting if requested
if (getNumber (_optionEntry >> "force") > 0) then {
_settingData set [6, true];
};
};

View File

@ -3,7 +3,7 @@
#include "\z\ace\addons\main\script_mod.hpp" #include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL // #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS // #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_COMMON #ifdef DEBUG_ENABLED_COMMON

View File

@ -4,7 +4,7 @@ class ACE_ModuleExplosive: ACE_Module {
category = "ACE"; category = "ACE";
displayName = CSTRING(Module_DisplayName); displayName = CSTRING(Module_DisplayName);
function = QFUNC(module); function = QFUNC(module);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
isSingular = 1; isSingular = 1;
icon = QPATHTOF(UI\Icon_Module_Explosives_ca.paa); icon = QPATHTOF(UI\Icon_Module_Explosives_ca.paa);

View File

@ -15,8 +15,6 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
if !(isServer) exitWith {};
params ["_logic"]; params ["_logic"];
[_logic, QGVAR(RequireSpecialist), "RequireSpecialist"] call EFUNC(Common,readSettingFromModule); [_logic, QGVAR(RequireSpecialist), "RequireSpecialist"] call EFUNC(Common,readSettingFromModule);

View File

@ -18,7 +18,7 @@ class CfgVehicles {
}; };
class ACE_Module: Module_F {}; class ACE_Module: Module_F {};
class ACE_moduleEquipFRIES: ACE_Module { class ACE_moduleEquipFRIES: ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(Module_FRIES_DisplayName); displayName = CSTRING(Module_FRIES_DisplayName);
icon = QPATHTOF(UI\Icon_Module_FRIES_ca.paa); icon = QPATHTOF(UI\Icon_Module_FRIES_ca.paa);
category = "ACE"; category = "ACE";

View File

@ -1,12 +1,12 @@
class CfgVehicles { class CfgVehicles {
class ACE_Module; class ACE_Module;
class GVAR(moduleSettings): ACE_Module { class GVAR(moduleSettings): ACE_Module {
scope = 2; scope = 1;
category = "ACE"; category = "ACE";
displayName = CSTRING(moduleSettings_displayName); displayName = CSTRING(moduleSettings_displayName);
icon = QPATHTOF(UI\Icon_Module_finger_ca.paa); icon = QPATHTOF(UI\Icon_Module_finger_ca.paa);
function = QFUNC(moduleSettings); function = QFUNC(moduleSettings);
isGlobal = 0; isGlobal = 1;
isSingular = 1; isSingular = 1;
author = ECSTRING(common,ACETeam); author = ECSTRING(common,ACETeam);
class Arguments { class Arguments {

View File

@ -17,7 +17,6 @@
#include "script_component.hpp" #include "script_component.hpp"
params ["_logic"]; params ["_logic"];
if !(isServer) exitWith {};
[_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(maxRange), "maxRange"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(maxRange), "maxRange"] call EFUNC(common,readSettingFromModule);

View File

@ -97,7 +97,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(Module_DisplayName); displayName = CSTRING(Module_DisplayName);
function = QFUNC(moduleHearing); function = QFUNC(moduleHearing);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
isSingular = 1; isSingular = 1;
icon = QPATHTOF(UI\Icon_Module_Hearing_ca.paa); icon = QPATHTOF(UI\Icon_Module_Hearing_ca.paa);

View File

@ -8,7 +8,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(Module_DisplayName); displayName = CSTRING(Module_DisplayName);
function = QFUNC(moduleInteraction); function = QFUNC(moduleInteraction);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
isSingular = 1; isSingular = 1;
icon = QPATHTOF(UI\Icon_Module_Interaction_ca.paa); icon = QPATHTOF(UI\Icon_Module_Interaction_ca.paa);

View File

@ -21,7 +21,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(Module_DisplayName); displayName = CSTRING(Module_DisplayName);
function = QFUNC(moduleMap); function = QFUNC(moduleMap);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
isSingular = 1; isSingular = 1;
icon = QPATHTOF(UI\Icon_Module_Map_ca.paa); icon = QPATHTOF(UI\Icon_Module_Map_ca.paa);
@ -81,8 +81,8 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(BFT_Module_DisplayName); displayName = CSTRING(BFT_Module_DisplayName);
function = QFUNC(blueForceTrackingModule); function = QFUNC(blueForceTrackingModule);
scope = 2; scope = 1;
isGlobal = 0; isGlobal = 1;
isSingular = 1; isSingular = 1;
icon = QPATHTOF(UI\Icon_Module_BFTracking_ca.paa); icon = QPATHTOF(UI\Icon_Module_BFTracking_ca.paa);
class Arguments { class Arguments {

View File

@ -16,8 +16,6 @@
#include "script_component.hpp" #include "script_component.hpp"
if (!isServer) exitWith {};
params ["_logic"]; params ["_logic"];
[_logic, QGVAR(BFT_Enabled), "Enabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(BFT_Enabled), "Enabled"] call EFUNC(common,readSettingFromModule);

View File

@ -16,8 +16,6 @@
#include "script_component.hpp" #include "script_component.hpp"
if !(isServer) exitWith {};
params ["_logic", "", "_activated"]; params ["_logic", "", "_activated"];
if !(_activated) exitWith {}; if !(_activated) exitWith {};

View File

@ -1,11 +1,11 @@
class CfgVehicles { class CfgVehicles {
class ACE_Module; class ACE_Module;
class GVAR(moduleSettings): ACE_Module { class GVAR(moduleSettings): ACE_Module {
scope = 2; scope = 1;
category = "ACE"; category = "ACE";
displayName = CSTRING(moduleSettings_displayName); displayName = CSTRING(moduleSettings_displayName);
function = QFUNC(moduleSettings); function = QFUNC(moduleSettings);
isGlobal = 0; isGlobal = 1;
isSingular = 1; isSingular = 1;
author = ECSTRING(common,ACETeam); author = ECSTRING(common,ACETeam);
icon = QPATHTOF(ui\icon_module_map_gestures_ca.paa); icon = QPATHTOF(ui\icon_module_map_gestures_ca.paa);
@ -43,7 +43,7 @@ class CfgVehicles {
}; };
}; };
class GVAR(moduleGroupSettings): ACE_Module { class GVAR(moduleGroupSettings): ACE_Module {
scope = 2; scope = 1;
category = "ACE"; category = "ACE";
displayName = CSTRING(moduleGroupSettings_displayName); displayName = CSTRING(moduleGroupSettings_displayName);
function = QFUNC(moduleGroupSettings); function = QFUNC(moduleGroupSettings);

View File

@ -19,7 +19,7 @@
params ["_logic", "", "_activated"]; params ["_logic", "", "_activated"];
if (!_activated || !isServer) exitWith {}; if (!_activated) exitWith {};
[_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(maxRange), "maxRange"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(maxRange), "maxRange"] call EFUNC(common,readSettingFromModule);
@ -30,14 +30,14 @@ private _defaultLeadColor = _logic getVariable ["defaultLeadColor", ""];
if (_defaultLeadColor != "") then { if (_defaultLeadColor != "") then {
_defaultLeadColor = call compile ("[" + _defaultLeadColor + "]"); _defaultLeadColor = call compile ("[" + _defaultLeadColor + "]");
if (!([_defaultLeadColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultLeadColor is not a valid color array.")}; if (!([_defaultLeadColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultLeadColor is not a valid color array.")};
[QGVAR(defaultLeadColor), _defaultLeadColor, true, true] call EFUNC(common,setSetting); ["CBA_settings_setSettingMission", [QGVAR(defaultLeadColor), _defaultLeadColor, true]] call CBA_fnc_localEvent;
}; };
private _defaultColor = _logic getVariable ["defaultColor", ""]; private _defaultColor = _logic getVariable ["defaultColor", ""];
if (_defaultColor != "") then { if (_defaultColor != "") then {
_defaultColor = call compile ("[" + _defaultColor + "]"); _defaultColor = call compile ("[" + _defaultColor + "]");
if (!([_defaultColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultColor is not a valid color array.")}; if (!([_defaultColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultColor is not a valid color array.")};
[QGVAR(defaultColor), _defaultColor, true, true] call EFUNC(common,setSetting); ["CBA_settings_setSettingMission", [QGVAR(defaultColor), _defaultColor, true]] call CBA_fnc_localEvent;
}; };
INFO("Map Gestures Module Initialized."); INFO("Map Gestures Module Initialized.");

View File

@ -5,7 +5,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(Module_DisplayName); displayName = CSTRING(Module_DisplayName);
function = QFUNC(initModule); function = QFUNC(initModule);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
isSingular = 1; isSingular = 1;
icon = QPATHTOF(UI\Icon_Module_Markers_ca.paa); icon = QPATHTOF(UI\Icon_Module_Markers_ca.paa);

View File

@ -12,7 +12,7 @@ class CfgVehicles {
class ACE_Module; class ACE_Module;
class ACE_moduleMedicalSettings: ACE_Module { class ACE_moduleMedicalSettings: ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(MedicalSettings_Module_DisplayName); displayName = CSTRING(MedicalSettings_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa); icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical"; category = "ACE_medical";
@ -154,7 +154,7 @@ class CfgVehicles {
}; };
}; };
class ACE_moduleBasicMedicalSettings: ACE_Module { class ACE_moduleBasicMedicalSettings: ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(BasicMedicalSettings_Module_DisplayName); displayName = CSTRING(BasicMedicalSettings_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa); icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical"; category = "ACE_medical";
@ -196,7 +196,7 @@ class CfgVehicles {
}; };
}; };
class ACE_moduleAdvancedMedicalSettings: ACE_Module { class ACE_moduleAdvancedMedicalSettings: ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(AdvancedMedicalSettings_Module_DisplayName); displayName = CSTRING(AdvancedMedicalSettings_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa); icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical"; category = "ACE_medical";
@ -318,7 +318,7 @@ class CfgVehicles {
}; };
class ACE_moduleReviveSettings: ACE_Module { class ACE_moduleReviveSettings: ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(ReviveSettings_Module_DisplayName); displayName = CSTRING(ReviveSettings_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa); icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical"; category = "ACE_medical";
@ -362,7 +362,7 @@ class CfgVehicles {
}; };
class ACE_moduleAssignMedicRoles: Module_F { class ACE_moduleAssignMedicRoles: Module_F {
scope = 2; scope = 1;
displayName = CSTRING(AssignMedicRoles_Module_DisplayName); displayName = CSTRING(AssignMedicRoles_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa); icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical"; category = "ACE_medical";
@ -409,7 +409,7 @@ class CfgVehicles {
}; };
class ACE_moduleAssignMedicVehicle: Module_F { class ACE_moduleAssignMedicVehicle: Module_F {
scope = 2; scope = 1;
displayName = CSTRING(AssignMedicVehicle_Module_DisplayName); displayName = CSTRING(AssignMedicVehicle_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa); icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical"; category = "ACE_medical";
@ -453,7 +453,7 @@ class CfgVehicles {
}; };
class ACE_moduleAssignMedicalFacility: Module_F { class ACE_moduleAssignMedicalFacility: Module_F {
scope = 2; scope = 1;
displayName = CSTRING(AssignMedicalFacility_Module_DisplayName); displayName = CSTRING(AssignMedicalFacility_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa); icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical"; category = "ACE_medical";

View File

@ -3,13 +3,13 @@ class CfgVehicles {
class ACE_Module; class ACE_Module;
class ACE_moduleMedicalMenuSettings: ACE_Module { class ACE_moduleMedicalMenuSettings: ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(module_DisplayName); displayName = CSTRING(module_DisplayName);
icon = QPATHTOEF(medical,UI\Icon_Module_Medical_ca.paa); icon = QPATHTOEF(medical,UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical"; category = "ACE_medical";
function = QUOTE(DFUNC(module)); function = QUOTE(DFUNC(module));
functionPriority = 1; functionPriority = 1;
isGlobal = 0; isGlobal = 1;
isSingular = 1; isSingular = 1;
isTriggerActivated = 0; isTriggerActivated = 0;
author = ECSTRING(common,ACETeam); author = ECSTRING(common,ACETeam);

View File

@ -36,8 +36,8 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(Module_DisplayName); displayName = CSTRING(Module_DisplayName);
function = QFUNC(moduleMapFill); function = QFUNC(moduleMapFill);
scope = 2; scope = 1;
isGlobal = 0; isGlobal = 1;
isSingular = 1; isSingular = 1;
icon = QPATHTOF(UI\Icon_Module_microDAGR_ca.paa); icon = QPATHTOF(UI\Icon_Module_microDAGR_ca.paa);
functionPriority = 0; functionPriority = 0;

View File

@ -15,7 +15,6 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
if !(isServer) exitWith {};
params ["_logic"]; params ["_logic"];
[_logic, QGVAR(MapDataAvailable), "MapDataAvailable"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(MapDataAvailable), "MapDataAvailable"] call EFUNC(common,readSettingFromModule);

View File

@ -99,8 +99,8 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(Module_DisplayName); displayName = CSTRING(Module_DisplayName);
function = QFUNC(moduleInit); function = QFUNC(moduleInit);
scope = 2; scope = 1;
isGlobal = 0; isGlobal = 1;
isSingular = 1; isSingular = 1;
icon = QPATHTOF(UI\Icon_Module_mk6_ca.paa); icon = QPATHTOF(UI\Icon_Module_mk6_ca.paa);
functionPriority = 0; functionPriority = 0;

View File

@ -20,7 +20,6 @@
params ["_logic", "_syncedUnits", "_activated"]; params ["_logic", "_syncedUnits", "_activated"];
if (!_activated) exitWith {WARNING("Module - placed but not active");}; if (!_activated) exitWith {WARNING("Module - placed but not active");};
if (!isServer) exitWith {};
[_logic, QGVAR(airResistanceEnabled), "airResistanceEnabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(airResistanceEnabled), "airResistanceEnabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(allowComputerRangefinder), "allowComputerRangefinder"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(allowComputerRangefinder), "allowComputerRangefinder"] call EFUNC(common,readSettingFromModule);

View File

@ -39,6 +39,7 @@
}; };
if (_isDisposable) then { if (_isDisposable) then {
if (_isGlobal) then {WARNING_1("Deleting Global Module??? [%1]",_logicType);};
deleteVehicle _logic; deleteVehicle _logic;
}; };
}; };

View File

@ -5,7 +5,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(Module_DisplayName); displayName = CSTRING(Module_DisplayName);
function = QFUNC(moduleNameTags); function = QFUNC(moduleNameTags);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
isSingular = 1; isSingular = 1;
icon = QPATHTOF(UI\Icon_Module_NameTags_ca.paa); icon = QPATHTOF(UI\Icon_Module_NameTags_ca.paa);

View File

@ -16,8 +16,6 @@
#include "script_component.hpp" #include "script_component.hpp"
if !(isServer) exitWith {};
params ["_logic", "", "_activated"]; params ["_logic", "", "_activated"];
if !(_activated) exitWith {}; if !(_activated) exitWith {};

View File

@ -17,7 +17,7 @@ class CfgVehicles {
class ACE_Module; class ACE_Module;
class GVAR(ModuleSettings): ACE_Module { class GVAR(ModuleSettings): ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(Module_DisplayName); displayName = CSTRING(Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_ca.paa); icon = QPATHTOF(UI\Icon_Module_ca.paa);
category = "ACE"; category = "ACE";

View File

@ -1,7 +1,7 @@
class CfgVehicles { class CfgVehicles {
class ACE_Module; class ACE_Module;
class ACE_moduleAllowConfigExport: ACE_Module { class ACE_moduleAllowConfigExport: ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(AllowConfigExport_Module_DisplayName); displayName = CSTRING(AllowConfigExport_Module_DisplayName);
//icon = ""; //icon = "";
category = "ACE"; category = "ACE";

View File

@ -17,4 +17,9 @@ GVAR(serverSideValues) = [];
GVAR(categories) = []; GVAR(categories) = [];
GVAR(currentCategorySelection) = 0; GVAR(currentCategorySelection) = 0;
if (hasInterface) then {
[[format ["ACE3 %1", localize LSTRING(DumpDebug)], localize LSTRING(DumpDebugTooltip)], QGVAR(MainMenuHelperDumpDebug)] call CBA_fnc_addPauseMenuOption;
[[format ["ACE3 %1", localize LSTRING(headBugFix)], localize LSTRING(headBugFixTooltip)], QGVAR(MainMenuHelperHeadBugFix)] call CBA_fnc_addPauseMenuOption;
};
ADDON = true; ADDON = true;

View File

@ -23,13 +23,12 @@ class CfgAddons {
}; };
#include "CfgEventHandlers.hpp" #include "CfgEventHandlers.hpp"
#include "gui\define.hpp"
#include "gui\settingsMenu.hpp"
#include "gui\pauseMenu.hpp"
#include "CfgVehicles.hpp" #include "CfgVehicles.hpp"
#include "ACE_Settings.hpp" #include "ACE_Settings.hpp"
#include "gui\mainMenu.hpp"
#include "gui\pauseMenu.hpp"
class ACE_Extensions { class ACE_Extensions {
extensions[] += {"ace_clipboard"}; extensions[] += {"ace_clipboard"};
}; };

View File

@ -1,101 +0,0 @@
// define.hpp
class ACE_gui_backgroundBase;
class ACE_gui_editBase;
class ACE_gui_buttonBase;
class ACE_gui_staticBase;
class ACE_gui_listNBox;
class ACE_gui_comboBoxBase;
class RscXSliderH;
class RscControlsGroupNoScrollbars;
class RscHTML;
class RscText;
class RscControlsGroupNoHScrollbars;
class RscPicture;
class RscButtonMenu;
#ifndef ACE_DEFINE_H
#define ACE_DEFINE_H
#define true 1
#define false 0
#define CT_STATIC 0
#define CT_BUTTON 1
#define CT_EDIT 2
#define CT_SLIDER 3
#define CT_COMBO 4
#define CT_LISTBOX 5
#define CT_TOOLBOX 6
#define CT_CHECKBOXES 7
#define CT_PROGRESS 8
#define CT_HTML 9
#define CT_STATIC_SKEW 10
#define CT_ACTIVETEXT 11
#define CT_TREE 12
#define CT_STRUCTURED_TEXT 13
#define CT_CONTEXT_MENU 14
#define CT_CONTROLS_GROUP 15
#define CT_SHORTCUTBUTTON 16
#define CT_XKEYDESC 40
#define CT_XBUTTON 41
#define CT_XLISTBOX 42
#define CT_XSLIDER 43
#define CT_XCOMBO 44
#define CT_ANIMATED_TEXTURE 45
#define CT_OBJECT 80
#define CT_OBJECT_ZOOM 81
#define CT_OBJECT_CONTAINER 82
#define CT_OBJECT_CONT_ANIM 83
#define CT_LINEBREAK 98
#define CT_ANIMATED_USER 99
#define CT_MAP 100
#define CT_MAP_MAIN 101
#define CT_LISTNBOX 102
// Static styles
#define ST_POS 0x0F
#define ST_HPOS 0x03
#define ST_VPOS 0x0C
#define ST_LEFT 0x00
#define ST_RIGHT 0x01
#define ST_CENTER 0x02
#define ST_DOWN 0x04
#define ST_UP 0x08
#define ST_VCENTER 0x0c
#define ST_TYPE 0xF0
#define ST_SINGLE 0
#define ST_MULTI 16
#define ST_TITLE_BAR 32
#define ST_PICTURE 48
#define ST_FRAME 64
#define ST_BACKGROUND 80
#define ST_GROUP_BOX 96
#define ST_GROUP_BOX2 112
#define ST_HUD_BACKGROUND 128
#define ST_TILE_PICTURE 144
#define ST_WITH_RECT 160
#define ST_LINE 176
#define ST_SHADOW 0x100
#define ST_NO_RECT 0x200 // this style works for CT_STATIC in conjunction with ST_MULTI
#define ST_KEEP_ASPECT_RATIO 0x800
#define ST_TITLE ST_TITLE_BAR + ST_CENTER
// Slider styles
#define SL_DIR 0x400
#define SL_VERT 0
#define SL_HORZ 0x400
#define SL_TEXTURES 0x10
// Listbox styles
#define LB_TEXTURES 0x10
#define LB_MULTI 0x20
#endif

View File

@ -0,0 +1,77 @@
class RscControlsGroupNoHScrollbars;
class RscHTML;
class RscText;
class RscStandardDisplay;
class RscDisplayMain: RscStandardDisplay {
class controls {
class InfoMods: RscControlsGroupNoHScrollbars {
class Controls;
};
class InfoNews: InfoMods {
class Controls: Controls {
class Background;
class BackgroundIcon;
class Icon;
class News;
class Notification;
class Button;
};
};
class ACE_news_apex: InfoNews {
idc = IDC_MAIN_INFO;
y = "safezoneY + safezoneH - (3 * 2 + 1) * (pixelH * pixelGrid * 2) - 4 * (4 * pixelH)";
class Controls: Controls {
class Background: Background {};
class BackgroundIcon: BackgroundIcon {};
class Icon: Icon {
text = QPATHTOF(gui\aceMenuIcon_ca.paa);
};
class CurrentVersionInfo: RscText {
idc = IDC_MAIN_INFO_CURRENT_VERSION_INFO;
style = 1;
text = "";
sizeEx = "(pixelH * pixelGrid * 1.5)";
font = "RobotoCondensedLight";
shadow = 1;
colorBackground[] = {0,0,0,0};
x = 0;
y = 0;
w = "(10 - 1.25 * 2) * (pixelW * pixelGrid * 2)";
h = "1 * (pixelH * pixelGrid * 2)";
onLoad = "(_this select 0) ctrlenable false;";
};
class HTTPVersionInfo: RscHTML {
idc = IDC_MAIN_INFO_NEWEST_VERSION_INFO;
shadow = 0;
class H1 {
sizeEx = "(pixelH * pixelGrid * 1.5)";
font = "RobotoCondensedLight";
fontBold = "RobotoCondensedLight";
align = "right";
};
class H2: H1 {
sizeEx = "(pixelH * pixelGrid * 1.5)";
};
class P: H1 {
sizeEx = "(pixelH * pixelGrid * 1.5)";
};
x = 0;
y = "1 * (pixelH * pixelGrid * 2)";
w = "(10 - 1.25 * 2) * (pixelW * pixelGrid * 2)";
h = "1 * (pixelH * pixelGrid * 2)";
onLoad = "(_this select 0) ctrlenable false;";
};
class Button: Button {
tooltip = "Download latest and report issues:";
url = "https://github.com/acemod/ACE3/releases";
};
};
};
};
};

View File

@ -1,179 +1,13 @@
class RscDisplayEmpty;
class ACE_Open_SettingsMenu_BtnBase : ACE_gui_buttonBase { class GVAR(MainMenuHelperDumpDebug): RscDisplayEmpty {
class Attributes { onLoad = QUOTE(\
font = "RobotoCondensed"; [] call FUNC(debugDumpToClipboard);\
color = "#E5E5E5"; (_this select 0) closeDisplay 0;\
align = "left"; );
shadow = "true";
};
class AttributesImage {
font = "RobotoCondensed";
color = "#E5E5E5";
align = "left";
};
class HitZone {
left = 0.0;
top = 0.0;
right = 0.0;
bottom = 0.0;
};
class ShortcutPos {
left = 0;
top = 0;
w = 0;
h = 0;
};
class TextPos {
left = 0.01;
top = 0;
right = 0;
bottom = 0;
};
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)";
animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)";
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
color2[] = {0,0,0,1};
color[] = {1,1,1,1};
//colorBackground2[] = {0.75,0.75,0.75,1};
//colorBackground[] = {0,0,0,0.8};
colorBackground[] = {1, 0.647, 0, 0.5};
colorBackground2[] = {1, 0.647, 0, 0.5};
colorBackgroundFocused[] = {1, 1, 1, 0};
colorDisabled[] = {1,1,1,0.25};
colorFocused[] = {0,0,0,1};
colorText[] = {1,1,1,1};
//default = 0;
font = "RobotoCondensed";
idc = -1;
period = 1.2;
periodFocus = 1.2;
periodOver = 1.2;
shadow = 0;
shortcuts[] = {};
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
soundClick[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundClick",0.09,1};
soundEnter[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEnter",0.09,1};
soundEscape[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEscape",0.09,1};
soundPush[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundPush",0.09,1};
style = "0x02 + 0xC0";
text = CSTRING(OpenConfigMenu);
textureNoShortcut = "#(argb,8,8,3)color(0,0,0,0)";
tooltip = "";
tooltipColorBox[] = {1,1,1,1};
tooltipColorShade[] = {0,0,0,0.65};
tooltipColorText[] = {1,1,1,1};
type = 16;
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX)";
y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY";
w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
action = "(findDisplay 49) closeDisplay 0; createDialog 'ACE_settingsMenu';";
}; };
class GVAR(MainMenuHelperHeadBugFix): RscDisplayEmpty {
class RscStandardDisplay; onLoad = QUOTE(\
class RscDisplayMPInterrupt: RscStandardDisplay { 0 spawn EFUNC(common,headBugFix);\
class controls { (_this select 0) closeDisplay 0;\
class ACE_Open_settingsMenu_Btn: ACE_Open_SettingsMenu_BtnBase {}; );
};
};
class RscDisplayInterruptEditorPreview: RscStandardDisplay {
class controls {
class ACE_Open_settingsMenu_Btn: ACE_Open_SettingsMenu_BtnBase {};
};
};
class RscDisplayInterrupt: RscStandardDisplay {
class controls {
class ACE_Open_settingsMenu_Btn: ACE_Open_SettingsMenu_BtnBase {};
};
};
class RscDisplayInterruptEditor3D: RscStandardDisplay {
class controls {
class ACE_Open_settingsMenu_Btn: ACE_Open_SettingsMenu_BtnBase {};
};
};
class RscDisplayMovieInterrupt: RscStandardDisplay {
class controls {
class ACE_Open_settingsMenu_Btn: ACE_Open_SettingsMenu_BtnBase {};
};
};
class RscDisplayMain: RscStandardDisplay {
class controls {
class InfoMods: RscControlsGroupNoHScrollbars {
class Controls;
};
class InfoNews: InfoMods {
class Controls: Controls {
class Background;
class BackgroundIcon;
class Icon;
class News;
class Notification;
class Button;
};
};
class ACE_news_apex: InfoNews {
idc = IDC_MAIN_INFO;
y = "safezoneY + safezoneH - (3 * 2 + 1) * (pixelH * pixelGrid * 2) - 4 * (4 * pixelH)";
class Controls: Controls {
class Background: Background {};
class BackgroundIcon: BackgroundIcon {};
class Icon: Icon {
text = QPATHTOF(gui\aceMenuIcon_ca.paa);
};
class CurrentVersionInfo: RscText {
idc = IDC_MAIN_INFO_CURRENT_VERSION_INFO;
style = 1;
text = "";
sizeEx = "(pixelH * pixelGrid * 1.5)";
font = "RobotoCondensedLight";
shadow = 1;
colorBackground[] = {0,0,0,0};
x = 0;
y = 0;
w = "(10 - 1.25 * 2) * (pixelW * pixelGrid * 2)";
h = "1 * (pixelH * pixelGrid * 2)";
onLoad = "(_this select 0) ctrlenable false;";
};
class HTTPVersionInfo: RscHTML {
idc = IDC_MAIN_INFO_NEWEST_VERSION_INFO;
shadow = 0;
class H1 {
sizeEx = "(pixelH * pixelGrid * 1.5)";
font = "RobotoCondensedLight";
fontBold = "RobotoCondensedLight";
align = "right";
};
class H2: H1 {
sizeEx = "(pixelH * pixelGrid * 1.5)";
};
class P: H1 {
sizeEx = "(pixelH * pixelGrid * 1.5)";
};
x = 0;
y = "1 * (pixelH * pixelGrid * 2)";
w = "(10 - 1.25 * 2) * (pixelW * pixelGrid * 2)";
h = "1 * (pixelH * pixelGrid * 2)";
onLoad = "(_this select 0) ctrlenable false;";
};
class Button: Button {
tooltip = "Download latest and report issues:";
url = "https://github.com/acemod/ACE3/releases";
};
};
};
};
}; };

View File

@ -1,487 +0,0 @@
#define SIZEX (((safezoneW / safezoneH) min 1.2))
#define SIZEY (SIZEX / 1.2)
#define X_ORIGINAL(num) (num * (SIZEX / 40) + (safezoneX + (safezoneW - SIZEX)/2))
#define Y_ORIGINAL(num) (num * (SIZEY / 25) + (safezoneY + (safezoneH - (SIZEX / 1.2))/2))
#define W_ORIGINAL(num) (num * (SIZEX / 40))
#define H_ORIGINAL(num) (num * (SIZEY / 25))
#define X_MAKEITBIGGA(num) (num * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2))
#define Y_MAKEITBIGGA(num) (num * (safeZoneH / 30) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2))
#define W_MAKEITBIGGA(num) (num * (safeZoneH / 40))
#define H_MAKEITBIGGA(num) (num * (safeZoneH / 30))
#define X_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(optionMenuDisplaySize)), 0)]), X_ORIGINAL(num), X_MAKEITBIGGA(num))])
#define Y_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(optionMenuDisplaySize)), 0)]), Y_ORIGINAL(num), Y_MAKEITBIGGA(num))])
#define W_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(optionMenuDisplaySize)), 0)]), W_ORIGINAL(num), W_MAKEITBIGGA(num))])
#define H_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(optionMenuDisplaySize)), 0)]), H_ORIGINAL(num), H_MAKEITBIGGA(num))])
class ACE_settingsMenu {
idd = 145246;
movingEnable = false;
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_settingsMenu', _this select 0)]; [] call FUNC(onSettingsMenuOpen););
onUnload = QUOTE(uiNamespace setVariable [ARR_2('ACE_settingsMenu', nil)]; saveProfileNamespace;);
class controlsBackground {
class HeaderBackground: ACE_gui_backgroundBase {
idc = -1;
type = CT_STATIC;
x = X_PART(1);
y = Y_PART(1);
w = W_PART(38);
h = H_PART(1);
style = ST_LEFT + ST_SHADOW;
font = "RobotoCondensed";
SizeEx = H_PART(1);
colorText[] = {0.95, 0.95, 0.95, 0.75};
colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"};
text = "";
};
class CenterBackground: HeaderBackground {
y = Y_PART(2.1);
h = H_PART(2.5);
text = "";
colorText[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"};
colorBackground[] = {0,0,0,"(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"};
};
class LeftBackground: CenterBackground {
y = Y_PART(4.8);
h = H_PART(17.4);
w = W_PART(25);
};
class RightBackground: LeftBackground {
x = X_PART(26.1);
w = W_PART(12.9);
};
class RightBackgroundHeader: RightBackground {
h = H_PART(1.4);
colorBackground[] = {0,0,0,1};
};
};
class controls {
class HeaderName {
idc = 1;
type = CT_STATIC;
x = X_PART(1);
y = Y_PART(1);
w = W_PART(38);
h = H_PART(1);
style = ST_LEFT + ST_SHADOW;
font = "RobotoCondensed";
SizeEx = H_PART(1);
colorText[] = {0.95, 0.95, 0.95, 0.75};
colorBackground[] = {0,0,0,0};
text = CSTRING(OpenConfigMenu);
};
class labelSubHeader: ACE_gui_staticBase {
idc = 13;
x = X_PART(2);
y = Y_PART(3.4);
w = W_PART(15);
h = H_PART(1);
text = "";
};
class categorySelection: ACE_gui_comboBoxBase {
idc = 14;
x = X_PART(14);
y = Y_PART(3.4);
w = W_PART(9);
h = H_PART(1);
text = "";
onLBSelChanged = QUOTE( call FUNC(onCategorySelectChanged));
SizeEx = H_PART(0.9);
};
class selectionAction_1: ACE_gui_buttonBase {
idc = 1000;
text = CSTRING(TabOptions);
x = X_PART(1);
y = Y_PART(2.1);
w = W_PART(9.5);
h = H_PART(1);
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)";
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.8)";
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
color[] = {1, 1, 1, 1};
color2[] = {0,0,0, 1};
colorBackgroundFocused[] = {1,1,1,1};
colorBackground[] = {1,1,1,1};
colorbackground2[] = {1,1,1,1};
colorDisabled[] = {1,1,1,1};
colorFocused[] = {0,0,0,1};
periodFocus = 1;
periodOver = 1;
action = QUOTE([MENU_TAB_OPTIONS] call FUNC(onListBoxShowSelectionChanged););
SizeEx = H_PART(1);
Size = H_PART(1);
};
class selectionAction_2: selectionAction_1 {
idc = 1001;
text = CSTRING(TabColors);
x = X_PART(10.5);
action = QUOTE([MENU_TAB_COLORS] call FUNC(onListBoxShowSelectionChanged););
};
class selectionAction_3: selectionAction_1 {
idc = 1002;
text = "";
x = X_PART(20);
action = "";
};
class selectionAction_4: selectionAction_1 {
idc = 1003;
text = "";
x = X_PART(29.5);
action = "";
};
class listBoxSettingsList: ACE_gui_listNBox {
idc = 200;
x = X_PART(2);
y = Y_PART(5.5);
w = W_PART(23);
h = H_PART(15);
SizeEx = H_ORIGINAL(0.8);
colorBackground[] = {0, 0, 0, 0.9};
colorSelectBackground[] = {0, 0, 0, 0.9};
columns[] = {0.0, 0.6};
onLBSelChanged = QUOTE(_this call FUNC(settingsMenuUpdateKeyView));
};
class labelTitle: ACE_gui_staticBase {
idc = 250;
x = X_PART(27.1);
y = Y_PART(5.1);
w = W_PART(11);
h = H_PART(1);
text = "";
SizeEx = H_PART(1);
};
class labelKey: ACE_gui_staticBase { //Variable Name
idc = 300;
x = X_PART(27.1);
y = Y_PART(6.2);
w = W_PART(11);
h = H_PART(1);
text = "";
SizeEx = H_PART(0.65);
};
class Label2: labelKey {
idc = 301;
y = Y_PART(7.3);
text = CSTRING(Setting);
SizeEx = H_PART(1);
};
class comboBox1: ACE_gui_comboBoxBase {
idc = 400;
x = X_PART(31.1);
y = Y_PART(7.3);
w = W_PART(7);
h = H_PART(1);
onLBSelChanged = QUOTE( call FUNC(onListBoxSettingsChanged));
SizeEx = H_PART(0.9);
};
class sliderBar1: RscXSliderH {
idc = 410;
x = X_PART(27.1);
y = Y_PART(7.3);
w = W_PART(11);
h = H_PART(0.75);
onSliderPosChanged = QUOTE(_this call FUNC(onSliderPosChanged));
color[] = {1,0,0,0.4};
colorActive[] = {1,0,0,1};
};
class sliderBar2: sliderBar1 {
idc = 411;
y = Y_PART(8.2);
color[] = {0,1,0,0.4};
colorActive[] = {0,1,0,1};
};
class sliderBar3: sliderBar1 {
idc = 412;
y = Y_PART(9.1);
color[] = {0,0,1,0.4};
colorActive[] = {0,0,1,1};
};
class sliderBar4: sliderBar1 {
idc = 413;
y = Y_PART(10);
color[] = {1,1,1,0.4};
colorActive[] = {1,1,1,1};
};
class labelDesc: ACE_gui_staticBase {
idc = 251;
x = X_PART(27.1);
y = Y_PART(11);
w = W_PART(11);
h = H_PART(11);
text = "";
style = ST_LEFT + ST_MULTI;
lineSpacing = 1;
SizeEx = H_PART(0.8);
};
class actionClose: ACE_gui_buttonBase {
idc = 10;
text = "$STR_DISP_CLOSE";
x = X_PART(1);
y = Y_PART(22.3);
w = W_PART(7.5);
h = H_PART(1);
style = ST_LEFT;
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.8)";
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.5)";
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
color[] = {1, 1, 1, 1};
color2[] = {0,0,0, 1};
colorBackgroundFocused[] = {1,1,1,1};
colorBackground[] = {1,1,1,1};
colorbackground2[] = {1,1,1,1};
colorDisabled[] = {0.5,0.5,0.5,0.8};
colorFocused[] = {0,0,0,1};
periodFocus = 1;
periodOver = 1;
action = "closedialog 0;";
SizeEx = H_PART(1);
Size = H_PART(1);
};
class action_reset: actionClose {
idc = 1100;
text = CSTRING(ResetAll);
x = X_PART(9.5);
action = QUOTE([] call FUNC(resetSettings));
};
class action_exportServerConfig: actionClose {
idc = 1102;
text = CSTRING(OpenExport);
x = X_PART(18);
action = QUOTE(if (GVAR(serverConfigGeneration) > 0) then {closeDialog 0; createDialog 'ACE_serverSettingsMenu';});
};
class action_debug: actionClose {
idc = 1102;
text = CSTRING(DumpDebug);
x = X_PART(26.1);
action = QUOTE([] call FUNC(debugDumpToClipboard));
tooltip = CSTRING(DumpDebugTooltip);
};
class action_headBugFix: actionClose {
idc = 1102;
text = CSTRING(headBugFix);
x = X_PART(34);
w = W_PART(5);
action = QUOTE(0 spawn EFUNC(common,headBugFix); closedialog 0;);
tooltip = CSTRING(headBugFixTooltip);
};
};
};
class ACE_serverSettingsMenu: ACE_settingsMenu {
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_serverSettingsMenu', _this select 0)]; [] call FUNC(onServerSettingsMenuOpen););
onUnload = QUOTE(uiNamespace setVariable [ARR_2('ACE_serverSettingsMenu', nil)];);
class controls: controls {
class HeaderName {
idc = 1;
type = CT_STATIC;
x = X_PART(1);
y = Y_PART(1);
w = W_PART(38);
h = H_PART(1);
style = ST_LEFT + ST_SHADOW;
font = "RobotoCondensed";
SizeEx = H_PART(1);
colorText[] = {0.95, 0.95, 0.95, 0.75};
colorBackground[] = {0,0,0,0};
text = CSTRING(OpenConfigMenu);
};
class labelSubHeader: ACE_gui_staticBase {
idc = 13;
x = X_PART(2);
y = Y_PART(3.4);
w = W_PART(30);
h = H_PART(1);
text = "";
};
class categorySelection: ACE_gui_comboBoxBase {
idc = 14;
x = X_PART(14);
y = Y_PART(3.4);
w = W_PART(9);
h = H_PART(1);
text = "";
onLBSelChanged = QUOTE( call FUNC(onServerCategorySelectChanged));
SizeEx = H_PART(0.9);
};
class selectionAction_1: ACE_gui_buttonBase {
idc = 1000;
text = CSTRING(TabOptions);
x = X_PART(1);
y = Y_PART(2.1);
w = W_PART(9.5);
h = H_PART(1);
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)";
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.8)";
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
color[] = {1, 1, 1, 1};
color2[] = {0,0,0, 1};
colorBackgroundFocused[] = {1,1,1,1};
colorBackground[] = {1,1,1,1};
colorbackground2[] = {1,1,1,1};
colorDisabled[] = {1,1,1,1};
colorFocused[] = {0,0,0,1};
periodFocus = 1;
periodOver = 1;
action = QUOTE([MENU_TAB_SERVER_OPTIONS] call FUNC(onServerListBoxShowSelectionChanged););
};
class selectionAction_2: selectionAction_1 {
idc = 1001;
text = CSTRING(TabColors);
x = X_PART(10.5);
action = QUOTE([MENU_TAB_SERVER_COLORS] call FUNC(onServerListBoxShowSelectionChanged););
};
class selectionAction_3: selectionAction_1 {
idc = 1002;
text = CSTRING(TabValues);
x = X_PART(20);
action = QUOTE([MENU_TAB_SERVER_VALUES] call FUNC(onServerListBoxShowSelectionChanged););
};
class selectionAction_4: selectionAction_1 {
idc = 1003;
text = "";
x = X_PART(29.5);
action = "";
};
class listBoxSettingsList: ACE_gui_listNBox {
idc = 200;
x = X_PART(2);
y = Y_PART(5.5);
w = W_PART(23);
h = H_PART(15);
SizeEx = H_ORIGINAL(0.8);
colorBackground[] = {0, 0, 0, 0.9};
colorSelectBackground[] = {0, 0, 0, 0.9};
columns[] = {0.0, 0.6};
onLBSelChanged = QUOTE(_this call FUNC(serverSettingsMenuUpdateKeyView));
};
class labelTitle: ACE_gui_staticBase {
idc = 250;
x = X_PART(27.1);
y = Y_PART(5.1);
w = W_PART(11);
h = H_PART(1);
text = "";
SizeEx = H_PART(1);
};
class labelKey: ACE_gui_staticBase { //Variable Name
idc = 300;
x = X_PART(27.1);
y = Y_PART(6.2);
w = W_PART(11);
h = H_PART(1);
text = "";
SizeEx = H_PART(0.65);
};
class Label2: labelKey {
idc = 301;
y = Y_PART(7.3);
text = CSTRING(Setting);
SizeEx = H_PART(1);
};
class comboBox1: ACE_gui_comboBoxBase {
idc = 400;
x = X_PART(31.1);
y = Y_PART(7.3);
w = W_PART(7);
h = H_PART(1);
onLBSelChanged = QUOTE( call FUNC(onListBoxSettingsChanged));
SizeEx = H_PART(0.9);
};
class sliderBar1: RscXSliderH {
idc = 410;
x = X_PART(27.1);
y = Y_PART(7.3);
w = W_PART(11);
h = H_PART(0.75);
onSliderPosChanged = QUOTE(_this call FUNC(onSliderPosChanged));
color[] = {1,0,0,0.4};
colorActive[] = {1,0,0,1};
};
class sliderBar2: sliderBar1 {
idc = 411;
y = Y_PART(8.2);
color[] = {0,1,0,0.4};
colorActive[] = {0,1,0,1};
};
class sliderBar3: sliderBar1 {
idc = 412;
y = Y_PART(9.1);
color[] = {0,0,1,0.4};
colorActive[] = {0,0,1,1};
};
class sliderBar4: sliderBar1 {
idc = 413;
y = Y_PART(10);
color[] = {1,1,1,0.4};
colorActive[] = {1,1,1,1};
};
class inputField1: ACE_gui_editBase {
idc = 414;
x = X_PART(27.1);
y = Y_PART(7.3);
w = W_PART(11);
h = H_PART(0.75);
};
class inputFieldTypeLabel: ACE_gui_staticBase {
idc = 415;
x = X_PART(27.1);
y = Y_PART(8.2);
w = W_PART(11);
h = H_PART(0.75);
text = "";
style = ST_LEFT + ST_MULTI;
lineSpacing = 1;
SizeEx = H_PART(0.8);
};
class saveInputButton: selectionAction_1 {
idc = 416;
text = CSTRING(SaveInput);
x = X_PART(27.1);
y = Y_PART(9.1);
w = W_PART(11);
h = H_PART(1);
action = QUOTE([] call FUNC(onServerSaveInputField););
};
class labelDesc: ACE_gui_staticBase {
idc = 251;
x = X_PART(27.1);
y = Y_PART(11);
w = W_PART(11);
h = H_PART(11);
text = "";
style = ST_LEFT + ST_MULTI;
lineSpacing = 1;
SizeEx = H_PART(0.8);
};
class actionClose;
class action_reset: actionClose {
idc = 1100;
text = CSTRING(ResetAll);
x = X_PART(26.1);
action = QUOTE([] call FUNC(serverResetSettings));
};
class action_exportServerConfig: actionClose {
idc = 1101;
text = CSTRING(Export);
x = X_PART(1);
action = QUOTE([] call FUNC(exportSettings));
};
class action_toggleIncludeClientSettings: actionClose {
idc = 1102;
text = CSTRING(inClientSettings);
x = X_PART(9);
action = QUOTE([] call FUNC(toggleIncludeClientSettings));
};
};
};

View File

@ -5,7 +5,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(Category); displayName = CSTRING(Category);
function = QFUNC(moduleInit); function = QFUNC(moduleInit);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
isTriggerActivated = 0; isTriggerActivated = 0;
isDisposable = 0; isDisposable = 0;

View File

@ -17,13 +17,13 @@ class CBA_Extended_EventHandlers;
class CfgVehicles { class CfgVehicles {
class ACE_Module; class ACE_Module;
class ACE_moduleRearmSettings: ACE_Module { class ACE_moduleRearmSettings: ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(RearmSettings_Module_DisplayName); displayName = CSTRING(RearmSettings_Module_DisplayName);
icon = QPATHTOF(ui\icon_module_rearm.paa); icon = QPATHTOF(ui\icon_module_rearm.paa);
category = "ACE_Logistics"; category = "ACE_Logistics";
function = QFUNC(moduleRearmSettings); function = QFUNC(moduleRearmSettings);
functionPriority = 1; functionPriority = 1;
isGlobal = 0; isGlobal = 1;
isTriggerActivated = 0; isTriggerActivated = 0;
author = ECSTRING(common,ACETeam); author = ECSTRING(common,ACETeam);
class Arguments { class Arguments {

View File

@ -46,13 +46,13 @@ class CBA_Extended_EventHandlers;
class CfgVehicles { class CfgVehicles {
class ACE_Module; class ACE_Module;
class ACE_moduleRefuelSettings: ACE_Module { class ACE_moduleRefuelSettings: ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(RefuelSettings_Module_DisplayName); displayName = CSTRING(RefuelSettings_Module_DisplayName);
icon = QPATHTOF(ui\icon_module_refuel.paa); icon = QPATHTOF(ui\icon_module_refuel.paa);
category = "ACE_Logistics"; category = "ACE_Logistics";
function = QFUNC(moduleRefuelSettings); function = QFUNC(moduleRefuelSettings);
functionPriority = 1; functionPriority = 1;
isGlobal = 0; isGlobal = 1;
isTriggerActivated = 0; isTriggerActivated = 0;
author = ECSTRING(common,ACETeam); author = ECSTRING(common,ACETeam);
class Arguments { class Arguments {

View File

@ -20,7 +20,7 @@ class CBA_Extended_EventHandlers_base;
class CfgVehicles { class CfgVehicles {
class ACE_Module; class ACE_Module;
class ACE_moduleRepairSettings: ACE_Module { class ACE_moduleRepairSettings: ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(moduleName); displayName = CSTRING(moduleName);
icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa); icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa);
category = "ACE_Logistics"; category = "ACE_Logistics";
@ -118,7 +118,7 @@ class CfgVehicles {
class Module_F; class Module_F;
class ACE_moduleAssignEngineerRoles: Module_F { class ACE_moduleAssignEngineerRoles: Module_F {
scope = 2; scope = 1;
displayName = CSTRING(AssignEngineerRole_Module_DisplayName); displayName = CSTRING(AssignEngineerRole_Module_DisplayName);
icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa); icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa);
category = "ACE_Logistics"; category = "ACE_Logistics";
@ -162,7 +162,7 @@ class CfgVehicles {
}; };
}; };
class ACE_moduleAssignRepairVehicle: Module_F { class ACE_moduleAssignRepairVehicle: Module_F {
scope = 2; scope = 1;
displayName = CSTRING(AssignRepairVehicle_Module_DisplayName); displayName = CSTRING(AssignRepairVehicle_Module_DisplayName);
icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa); icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa);
category = "ACE_Logistics"; category = "ACE_Logistics";

View File

@ -17,8 +17,6 @@
params ["_logic"]; params ["_logic"];
if (!isServer) exitWith {};
[_logic, QGVAR(engineerSetting_Repair), "engineerSetting_Repair"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(engineerSetting_Repair), "engineerSetting_Repair"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(engineerSetting_Wheel), "engineerSetting_Wheel"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(engineerSetting_Wheel), "engineerSetting_Wheel"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(consumeItem_ToolKit), "consumeItem_ToolKit"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(consumeItem_ToolKit), "consumeItem_ToolKit"] call EFUNC(common,readSettingFromModule);

View File

@ -7,8 +7,8 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(Module_DisplayName); displayName = CSTRING(Module_DisplayName);
function = QFUNC(module); function = QFUNC(module);
scope = 2; scope = 1;
isGlobal = 0; isGlobal = 1;
icon = QPATHTOF(UI\Icon_Module_Respawn_ca.paa); icon = QPATHTOF(UI\Icon_Module_Respawn_ca.paa);
class Arguments { class Arguments {
@ -37,7 +37,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(FriendlyFire_Module_DisplayName); displayName = CSTRING(FriendlyFire_Module_DisplayName);
function = QFUNC(moduleFriendlyFire); function = QFUNC(moduleFriendlyFire);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
icon = QPATHTOF(UI\Icon_Module_FriendlyFire_ca.paa); icon = QPATHTOF(UI\Icon_Module_FriendlyFire_ca.paa);
@ -52,7 +52,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(Rallypoint_Module_DisplayName); displayName = CSTRING(Rallypoint_Module_DisplayName);
function = QFUNC(moduleRallypoint); function = QFUNC(moduleRallypoint);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
icon = QPATHTOF(UI\Icon_Module_Rallypoint_ca.paa); icon = QPATHTOF(UI\Icon_Module_Rallypoint_ca.paa);

View File

@ -18,7 +18,7 @@ class CfgVehicles {
}; };
class ACE_Module; class ACE_Module;
class GVAR(ModuleSettings): ACE_Module { class GVAR(ModuleSettings): ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(DisplayName); displayName = CSTRING(DisplayName);
//icon = ""; // needs an icon //icon = ""; // needs an icon
category = "ACE"; category = "ACE";

View File

@ -5,7 +5,7 @@ class CfgVehicles {
category = "ACE_missionModules"; category = "ACE_missionModules";
displayName = CSTRING(DisplayName); displayName = CSTRING(DisplayName);
function = QFUNC(moduleInit); function = QFUNC(moduleInit);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
isTriggerActivated = 0; isTriggerActivated = 0;
isDisposable = 0; isDisposable = 0;

View File

@ -1,7 +1,7 @@
class CfgVehicles { class CfgVehicles {
class ACE_Module; class ACE_Module;
class GVAR(moduleSettings): ACE_Module { class GVAR(moduleSettings): ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(Settings_DisplayName); displayName = CSTRING(Settings_DisplayName);
icon = QPATHTOF(data\Icon_Module_Spectator_ca.paa); icon = QPATHTOF(data\Icon_Module_Spectator_ca.paa);
category = "ACE"; category = "ACE";

View File

@ -5,7 +5,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(Module_DisplayName); displayName = CSTRING(Module_DisplayName);
function = FUNC(module); function = FUNC(module);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
icon = QPATHTOF(UI\Icon_Module_SwitchUnits_ca.paa); icon = QPATHTOF(UI\Icon_Module_SwitchUnits_ca.paa);
class Arguments { class Arguments {

View File

@ -17,8 +17,6 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
if !(isServer) exitWith {};
params ["_logic", "_units", "_activated"]; params ["_logic", "_units", "_activated"];
if !(_activated) exitWith {}; if !(_activated) exitWith {};
@ -33,6 +31,6 @@ GVAR(Module) = true;
[_logic, QGVAR(EnableSafeZone), "EnableSafeZone"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(EnableSafeZone), "EnableSafeZone"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(SafeZoneRadius), "SafeZoneRadius"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(SafeZoneRadius), "SafeZoneRadius"] call EFUNC(common,readSettingFromModule);
[QGVAR(EnableSwitchUnits), true, false, true] call EFUNC(common,setSetting); ["CBA_settings_setSettingMission", [QGVAR(EnableSwitchUnits), true, true]] call CBA_fnc_localEvent;
INFO("SwitchUnits Module Initialized."); INFO("SwitchUnits Module Initialized.");

View File

@ -5,7 +5,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(Tagging); displayName = CSTRING(Tagging);
function = QFUNC(moduleInit); function = QFUNC(moduleInit);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
icon = QPATHTOF(UI\Icon_Module_Tagging_ca.paa); icon = QPATHTOF(UI\Icon_Module_Tagging_ca.paa);
class Arguments { class Arguments {

View File

@ -17,8 +17,6 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
if (!isServer) exitWith {};
params ["_logic", "", "_activated"]; params ["_logic", "", "_activated"];
if (!_activated) exitWith {}; if (!_activated) exitWith {};

View File

@ -5,7 +5,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(ModuleName); displayName = CSTRING(ModuleName);
function = QFUNC(moduleInit); function = QFUNC(moduleInit);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
icon = QUOTE(PATHTOF(UI\Icon_Module_UI_ca.paa)); icon = QUOTE(PATHTOF(UI\Icon_Module_UI_ca.paa));
class Arguments { class Arguments {

View File

@ -17,8 +17,6 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
if (!isServer) exitWith {};
params ["_logic", "_units", "_activated"]; params ["_logic", "_units", "_activated"];
if (!_activated) exitWith {}; if (!_activated) exitWith {};

View File

@ -82,8 +82,8 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(Module_DisplayName); displayName = CSTRING(Module_DisplayName);
function = QFUNC(moduleInit); function = QFUNC(moduleInit);
scope = 2; scope = 1;
isGlobal = 0; isGlobal = 1;
isSingular = 1; isSingular = 1;
icon = QPATHTOF(UI\Icon_Module_VehicleLock_ca.paa); icon = QPATHTOF(UI\Icon_Module_VehicleLock_ca.paa);
functionPriority = 0; functionPriority = 0;
@ -121,7 +121,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
displayName = CSTRING(VehicleKeyAssign_Module_DisplayName); displayName = CSTRING(VehicleKeyAssign_Module_DisplayName);
function = QFUNC(moduleSync); function = QFUNC(moduleSync);
scope = 2; scope = 1;
isGlobal = 0; isGlobal = 0;
icon = QPATHTOF(UI\Icon_Module_VehicleKey_ca.paa); icon = QPATHTOF(UI\Icon_Module_VehicleKey_ca.paa);
functionPriority = 0; functionPriority = 0;

View File

@ -17,8 +17,6 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
if (!isServer) exitWith {};
params ["_logic", "_syncedUnits", "_activated"]; params ["_logic", "_syncedUnits", "_activated"];
TRACE_3("params",_logic,_syncedUnits,_activated); TRACE_3("params",_logic,_syncedUnits,_activated);

View File

@ -5,7 +5,7 @@ class CfgVehicles {
category = "ACE"; category = "ACE";
function = QUOTE(DFUNC(initModule)); function = QUOTE(DFUNC(initModule));
displayName = CSTRING(Module_DisplayName); displayName = CSTRING(Module_DisplayName);
scope = 2; scope = 1;
isGlobal = 1; isGlobal = 1;
isSingular = 1; isSingular = 1;
//icon = ""; // needs an icon //icon = ""; // needs an icon

View File

@ -18,8 +18,6 @@
#include "script_component.hpp" #include "script_component.hpp"
if (!isServer) exitWith {};
params ["_logic", "_units", "_activated"]; params ["_logic", "_units", "_activated"];
if (!_activated) exitWith { if (!_activated) exitWith {

View File

@ -1,7 +1,7 @@
class CfgVehicles { class CfgVehicles {
class ACE_Module; class ACE_Module;
class GVAR(ModuleSettings): ACE_Module { class GVAR(ModuleSettings): ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(Module_DisplayName); displayName = CSTRING(Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Wind_ca.paa); icon = QPATHTOF(UI\Icon_Module_Wind_ca.paa);
category = "ACE"; category = "ACE";

View File

@ -1,7 +1,7 @@
class CfgVehicles { class CfgVehicles {
class ACE_Module; class ACE_Module;
class GVAR(ModuleSettings): ACE_Module { class GVAR(ModuleSettings): ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(windDeflection_DisplayName); displayName = CSTRING(windDeflection_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Wind_ca.paa); icon = QPATHTOF(UI\Icon_Module_Wind_ca.paa);
category = "ACE"; category = "ACE";
@ -41,4 +41,4 @@ class CfgVehicles {
description = CSTRING(windDeflection_Description); description = CSTRING(windDeflection_Description);
}; };
}; };
}; };

View File

@ -16,7 +16,7 @@ class CfgVehicles {
function = QFUNC(bi_moduleRemoteControl); function = QFUNC(bi_moduleRemoteControl);
}; };
class GVAR(moduleSettings): ACE_Module { class GVAR(moduleSettings): ACE_Module {
scope = 2; scope = 1;
displayName = CSTRING(Settings_DisplayName); displayName = CSTRING(Settings_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Zeus_Settings_ca.paa); icon = QPATHTOF(UI\Icon_Module_Zeus_Settings_ca.paa);
category = "ACE"; category = "ACE";

View File

@ -12,6 +12,11 @@ version:
patch: 0 patch: 0
--- ---
<div class="panel callout">
<h5>Note:</h5>
<p>Deprecated and replaced with <a href="https://github.com/CBATeam/CBA_A3/wiki/CBA-Settings-System">CBA Settings System</a> in 3.12.0!</p>
</div>
ACE3 contains an extensive settings framework that allows you to tweak the modification without having to mess around with deleting PBOs. These settings are all handled server side and broadcasted to the clients connecting to that server. This ensures that everyone playing on the server will have a uniform experience. ACE3 contains an extensive settings framework that allows you to tweak the modification without having to mess around with deleting PBOs. These settings are all handled server side and broadcasted to the clients connecting to that server. This ensures that everyone playing on the server will have a uniform experience.
Part of this settings framework are global settings and client settings. Both use the same underlaying framework, with the difference that client settings can be adjusted by clients, where global settings can not. Part of this settings framework are global settings and client settings. Both use the same underlaying framework, with the difference that client settings can be adjusted by clients, where global settings can not.