diff --git a/addons/core/CfgEventHandlers.hpp b/addons/core/CfgEventHandlers.hpp
index 5f98d12f50..f6a948e941 100644
--- a/addons/core/CfgEventHandlers.hpp
+++ b/addons/core/CfgEventHandlers.hpp
@@ -16,14 +16,14 @@ class Extended_PostInit_EventHandlers {
class Extended_InitPost_EventHandlers {
class All {
class GVAR(executePersistent) {
- init = QUOTE([_this select 0] call GVAR(fnc_executePersistent) );
+ init = QUOTE([_this select 0] call FUNC(executePersistent) );
};
};
class CAManBase {
class GVAR(setName) {
init = QUOTE(if (local (_this select 0)) then { _this call FUNC(setName) }; );
};
- class AGM_Core_forceWalk {
+ class GVAR(forceWalk) {
init = QUOTE(if (local (_this select 0)) then { _this call FUNC(applyForceWalkStatus); }; );
};
};
@@ -32,10 +32,10 @@ class Extended_InitPost_EventHandlers {
class Extended_Respawn_EventHandlers {
class All {
class GVAR(restoreVariablesJIP) {
- respawn = QUOTE(_this call GVAR(fnc_restoreVariablesJIP) );
+ respawn = QUOTE(_this call FUNC(restoreVariablesJIP) );
};
class GVAR(setName) {
- respawn = QUOTE(_this call GVAR(fnc_setName) );
+ respawn = QUOTE(_this call FUNC(setName) );
};
};
};
\ No newline at end of file
diff --git a/addons/core/CfgFunctions.hpp b/addons/core/CfgFunctions.hpp
index fb0c345731..1dba4f856d 100644
--- a/addons/core/CfgFunctions.hpp
+++ b/addons/core/CfgFunctions.hpp
@@ -126,7 +126,7 @@ class CfgFunctions {
};
class AGM_Debug {
class AGM_Debug {
- file = "AGM_Core\functions\Debug";
+ file = PATHTOF(functions\Debug);
class exportConfig;
class getChildren;
class getDisplayConfigName;
@@ -139,7 +139,7 @@ class CfgFunctions {
};
class AGM_CuratorFix {
class AGM_CuratorFix {
- file = "AGM_Core\functions\CuratorFix";
+ file = PATHTOF(functions\CuratorFix);
class addUnloadEventhandler;
class fixCrateContent;
};
diff --git a/addons/core/CfgSounds.hpp b/addons/core/CfgSounds.hpp
index 458b2c16fb..3b7f0b091d 100644
--- a/addons/core/CfgSounds.hpp
+++ b/addons/core/CfgSounds.hpp
@@ -1,7 +1,7 @@
class CfgSounds {
class AGM_Sound_Click {
- sound[] = {"\AGM_Core\sounds\AGM_click.wav", 1, 1, 200};
+ sound[] = {PATHTOF(sounds\AGM_click.wav), 1, 1, 200};
titles[] = {};
};
};
\ No newline at end of file
diff --git a/addons/core/CfgVehicles.hpp b/addons/core/CfgVehicles.hpp
index 452368a143..e07e67f80b 100644
--- a/addons/core/CfgVehicles.hpp
+++ b/addons/core/CfgVehicles.hpp
@@ -32,7 +32,7 @@ class CfgVehicles {
function = "AGM_Core_fnc_moduleCheckPBOs";
scope = 2;
isGlobal = 1;
- icon = "\AGM_Core\UI\IconCheckPBO_ca.paa";
+ icon = PATHTOF(UI\IconCheckPBO_ca.paa);
class Arguments {
class Action {
displayName = "Action";
diff --git a/addons/core/MenuConfig.hpp b/addons/core/MenuConfig.hpp
index 2907029b43..4e813ecc85 100644
--- a/addons/core/MenuConfig.hpp
+++ b/addons/core/MenuConfig.hpp
@@ -366,7 +366,7 @@ class AGM_Core_OptionsMenu_Dialog {
idc = 300;
//type = 0;
style = 48;
- text = "\AGM_Core\UI\box_unchecked_ca.paa";
+ text = PATHTOF(UI\box_unchecked_ca.paa);
colorBackground[] = {0, 0, 0, 0};
colorText[] = {1, 1, 1, 1};
x = (HSPACE2 + 3 * 0.1) * safezoneW + safezoneX;
diff --git a/addons/core/XEH_postInit.sqf b/addons/core/XEH_postInit.sqf
index aea34f8183..622bd66bc2 100644
--- a/addons/core/XEH_postInit.sqf
+++ b/addons/core/XEH_postInit.sqf
@@ -1,11 +1,11 @@
// BWA3 Realism - Core
// (C) 2013 KoffeinFlummi. See LICENSE.
-"GVAR(remoteFnc)" addPublicVariableEventHandler {
- (_this select 1) call GVAR(fnc_execRemoteFnc);
+QGVAR(remoteFnc) addPublicVariableEventHandler {
+ (_this select 1) call FUNC(execRemoteFnc);
};
-[missionNamespace] call GVAR(fnc_executePersistent);
+[missionNamespace] call FUNC(executePersistent);
// check previous version number from profile
_currentVersion = getText (configFile >> "CfgPatches" >> "AGM_Core" >> "version");
@@ -17,22 +17,22 @@ if (_currentVersion != _previousVersion) then {
profileNamespace setVariable ["AGM_VersionNumberString", _currentVersion];
};
-0 spawn compile preprocessFileLineNumbers "\AGM_core\scripts\Version\checkVersionNumber.sqf";
+0 spawn compile preprocessFileLineNumbers PATHTOF(scripts\Version\checkVersionNumber.sqf);
// everything that only player controlled machines need, goes below this
if (!hasInterface) exitWith {};
-call compile preprocessFileLineNumbers "\AGM_core\scripts\assignedItemFix.sqf";
+call compile preprocessFileLineNumbers PATHTOF(scripts\assignedItemFix.sqf);
-GVAR(keyInput) = compile preprocessFileLineNumbers "\AGM_core\scripts\keyInput.sqf";
-GVAR(keyRelease) = compile preprocessFileLineNumbers "\AGM_core\scripts\keyRelease.sqf";
-GVAR(editKey) = compile preprocessFileLineNumbers "\AGM_core\scripts\editKey.sqf";
-GVAR(openMenu) = compile preprocessFileLineNumbers "\AGM_core\scripts\openMenu.sqf";
-GVAR(closeMenu) = compile preprocessFileLineNumbers "\AGM_core\scripts\closeMenu.sqf";
-GVAR(nextKeys) = compile preprocessFileLineNumbers "\AGM_core\scripts\nextKeys.sqf";
-GVAR(toggleState) = compile preprocessFileLineNumbers "\AGM_core\scripts\toggleState.sqf";
+GVAR(keyInput) = compile preprocessFileLineNumbers PATHTOF(scripts\keyInput.sqf);
+GVAR(keyRelease) = compile preprocessFileLineNumbers PATHTOF(scripts\keyRelease.sqf);
+GVAR(editKey) = compile preprocessFileLineNumbers PATHTOF(scripts\editKey.sqf);
+GVAR(openMenu) = compile preprocessFileLineNumbers PATHTOF(scripts\openMenu.sqf);
+GVAR(closeMenu) = compile preprocessFileLineNumbers PATHTOF(scripts\closeMenu.sqf);
+GVAR(nextKeys) = compile preprocessFileLineNumbers PATHTOF(scripts\nextKeys.sqf);
+GVAR(toggleState) = compile preprocessFileLineNumbers PATHTOF(scripts\toggleState.sqf);
-[false] call GVAR(fnc_setKeyDefault);
+[false] call FUNC(setKeyDefault);
GVAR(keyStates) = [];
GVAR(keyTimes) = [];
@@ -41,9 +41,9 @@ for "_index" from 0 to 300 do {
GVAR(keyTimes) set [_index, -1];
};
-call compile preprocessFileLineNumbers "\AGM_core\scripts\KeyInput\initCanInteractFunction.sqf";
-call compile preprocessFileLineNumbers "\AGM_core\scripts\KeyInput\initKeys.sqf";
-call compile preprocessFileLineNumbers "\AGM_core\scripts\KeyInput\initScrollWheel.sqf";
+call compile preprocessFileLineNumbers PATHTOF(scripts\KeyInput\initCanInteractFunction.sqf);
+call compile preprocessFileLineNumbers PATHTOF(scripts\KeyInput\initKeys.sqf);
+call compile preprocessFileLineNumbers PATHTOF(scripts\KeyInput\initScrollWheel.sqf);
0 spawn {
while {true} do {
@@ -51,11 +51,11 @@ call compile preprocessFileLineNumbers "\AGM_core\scripts\KeyInput\initScrollWhe
findDisplay 46 displayAddEventHandler ["KeyDown", "_this call GVAR(onKeyDown)"];
findDisplay 46 displayAddEventHandler ["KeyUp", "_this call GVAR(onKeyUp)"];
findDisplay 46 displayAddEventHandler ["MouseZChanged", "_this call GVAR(onScrollWheel)"];
- [false] call GVAR(fnc_disableUserInput);
+ [false] call FUNC(disableUserInput);
waitUntil {isNull (findDisplay 46)};
};
};
enableCamShake true;
-[missionNamespace, "playerChanged", "{if (alive (_this select 0)) then {[_this select 0] call GVAR(fnc_setName)}; if (alive (_this select 1)) then {[_this select 1] call GVAR(fnc_setName)};}"] call GVAR(fnc_addCustomEventhandler);
+[missionNamespace, "playerChanged", "{if (alive (_this select 0)) then {[_this select 0] call FUNC(setName)}; if (alive (_this select 1)) then {[_this select 1] call FUNC(setName)};}"] call FUNC(addCustomEventhandler);
diff --git a/addons/core/XEH_preInit.sqf b/addons/core/XEH_preInit.sqf
index 95329c8bfa..f117b2ffd7 100644
--- a/addons/core/XEH_preInit.sqf
+++ b/addons/core/XEH_preInit.sqf
@@ -11,7 +11,7 @@ if (hasInterface) then {
AGM_player = missionNamespace getVariable ["BIS_fnc_moduleRemoteControl_unit", player];
uiNamespace setVariable ["AGM_player", AGM_player];
- [missionNamespace, "playerChanged", [AGM_player, _this]] call GVAR(fnc_callCustomEventHandlers);
+ [missionNamespace, "playerChanged", [AGM_player, _this]] call FUNC(callCustomEventHandlers);
};
}] call BIS_fnc_addStackedEventHandler;
};
diff --git a/addons/core/functions/Debug/fn_getChildren.sqf b/addons/core/functions/Debug/fn_getChildren.sqf
index 79c7461c47..c230713e36 100644
--- a/addons/core/functions/Debug/fn_getChildren.sqf
+++ b/addons/core/functions/Debug/fn_getChildren.sqf
@@ -6,5 +6,5 @@ _name = _this select 0;
_cfgClass = _this select 1;
_classes = format ["configName inheritsFrom _x == '%1'", _name] configClasses (configFile >> _cfgClass);
-_classes = [_classes, {configName _this}] call GVAR(fnc_map);
+_classes = [_classes, {configName _this}] call FUNC(map);
_classes
diff --git a/addons/core/functions/fn_addCustomEventHandler.sqf b/addons/core/functions/fn_addCustomEventHandler.sqf
index 2f6aa1dcde..55bcd722ae 100644
--- a/addons/core/functions/fn_addCustomEventHandler.sqf
+++ b/addons/core/functions/fn_addCustomEventHandler.sqf
@@ -1,7 +1,7 @@
/*
* Author: commy2
*
- * Add a custom event to a unit. The event scripts are called by GVAR(fnc_callCustomEventHandlers).
+ * Add a custom event to a unit. The event scripts are called by FUNC(callCustomEventHandlers).
*
* Argument:
* 0: Object the event should be assigned to or namespace (Object OR Namespace)
diff --git a/addons/core/functions/fn_adminKick.sqf b/addons/core/functions/fn_adminKick.sqf
index 316756f492..c53d228da5 100644
--- a/addons/core/functions/fn_adminKick.sqf
+++ b/addons/core/functions/fn_adminKick.sqf
@@ -4,4 +4,4 @@ private "_name";
_name = name (_this select 0);
-[_name, "{if (serverCommandAvailable '#kick') then {serverCommand format['#kick %1', _this]}}"] call GVAR(fnc_execRemoteFnc);
+[_name, "{if (serverCommandAvailable '#kick') then {serverCommand format['#kick %1', _this]}}"] call FUNC(execRemoteFnc);
diff --git a/addons/core/functions/fn_applyForceWalkStatus.sqf b/addons/core/functions/fn_applyForceWalkStatus.sqf
index ef35ec707c..54c78a2977 100644
--- a/addons/core/functions/fn_applyForceWalkStatus.sqf
+++ b/addons/core/functions/fn_applyForceWalkStatus.sqf
@@ -1,5 +1,5 @@
/*
-Name: GVAR(fnc_applyForceWalkStatus)
+Name: FUNC(applyForceWalkStatus)
Author: Pabst Mirror
@@ -13,7 +13,7 @@ Returns:
None
Example:
- [AGM_Player] call GVAR(fnc_applyForceWalkStatus)
+ [AGM_Player] call FUNC(applyForceWalkStatus)
*/
private ["_unit", "_forceWalkNumber"];
diff --git a/addons/core/functions/fn_callCustomEventHandlersGlobal.sqf b/addons/core/functions/fn_callCustomEventHandlersGlobal.sqf
index 2e6a830cda..7195f70316 100644
--- a/addons/core/functions/fn_callCustomEventHandlersGlobal.sqf
+++ b/addons/core/functions/fn_callCustomEventHandlersGlobal.sqf
@@ -12,4 +12,4 @@
* None.
*/
-[_this, "GVAR(fnc_callCustomEventHandlers)", 2] call GVAR(fnc_execRemoteFnc);
+[_this, QUOTE(FUNC(callCustomEventHandlers)), 2] call FUNC(execRemoteFnc);
diff --git a/addons/core/functions/fn_canGetInPosition.sqf b/addons/core/functions/fn_canGetInPosition.sqf
index 3ce0553c43..a4ca107cf9 100644
--- a/addons/core/functions/fn_canGetInPosition.sqf
+++ b/addons/core/functions/fn_canGetInPosition.sqf
@@ -68,10 +68,10 @@ switch (_position) do {
case "gunner" : {
private "_turretConfig";
- _turret = [typeOf _vehicle] call GVAR(fnc_getTurretGunner);
+ _turret = [typeOf _vehicle] call FUNC(getTurretGunner);
if (_turret isEqualTo []) exitWith {false};
- _turretConfig = [_config, _turret] call GVAR(fnc_getTurretConfigPath);
+ _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
_radius = getNumber (_config >> "getInRadius");
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
@@ -81,10 +81,10 @@ switch (_position) do {
case "commander" : {
private "_turretConfig";
- _turret = [typeOf _vehicle] call GVAR(fnc_getTurretCommander);
+ _turret = [typeOf _vehicle] call FUNC(getTurretCommander);
if (_turret isEqualTo []) exitWith {false};
- _turretConfig = [_config, _turret] call GVAR(fnc_getTurretConfigPath);
+ _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
_radius = getNumber (_config >> "getInRadius");
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
@@ -94,10 +94,10 @@ switch (_position) do {
case "copilot" : {
private "_turretConfig";
- _turret = [typeOf _vehicle] call GVAR(fnc_getTurretCopilot);
+ _turret = [typeOf _vehicle] call FUNC(getTurretCopilot);
if (_turret isEqualTo []) exitWith {false};
- _turretConfig = [_config, _turret] call GVAR(fnc_getTurretConfigPath);
+ _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
_radius = getNumber (_config >> "getInRadius");
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
@@ -107,12 +107,12 @@ switch (_position) do {
case "turret" : {
private ["_turrets", "_turretConfig"];
- _turrets = [typeOf _vehicle] call GVAR(fnc_getTurretsOther);
+ _turrets = [typeOf _vehicle] call FUNC(getTurretsOther);
if (_index != -1 && {_turret = _turrets select _index;
CANGETINTURRETINDEX
}) then {
- _turretConfig = [_config, _turret] call GVAR(fnc_getTurretConfigPath);
+ _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
_radius = getNumber (_config >> "getInRadius");
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
@@ -122,7 +122,7 @@ switch (_position) do {
for "_index" from 0 to (count _turrets - 1) do {
_turret = _turrets select _index;
if (CANGETINTURRETINDEX) exitWith {
- _turretConfig = [_config, _turret] call GVAR(fnc_getTurretConfigPath);
+ _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
_radius = getNumber (_config >> "getInRadius");
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
@@ -135,12 +135,12 @@ switch (_position) do {
case "ffv" : {
private ["_turrets", "_turretConfig"];
- _turrets = [typeOf _vehicle] call GVAR(fnc_getTurretsFFV);
+ _turrets = [typeOf _vehicle] call FUNC(getTurretsFFV);
if (_index != -1 && {_turret = _turrets select _index;
CANGETINTURRETINDEX
}) then {
- _turretConfig = [_config, _turret] call GVAR(fnc_getTurretConfigPath);
+ _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
_radius = getNumber (_config >> "getInRadius");
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
@@ -150,7 +150,7 @@ switch (_position) do {
for "_index" from 0 to (count _turrets - 1) do {
_turret = _turrets select _index;
if (CANGETINTURRETINDEX) exitWith {
- _turretConfig = [_config, _turret] call GVAR(fnc_getTurretConfigPath);
+ _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
_radius = getNumber (_config >> "getInRadius");
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
@@ -163,7 +163,7 @@ switch (_position) do {
case "codriver" : {
private "_positions";
- _positions = [typeOf _vehicle] call GVAR(fnc_getVehicleCodriver);
+ _positions = [typeOf _vehicle] call FUNC(getVehicleCodriver);
{
if (alive _x) then {_positions deleteAt (_positions find (_vehicle getCargoIndex _x))};
@@ -198,7 +198,7 @@ switch (_position) do {
case "cargo" : {
private "_positions";
- _positions = [typeOf _vehicle] call GVAR(fnc_getVehicleCargo);
+ _positions = [typeOf _vehicle] call FUNC(getVehicleCargo);
{
if (alive _x) then {_positions deleteAt (_positions find (_vehicle getCargoIndex _x))};
@@ -253,7 +253,7 @@ _fnc_isInRange = {
// if you want into the cargo and you can't, then check ffv turrets aswell
if (_position == "cargo") exitWith {
if (_return && {!_checkDistance || {_vehicle == vehicle _unit} || _fnc_isInRange}) then {true} else {
- [_unit, _vehicle, "ffv", _checkDistance] call GVAR(fnc_canGetInPosition);
+ [_unit, _vehicle, "ffv", _checkDistance] call FUNC(canGetInPosition);
}
};
diff --git a/addons/core/functions/fn_checkPBOs.sqf b/addons/core/functions/fn_checkPBOs.sqf
index 6b7732b0ae..5b3cf1ed13 100644
--- a/addons/core/functions/fn_checkPBOs.sqf
+++ b/addons/core/functions/fn_checkPBOs.sqf
@@ -35,5 +35,5 @@ _logic = "Logic" createVehicleLocal [0,0,0];
_logic setVariable ["Action", _mode];
_logic setVariable ["CheckAll", _checkAll];
_logic setVariable ["Whitelist", _whitelist];
-[_logic, [], true] call GVAR(fnc_moduleCheckPBOs);
+[_logic, [], true] call FUNC(moduleCheckPBOs);
deleteVehicle _logic;
diff --git a/addons/core/functions/fn_claim.sqf b/addons/core/functions/fn_claim.sqf
index 593b16b505..c92f9aa8d5 100644
--- a/addons/core/functions/fn_claim.sqf
+++ b/addons/core/functions/fn_claim.sqf
@@ -18,9 +18,9 @@ _target setVariable ["AGM_isUsedBy", _unit, true];
if (_lockTarget) then {
if (!isNull _unit) then {
- [_target, "{_locked = locked _this; _this setVariable ['AGM_lockStatus', _locked]; _this lock 2}", _target] call GVAR(fnc_execRemoteFnc);
+ [_target, "{_locked = locked _this; _this setVariable ['AGM_lockStatus', _locked]; _this lock 2}", _target] call FUNC(execRemoteFnc);
} else {
- [_target, "{_this lock (_this getVariable ['AGM_lockStatus', locked _this])}", _target] call GVAR(fnc_execRemoteFnc);
+ [_target, "{_this lock (_this getVariable ['AGM_lockStatus', locked _this])}", _target] call FUNC(execRemoteFnc);
};
};
diff --git a/addons/core/functions/fn_closeDialogIfTargetMoves.sqf b/addons/core/functions/fn_closeDialogIfTargetMoves.sqf
index a37df70af3..72d5efd337 100644
--- a/addons/core/functions/fn_closeDialogIfTargetMoves.sqf
+++ b/addons/core/functions/fn_closeDialogIfTargetMoves.sqf
@@ -42,6 +42,6 @@ _this spawn {
closeDialog 0;
call AGM_Interaction_fnc_hideMenu;
};
- (isNil "AGM_Interaction_MainButton" && !dialog) || {!isNull (uiNamespace getVariable ["GVAR(dlgDisableMouse)", displayNull])} //Exit loop if DisableMouse dialog open
+ (isNil "AGM_Interaction_MainButton" && !dialog) || {!isNull (uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull])} //Exit loop if DisableMouse dialog open
};
};
diff --git a/addons/core/functions/fn_disableUserInput.sqf b/addons/core/functions/fn_disableUserInput.sqf
index edb3ee11c2..12b3aae23c 100644
--- a/addons/core/functions/fn_disableUserInput.sqf
+++ b/addons/core/functions/fn_disableUserInput.sqf
@@ -17,19 +17,19 @@ _state = _this select 0;
if (_state) then {
disableSerialization;
- if (!isNull (uiNamespace getVariable ["GVAR(dlgDisableMouse)", displayNull])) exitWith {};
- if ("AGM_DisableUserInput" in ([BIS_stackedEventHandlers_onEachFrame, {_this select 0}] call GVAR(fnc_map))) exitWith {};
+ if (!isNull (uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull])) exitWith {};
+ if ("AGM_DisableUserInput" in ([BIS_stackedEventHandlers_onEachFrame, {_this select 0}] call FUNC(map))) exitWith {};
// end TFAR and ACRE2 radio transmissions
- 0 spawn GVAR(fnc_endRadioTransmission);
+ 0 spawn FUNC(endRadioTransmission);
// Close map
if (visibleMap && {!(player getVariable ["AGM_canSwitchUnits", false])}) then {openMap false};
closeDialog 0;
- createDialog "GVAR(DisableMouse_Dialog)";
+ createDialog QGVAR(DisableMouse_Dialog);
- _dlg = uiNamespace getVariable "GVAR(dlgDisableMouse)";
+ _dlg = uiNamespace getVariable QGVAR(dlgDisableMouse);
_dlg displayAddEventHandler ["KeyDown", {
_key = _this select 1;
@@ -49,23 +49,23 @@ if (_state) then {
};
_ctrl = _dlg displayctrl 103;
- _ctrl ctrlSetEventHandler ["buttonClick", "while {!isNull (uiNamespace getVariable ['GVAR(dlgDisableMouse)', displayNull])} do {closeDialog 0}; failMission 'LOSER'; [false] call GVAR(fnc_disableUserInput);"];
+ _ctrl ctrlSetEventHandler ["buttonClick", "while {!isNull (uiNamespace getVariable ['GVAR(dlgDisableMouse)', displayNull])} do {closeDialog 0}; failMission 'LOSER'; [false] call FUNC(disableUserInput);"];
_ctrl ctrlEnable true;
_ctrl ctrlSetText "ABORT";
_ctrl ctrlSetTooltip "Abort.";
_ctrl = _dlg displayctrl ([104, 1010] select isMultiplayer);
- _ctrl ctrlSetEventHandler ["buttonClick", "closeDialog 0; player setDamage 1; [false] call GVAR(fnc_disableUserInput);"];
+ _ctrl ctrlSetEventHandler ["buttonClick", "closeDialog 0; player setDamage 1; [false] call FUNC(disableUserInput);"];
_ctrl ctrlEnable (call {_config = missionConfigFile >> "respawnButton"; !isNumber _config || {getNumber _config == 1}});
_ctrl ctrlSetText "RESPAWN";
_ctrl ctrlSetTooltip "Respawn.";
};
- if (_key in actionKeys "TeamSwitch" && {teamSwitchEnabled}) then {(uiNamespace getVariable ["GVAR(dlgDisableMouse)", displayNull]) closeDisplay 0; teamSwitch};//_acc = accTime; teamSwitch; setAccTime _acc};
- if (_key in actionKeys "CuratorInterface" && {getAssignedCuratorLogic player in allCurators}) then {(uiNamespace getVariable ["GVAR(dlgDisableMouse)", displayNull]) closeDisplay 0; openCuratorInterface};
- if (_key in actionKeys "ShowMap" && {player getVariable ["AGM_canSwitchUnits", false]}) then {(uiNamespace getVariable ["GVAR(dlgDisableMouse)", displayNull]) closeDisplay 0; openMap true};
+ if (_key in actionKeys "TeamSwitch" && {teamSwitchEnabled}) then {(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0; teamSwitch};//_acc = accTime; teamSwitch; setAccTime _acc};
+ if (_key in actionKeys "CuratorInterface" && {getAssignedCuratorLogic player in allCurators}) then {(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0; openCuratorInterface};
+ if (_key in actionKeys "ShowMap" && {player getVariable ["AGM_canSwitchUnits", false]}) then {(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0; openMap true};
- if (serverCommandAvailable "#missions" || {player getVariable ["AGM_isUnconscious", false] && {(call GVAR(fnc_player)) getVariable ["AGM_Medical_AllowChatWhileUnconscious", missionNamespace getVariable ["AGM_Medical_AllowChatWhileUnconscious", false]]}}) then {
+ if (serverCommandAvailable "#missions" || {player getVariable ["AGM_isUnconscious", false] && {(call FUNC(player)) getVariable ["AGM_Medical_AllowChatWhileUnconscious", missionNamespace getVariable ["AGM_Medical_AllowChatWhileUnconscious", false]]}}) then {
if (!(_key in (actionKeys "DefaultAction" + actionKeys "Throw")) && {_key in (actionKeys "Chat" + actionKeys "PrevChannel" + actionKeys "NextChannel")}) then {
_key = 0;
};
@@ -76,15 +76,15 @@ if (_state) then {
_dlg displayAddEventHandler ["KeyUp", {true}];
["AGM_DisableUserInput", "onEachFrame", {
- if (isNull (uiNamespace getVariable ["GVAR(dlgDisableMouse)", displayNull]) && {!visibleMap && isNull findDisplay 49 && isNull findDisplay 312 && isNull findDisplay 632}) then {
+ if (isNull (uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) && {!visibleMap && isNull findDisplay 49 && isNull findDisplay 312 && isNull findDisplay 632}) then {
["AGM_DisableUserInput", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
- [true] call GVAR(fnc_disableUserInput);
+ [true] call FUNC(disableUserInput);
};
}] call BIS_fnc_addStackedEventHandler;
} else {
- if ("AGM_DisableUserInput" in ([BIS_stackedEventHandlers_onEachFrame, {_this select 0}] call GVAR(fnc_map))) then {
+ if ("AGM_DisableUserInput" in ([BIS_stackedEventHandlers_onEachFrame, {_this select 0}] call FUNC(map))) then {
["AGM_DisableUserInput", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
};
- (uiNamespace getVariable ["GVAR(dlgDisableMouse)", displayNull]) closeDisplay 0;
+ (uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0;
};
diff --git a/addons/core/functions/fn_displayText.sqf b/addons/core/functions/fn_displayText.sqf
index 8652d40faf..89f0a44948 100644
--- a/addons/core/functions/fn_displayText.sqf
+++ b/addons/core/functions/fn_displayText.sqf
@@ -17,7 +17,7 @@
#define DEFAULT_DELAY 2
#define DEFAULT_PRIORITY 0
-if (isNil "GVAR(lastHint)") then {
+if (isNil QGVAR(lastHint)) then {
GVAR(lastHint) = [0, 0];
};
diff --git a/addons/core/functions/fn_displayTextPicture.sqf b/addons/core/functions/fn_displayTextPicture.sqf
index c0b439abdc..7da5095c9e 100644
--- a/addons/core/functions/fn_displayTextPicture.sqf
+++ b/addons/core/functions/fn_displayTextPicture.sqf
@@ -26,4 +26,4 @@ _text = composeText [
_text
];
-[_text] call GVAR(fnc_displayTextStructured);
+[_text] call FUNC(displayTextStructured);
diff --git a/addons/core/functions/fn_doAnimation.sqf b/addons/core/functions/fn_doAnimation.sqf
index 7c5290e512..ef0c74d94c 100644
--- a/addons/core/functions/fn_doAnimation.sqf
+++ b/addons/core/functions/fn_doAnimation.sqf
@@ -37,7 +37,7 @@ if (count _this > 3) then {
// don't overwrite more important animations
if (_unit getVariable ["AGM_isUnconscious", false] && {!_force}) exitWith {
if (_animation != "Unconscious") then {
- [_unit, "Unconscious", 2] call GVAR(fnc_doAnimation);
+ [_unit, "Unconscious", 2] call FUNC(doAnimation);
};
};
@@ -46,29 +46,29 @@ if (_animation == "Unconscious" && {!(_unit getVariable ["AGM_isUnconscious", fa
// switchMove "" no longer works in dev 1.37
if (_animation == "") then {
- _animation = [_unit] call GVAR(fnc_getDefaultAnim);
+ _animation = [_unit] call FUNC(getDefaultAnim);
};
switch (_priority) do {
case 0 : {
if (_unit == vehicle _unit) then {
- [_unit, format ["{_this playMove '%1'}", _animation], _unit] call GVAR(fnc_execRemoteFnc);
+ [_unit, format ["{_this playMove '%1'}", _animation], _unit] call FUNC(execRemoteFnc);
} else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
- [_unit, format ["{_this playMove '%1'}", _animation]] call GVAR(fnc_execRemoteFnc);
+ [_unit, format ["{_this playMove '%1'}", _animation]] call FUNC(execRemoteFnc);
};
};
case 1 : {
if (_unit == vehicle _unit) then {
- [_unit, format ["{_this playMoveNow '%1'}", _animation], _unit] call GVAR(fnc_execRemoteFnc);
+ [_unit, format ["{_this playMoveNow '%1'}", _animation], _unit] call FUNC(execRemoteFnc);
} else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
- [_unit, format ["{_this playMoveNow '%1'}", _animation]] call GVAR(fnc_execRemoteFnc);
+ [_unit, format ["{_this playMoveNow '%1'}", _animation]] call FUNC(execRemoteFnc);
};
};
case 2 : {
// Execute on all machines. SwitchMove has local effects.
- [_unit, format ["{_this switchMove '%1'}", _animation]] call GVAR(fnc_execRemoteFnc);
+ [_unit, format ["{_this switchMove '%1'}", _animation]] call FUNC(execRemoteFnc);
};
default {};
};
diff --git a/addons/core/functions/fn_execPersistentFnc.sqf b/addons/core/functions/fn_execPersistentFnc.sqf
index 4fd287c0c5..5ca2f3ed43 100644
--- a/addons/core/functions/fn_execPersistentFnc.sqf
+++ b/addons/core/functions/fn_execPersistentFnc.sqf
@@ -25,7 +25,7 @@ _name = _this select 3;
["Remote", [_arguments, _this select 1, _name], {format ["%1 call %2 id: %3", _this select 0, _this select 1, _this select 2]}, false] call AGM_Debug_fnc_log;
// execute function on every currently connected machine
-[[_arguments, _unit], _this select 1, 2] call GVAR(fnc_execRemoteFnc);
+[[_arguments, _unit], _this select 1, 2] call FUNC(execRemoteFnc);
// save persistent function for JIP
private ["_persistentFunctions", "_index"];
diff --git a/addons/core/functions/fn_execRemoteFnc.sqf b/addons/core/functions/fn_execRemoteFnc.sqf
index 29b8f1c566..4f14d46890 100644
--- a/addons/core/functions/fn_execRemoteFnc.sqf
+++ b/addons/core/functions/fn_execRemoteFnc.sqf
@@ -39,20 +39,20 @@ if (typeName _unit == "SCALAR") exitWith {
if (isServer) then {
_arguments call _function;
} else {
- publicVariableServer "GVAR(remoteFnc)";
+ publicVariableServer QGVAR(remoteFnc);
};
};
case 2 : {
_arguments call _function;
GVAR(remoteFnc) set [2, 0];
- publicVariable "GVAR(remoteFnc)";
+ publicVariable QGVAR(remoteFnc);
};
case 3 : {
if (isDedicated) then {
_arguments call _function;
} else {
- if (!isServer) then {publicVariableServer "GVAR(remoteFnc)"};
+ if (!isServer) then {publicVariableServer QGVAR(remoteFnc)};
};
};
};
@@ -63,8 +63,8 @@ if (local _unit) then {
} else {
if (isServer) then {
_id = owner _unit;
- _id publicVariableClient "GVAR(remoteFnc)";
+ _id publicVariableClient QGVAR(remoteFnc);
} else {
- publicVariableServer "GVAR(remoteFnc)";
+ publicVariableServer QGVAR(remoteFnc);
};
};
diff --git a/addons/core/functions/fn_filter.sqf b/addons/core/functions/fn_filter.sqf
index 62cbb5d7c6..febbb7f38a 100644
--- a/addons/core/functions/fn_filter.sqf
+++ b/addons/core/functions/fn_filter.sqf
@@ -11,7 +11,7 @@
* Final array
*
* Usage:
- * [[0,1,2,3,4], {_this > 2}] call GVAR(fnc_filter) ==> [3,4]
+ * [[0,1,2,3,4], {_this > 2}] call FUNC(filter) ==> [3,4]
*/
private ["_array", "_code", "_newArray", "_index"];
diff --git a/addons/core/functions/fn_fixLoweredRifleAnimation.sqf b/addons/core/functions/fn_fixLoweredRifleAnimation.sqf
index fafcd9efe2..6a6e584305 100644
--- a/addons/core/functions/fn_fixLoweredRifleAnimation.sqf
+++ b/addons/core/functions/fn_fixLoweredRifleAnimation.sqf
@@ -5,5 +5,5 @@ private "_unit";
_unit = _this select 0;
if (currentWeapon _unit != "" && {currentWeapon _unit == primaryWeapon _unit} && {weaponLowered _unit} && {stance _unit == "STAND"}) then {
- [_unit, "amovpercmstpsraswrfldnon", 0] call GVAR(fnc_doAnimation);
+ [_unit, "amovpercmstpsraswrfldnon", 0] call FUNC(doAnimation);
};
diff --git a/addons/core/functions/fn_getCaptivityStatus.sqf b/addons/core/functions/fn_getCaptivityStatus.sqf
index eeed24440c..d2352f2098 100644
--- a/addons/core/functions/fn_getCaptivityStatus.sqf
+++ b/addons/core/functions/fn_getCaptivityStatus.sqf
@@ -16,7 +16,7 @@ _unit = _this select 0;
_captivityReasons = missionNamespace getVariable ["AGM_captivityReasons", []];
-_unitCaptivityStatus = [captiveNum _unit, count _captivityReasons] call GVAR(fnc_binarizeNumber);
+_unitCaptivityStatus = [captiveNum _unit, count _captivityReasons] call FUNC(binarizeNumber);
_unitCaptivityReasons = [];
{
diff --git a/addons/core/functions/fn_getConfigCommander.sqf b/addons/core/functions/fn_getConfigCommander.sqf
index 8fb1df2cff..fd1863ae6b 100644
--- a/addons/core/functions/fn_getConfigCommander.sqf
+++ b/addons/core/functions/fn_getConfigCommander.sqf
@@ -15,6 +15,6 @@ private ["_vehicle", "_config", "_turret"];
_vehicle = _this select 0;
_config = configFile >> "CfgVehicles" >> _vehicle;
-_turret = [_vehicle] call GVAR(fnc_getTurretCommander);
+_turret = [_vehicle] call FUNC(getTurretCommander);
-[_config, _turret] call GVAR(fnc_getTurretConfigPath)
+[_config, _turret] call FUNC(getTurretConfigPath)
diff --git a/addons/core/functions/fn_getConfigGunner.sqf b/addons/core/functions/fn_getConfigGunner.sqf
index 8f8c27b517..1c13a2c99c 100644
--- a/addons/core/functions/fn_getConfigGunner.sqf
+++ b/addons/core/functions/fn_getConfigGunner.sqf
@@ -15,6 +15,6 @@ private ["_vehicle", "_config", "_turret"];
_vehicle = _this select 0;
_config = configFile >> "CfgVehicles" >> _vehicle;
-_turret = [_vehicle] call GVAR(fnc_getTurretGunner);
+_turret = [_vehicle] call FUNC(getTurretGunner);
-[_config, _turret] call GVAR(fnc_getTurretConfigPath)
+[_config, _turret] call FUNC(getTurretConfigPath)
diff --git a/addons/core/functions/fn_getDoorTurrets.sqf b/addons/core/functions/fn_getDoorTurrets.sqf
index 7810c350b6..8dd05861b3 100644
--- a/addons/core/functions/fn_getDoorTurrets.sqf
+++ b/addons/core/functions/fn_getDoorTurrets.sqf
@@ -11,7 +11,7 @@
*/
/*
- Name: GVAR(fnc_getDoorTurrets)
+ Name: FUNC(getDoorTurrets)
Author(s):
bux578
@@ -30,13 +30,13 @@ private ["_vehicleType", "_turrets", "_doorTurrets", "_config"];
_vehicleType = _this select 0;
-_turrets = [_vehicleType] call GVAR(fnc_getTurrets);
+_turrets = [_vehicleType] call FUNC(getTurrets);
_doorTurrets = [];
{
_config = configFile >> "CfgVehicles" >> _vehicleType;
- _config = [_config, _x] call GVAR(fnc_getTurretConfigPath);
+ _config = [_config, _x] call FUNC(getTurretConfigPath);
if ((getNumber (_config >> "isCopilot") == 0) && count (getArray (_config >> "weapons")) > 0 ) then {
_doorTurrets pushBack _x;
diff --git a/addons/core/functions/fn_getForceWalkStatus.sqf b/addons/core/functions/fn_getForceWalkStatus.sqf
index c220b43c16..be169761df 100644
--- a/addons/core/functions/fn_getForceWalkStatus.sqf
+++ b/addons/core/functions/fn_getForceWalkStatus.sqf
@@ -1,5 +1,5 @@
/*
-Name: GVAR(fnc_getForceWalkStatus)
+Name: FUNC(getForceWalkStatus)
Author: Pabst Mirror (from captivity by commy2)
@@ -13,7 +13,7 @@ Returns:
ARRAY(of strings) - Reason why the unit is force walking
Example:
- [AGM_Player] call GVAR(fnc_getForceWalkStatus)
+ [AGM_Player] call FUNC(getForceWalkStatus)
*/
private ["_unit", "_forceWalkReasons", "_unitForceWalkNumber", "_unitForceWalkStatus", "_unitForceWalkReasons"];
@@ -24,7 +24,7 @@ _forceWalkReasons = missionNamespace getVariable ["AGM_forceWalkReasons", []];
_unitForceWalkNumber = _unit getVariable ["AGM_forceWalkStatusNumber", 0];
-_unitForceWalkStatus = [_unitForceWalkNumber, count _forceWalkReasons] call GVAR(fnc_binarizeNumber);
+_unitForceWalkStatus = [_unitForceWalkNumber, count _forceWalkReasons] call FUNC(binarizeNumber);
_unitForceWalkReasons = [];
{
diff --git a/addons/core/functions/fn_getHitPoints.sqf b/addons/core/functions/fn_getHitPoints.sqf
index 97277dd1de..a6522348d1 100644
--- a/addons/core/functions/fn_getHitPoints.sqf
+++ b/addons/core/functions/fn_getHitPoints.sqf
@@ -23,7 +23,7 @@ private "_hitpointClasses";
_hitpointClasses = [_config >> "HitPoints"];
{
private "_class";
- _class = ([_config, _x] call GVAR(fnc_getTurretConfigPath)) >> "HitPoints";
+ _class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
if (isClass _class) then {
_hitpointClasses pushBack _class;
diff --git a/addons/core/functions/fn_getHitPointsWithSelections.sqf b/addons/core/functions/fn_getHitPointsWithSelections.sqf
index de3cc0d06c..0b7133227c 100644
--- a/addons/core/functions/fn_getHitPointsWithSelections.sqf
+++ b/addons/core/functions/fn_getHitPointsWithSelections.sqf
@@ -24,7 +24,7 @@ private "_hitpointClasses";
_hitpointClasses = [_config >> "HitPoints"];
{
private "_class";
- _class = ([_config, _x] call GVAR(fnc_getTurretConfigPath)) >> "HitPoints";
+ _class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
if (isClass _class) then {
_hitpointClasses pushBack _class;
diff --git a/addons/core/functions/fn_getInPosition.sqf b/addons/core/functions/fn_getInPosition.sqf
index f5cb27bb43..6d2a40968d 100644
--- a/addons/core/functions/fn_getInPosition.sqf
+++ b/addons/core/functions/fn_getInPosition.sqf
@@ -63,7 +63,7 @@ switch (_position) do {
};
case "gunner" : {
- _turret = [typeOf _vehicle] call GVAR(fnc_getTurretGunner);
+ _turret = [typeOf _vehicle] call FUNC(getTurretGunner);
if (CANGETINTURRETINDEX) then {
_script = [
@@ -74,7 +74,7 @@ switch (_position) do {
};
case "commander" : {
- _turret = [typeOf _vehicle] call GVAR(fnc_getTurretCommander);
+ _turret = [typeOf _vehicle] call FUNC(getTurretCommander);
if (CANGETINTURRETINDEX) then {
_script = [
@@ -85,7 +85,7 @@ switch (_position) do {
};
case "copilot" : {
- _turret = [typeOf _vehicle] call GVAR(fnc_getTurretCopilot);
+ _turret = [typeOf _vehicle] call FUNC(getTurretCopilot);
if (CANGETINTURRETINDEX) then {
_script = [
@@ -99,7 +99,7 @@ switch (_position) do {
case "turret" : {
private "_turrets";
- _turrets = [typeOf _vehicle] call GVAR(fnc_getTurretsOther);
+ _turrets = [typeOf _vehicle] call FUNC(getTurretsOther);
if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX}) then {
_script = [
@@ -126,7 +126,7 @@ switch (_position) do {
case "ffv" : {
private "_turrets";
- _turrets = [typeOf _vehicle] call GVAR(fnc_getTurretsFFV);
+ _turrets = [typeOf _vehicle] call FUNC(getTurretsFFV);
if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX}) then {
_script = [
@@ -153,7 +153,7 @@ switch (_position) do {
case "codriver" : {
private "_positions";
- _positions = [typeOf _vehicle] call GVAR(fnc_getVehicleCodriver);
+ _positions = [typeOf _vehicle] call FUNC(getVehicleCodriver);
{
if (alive _x) then {_positions deleteAt (_positions find (_vehicle getCargoIndex _x))};
@@ -182,7 +182,7 @@ switch (_position) do {
case "cargo" : {
private "_positions";
- _positions = [typeOf _vehicle] call GVAR(fnc_getVehicleCargo);
+ _positions = [typeOf _vehicle] call FUNC(getVehicleCargo);
{
if (alive _x) then {_positions deleteAt (_positions find (_vehicle getCargoIndex _x))};
@@ -230,7 +230,7 @@ _fnc_getInEH = {
// if you want into the cargo and you can't, then check ffv turrets aswell
if (_position == "cargo") exitWith {
if (_script isEqualTo {}) then {
- [_unit, _vehicle, "ffv"] call GVAR(fnc_getInPosition);
+ [_unit, _vehicle, "ffv"] call FUNC(getInPosition);
} else {
call _script;
};
diff --git a/addons/core/functions/fn_getName.sqf b/addons/core/functions/fn_getName.sqf
index 53e2ad8b8e..16ec94ab33 100644
--- a/addons/core/functions/fn_getName.sqf
+++ b/addons/core/functions/fn_getName.sqf
@@ -23,10 +23,10 @@ if (isNil "_showEffective") then {
_name = "";
if (_unit isKindOf "CAManBase") then {
- _name = _unit getVariable ["AGM_Name", localize "STR_GVAR(Unknown)"];
+ _name = _unit getVariable ["AGM_Name", localize QUOTE(DOUBLES(STR,GVAR(Unknown)))];
} else {
if (_showEffective) then {
- _name = [effectiveCommander _unit] call GVAR(fnc_getName);
+ _name = [effectiveCommander _unit] call FUNC(getName);
} else {
_name = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName");
};
diff --git a/addons/core/functions/fn_getNumberFromMissionSQM.sqf b/addons/core/functions/fn_getNumberFromMissionSQM.sqf
index 27d1298c4a..47524d7cb6 100644
--- a/addons/core/functions/fn_getNumberFromMissionSQM.sqf
+++ b/addons/core/functions/fn_getNumberFromMissionSQM.sqf
@@ -12,6 +12,6 @@
private "_number";
-_number = _this call GVAR(fnc_getStringFromMissionSQM);
+_number = _this call FUNC(getStringFromMissionSQM);
parseNumber _number;
diff --git a/addons/core/functions/fn_getTurretCommander.sqf b/addons/core/functions/fn_getTurretCommander.sqf
index 5ad6b73af9..9989928576 100644
--- a/addons/core/functions/fn_getTurretCommander.sqf
+++ b/addons/core/functions/fn_getTurretCommander.sqf
@@ -14,13 +14,13 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
_vehicle = _this select 0;
-_turrets = [_vehicle] call GVAR(fnc_getTurrets);
+_turrets = [_vehicle] call FUNC(getTurrets);
_turret = [];
{
_config = configFile >> "CfgVehicles" >> _vehicle;
- _config = [_config, _x] call GVAR(fnc_getTurretConfigPath);
+ _config = [_config, _x] call FUNC(getTurretConfigPath);
if (getNumber (_config >> "primaryObserver") == 1) exitWith {
_turret = _x;
diff --git a/addons/core/functions/fn_getTurretCopilot.sqf b/addons/core/functions/fn_getTurretCopilot.sqf
index f4fdbaf305..c85c1ea114 100644
--- a/addons/core/functions/fn_getTurretCopilot.sqf
+++ b/addons/core/functions/fn_getTurretCopilot.sqf
@@ -14,13 +14,13 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
_vehicle = _this select 0;
-_turrets = [_vehicle] call GVAR(fnc_getTurrets);
+_turrets = [_vehicle] call FUNC(getTurrets);
_turret = [];
{
_config = configFile >> "CfgVehicles" >> _vehicle;
- _config = [_config, _x] call GVAR(fnc_getTurretConfigPath);
+ _config = [_config, _x] call FUNC(getTurretConfigPath);
if (getNumber (_config >> "isCopilot") == 1 && {getNumber (_config >> "primaryGunner") != 1} && {getNumber (_config >> "primaryObserver") != 1}) exitWith {
_turret = _x;
diff --git a/addons/core/functions/fn_getTurretGunner.sqf b/addons/core/functions/fn_getTurretGunner.sqf
index bcf641af22..b4531e6611 100644
--- a/addons/core/functions/fn_getTurretGunner.sqf
+++ b/addons/core/functions/fn_getTurretGunner.sqf
@@ -14,13 +14,13 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
_vehicle = _this select 0;
-_turrets = [_vehicle] call GVAR(fnc_getTurrets);
+_turrets = [_vehicle] call FUNC(getTurrets);
_turret = [];
{
_config = configFile >> "CfgVehicles" >> _vehicle;
- _config = [_config, _x] call GVAR(fnc_getTurretConfigPath);
+ _config = [_config, _x] call FUNC(getTurretConfigPath);
if (getNumber (_config >> "primaryGunner") == 1) exitWith {
_turret = _x;
diff --git a/addons/core/functions/fn_getTurretIndex.sqf b/addons/core/functions/fn_getTurretIndex.sqf
index c63b0b76bf..402a21d969 100644
--- a/addons/core/functions/fn_getTurretIndex.sqf
+++ b/addons/core/functions/fn_getTurretIndex.sqf
@@ -15,7 +15,7 @@ private ["_unit", "_vehicle", "_turrets", "_units", "_index"];
_unit = _this select 0;
_vehicle = vehicle _unit;
-//_turrets = [typeOf _vehicle] call GVAR(fnc_getTurrets);
+//_turrets = [typeOf _vehicle] call FUNC(getTurrets);
_turrets = allTurrets [_vehicle, true];
_units = [];
diff --git a/addons/core/functions/fn_getTurretsFFV.sqf b/addons/core/functions/fn_getTurretsFFV.sqf
index 0f94cd099a..1c9947927f 100644
--- a/addons/core/functions/fn_getTurretsFFV.sqf
+++ b/addons/core/functions/fn_getTurretsFFV.sqf
@@ -14,13 +14,13 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
_vehicle = _this select 0;
-_turrets = [_vehicle] call GVAR(fnc_getTurrets);
+_turrets = [_vehicle] call FUNC(getTurrets);
_turret = [];
{
_config = configFile >> "CfgVehicles" >> _vehicle;
- _config = [_config, _x] call GVAR(fnc_getTurretConfigPath);
+ _config = [_config, _x] call FUNC(getTurretConfigPath);
if (getNumber (_config >> "isPersonTurret") == 1) then {
_turret pushBack _x;
diff --git a/addons/core/functions/fn_getTurretsOther.sqf b/addons/core/functions/fn_getTurretsOther.sqf
index 73aa3931ea..6c1c629a55 100644
--- a/addons/core/functions/fn_getTurretsOther.sqf
+++ b/addons/core/functions/fn_getTurretsOther.sqf
@@ -14,13 +14,13 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
_vehicle = _this select 0;
-_turrets = [_vehicle] call GVAR(fnc_getTurrets);
+_turrets = [_vehicle] call FUNC(getTurrets);
_turret = [];
{
_config = configFile >> "CfgVehicles" >> _vehicle;
- _config = [_config, _x] call GVAR(fnc_getTurretConfigPath);
+ _config = [_config, _x] call FUNC(getTurretConfigPath);
if ( getNumber (_config >> "isCopilot") != 1
&& {getNumber (_config >> "primaryGunner") != 1}
diff --git a/addons/core/functions/fn_getUavControlPosition.sqf b/addons/core/functions/fn_getUavControlPosition.sqf
index 30406deae0..9d3e414b9f 100644
--- a/addons/core/functions/fn_getUavControlPosition.sqf
+++ b/addons/core/functions/fn_getUavControlPosition.sqf
@@ -1,5 +1,5 @@
/*
-Name: GVAR(fnc_getUavControlPosition)
+Name: FUNC(getUavControlPosition)
Author: Pabst Mirror
@@ -16,7 +16,7 @@ Returns:
STRING - Position in the UAV that is currently being controled by the unit.
Example:
- [AGM_Player] call GVAR(fnc_getUavControlPosition)
+ [AGM_Player] call FUNC(getUavControlPosition)
*/
private ["_unit", "_uav", "_positionArray", "_playerIndex"];
diff --git a/addons/core/functions/fn_getWeaponType.sqf b/addons/core/functions/fn_getWeaponType.sqf
index 0cfcc886e1..3f2829b4a9 100644
--- a/addons/core/functions/fn_getWeaponType.sqf
+++ b/addons/core/functions/fn_getWeaponType.sqf
@@ -14,7 +14,7 @@ private ["_weapon", "_type", "_index"];
_weapon = _this select 0;
-_type = [getNumber (configFile >> "CfgWeapons" >> _weapon >> "type")] call GVAR(fnc_binarizeNumber);
+_type = [getNumber (configFile >> "CfgWeapons" >> _weapon >> "type")] call FUNC(binarizeNumber);
_index = 0;
while {!(_type select _index) && {_index < 16}} do {
diff --git a/addons/core/functions/fn_getWindDirection.sqf b/addons/core/functions/fn_getWindDirection.sqf
index d5d24563d0..fe1fad8341 100644
--- a/addons/core/functions/fn_getWindDirection.sqf
+++ b/addons/core/functions/fn_getWindDirection.sqf
@@ -11,20 +11,20 @@
*/
switch (round (windDir / 360 * 16)) do {
- case 1 : {localize "STR_GVAR(SSW)"};
- case 2 : {localize "STR_GVAR(SW)"};
- case 3 : {localize "STR_GVAR(WSW)"};
- case 4 : {localize "STR_GVAR(W)"};
- case 5 : {localize "STR_GVAR(WNW)"};
- case 6 : {localize "STR_GVAR(NW)"};
- case 7 : {localize "STR_GVAR(NNW)"};
- case 8 : {localize "STR_GVAR(N)"};
- case 9 : {localize "STR_GVAR(NNE)"};
- case 10 : {localize "STR_GVAR(NE)"};
- case 11 : {localize "STR_GVAR(ENE)"};
- case 12 : {localize "STR_GVAR(E)"};
- case 13 : {localize "STR_GVAR(ESE)"};
- case 14 : {localize "STR_GVAR(SE)"};
- case 15 : {localize "STR_GVAR(SSE)"};
- default {localize "STR_GVAR(S)"};
+ case 1 : {localize QUOTE(DOUBLES(STR,GVAR(SSW)))};
+ case 2 : {localize QUOTE(DOUBLES(STR,GVAR(SW)))};
+ case 3 : {localize QUOTE(DOUBLES(STR,GVAR(WSW)))};
+ case 4 : {localize QUOTE(DOUBLES(STR,GVAR(W)))};
+ case 5 : {localize QUOTE(DOUBLES(STR,GVAR(WNW)))};
+ case 6 : {localize QUOTE(DOUBLES(STR,GVAR(NW)))};
+ case 7 : {localize QUOTE(DOUBLES(STR,GVAR(NNW)))};
+ case 8 : {localize QUOTE(DOUBLES(STR,GVAR(N)))};
+ case 9 : {localize QUOTE(DOUBLES(STR,GVAR(NNE)))};
+ case 10 : {localize QUOTE(DOUBLES(STR,GVAR(NE)))};
+ case 11 : {localize QUOTE(DOUBLES(STR,GVAR(ENE)))};
+ case 12 : {localize QUOTE(DOUBLES(STR,GVAR(E)))};
+ case 13 : {localize QUOTE(DOUBLES(STR,GVAR(ESE)))};
+ case 14 : {localize QUOTE(DOUBLES(STR,GVAR(SE)))};
+ case 15 : {localize QUOTE(DOUBLES(STR,GVAR(SSE)))};
+ default {localize QUOTE(DOUBLES(STR,GVAR(S)))};
};
diff --git a/addons/core/functions/fn_goKneeling.sqf b/addons/core/functions/fn_goKneeling.sqf
index ad19014d05..1dcbc78706 100644
--- a/addons/core/functions/fn_goKneeling.sqf
+++ b/addons/core/functions/fn_goKneeling.sqf
@@ -26,6 +26,6 @@ try {
};
} catch {
if (stance _unit != "PRONE") then {
- [_unit, _exception] call GVAR(fnc_doAnimation);
+ [_unit, _exception] call FUNC(doAnimation);
};
};
diff --git a/addons/core/functions/fn_isAutoWind.sqf b/addons/core/functions/fn_isAutoWind.sqf
index 89be108383..756d0561f3 100644
--- a/addons/core/functions/fn_isAutoWind.sqf
+++ b/addons/core/functions/fn_isAutoWind.sqf
@@ -10,4 +10,4 @@
* This mission has automatic wind? (Bool)
*/
-["Mission", "Intel", "windForced"] call GVAR(fnc_getNumberFromMissionSQM) != 1
+["Mission", "Intel", "windForced"] call FUNC(getNumberFromMissionSQM) != 1
diff --git a/addons/core/functions/fn_isEOD.sqf b/addons/core/functions/fn_isEOD.sqf
index c1ee031573..257d6b0d5d 100644
--- a/addons/core/functions/fn_isEOD.sqf
+++ b/addons/core/functions/fn_isEOD.sqf
@@ -1,5 +1,5 @@
/*
- Name: GVAR(fnc_isEOD)
+ Name: FUNC(isEOD)
Author: Garth de Wet (LH)
@@ -16,7 +16,7 @@
BOOLEAN
Example:
- _isSpecialist = [player] call GVAR(fnc_isEOD);
+ _isSpecialist = [player] call FUNC(isEOD);
*/
private "_unit";
diff --git a/addons/core/functions/fn_isPlayer.sqf b/addons/core/functions/fn_isPlayer.sqf
index a60b615c96..992e213776 100644
--- a/addons/core/functions/fn_isPlayer.sqf
+++ b/addons/core/functions/fn_isPlayer.sqf
@@ -11,4 +11,4 @@
* Bool: is unit a player?
*/
-isPlayer (_this select 0) || {_this select 0 == call GVAR(fnc_player)}
+isPlayer (_this select 0) || {_this select 0 == call FUNC(player)}
diff --git a/addons/core/functions/fn_isTurnedOut.sqf b/addons/core/functions/fn_isTurnedOut.sqf
index 535ee1b812..e4acc89240 100644
--- a/addons/core/functions/fn_isTurnedOut.sqf
+++ b/addons/core/functions/fn_isTurnedOut.sqf
@@ -21,9 +21,9 @@ if (_unit == driver _vehicle) then {
_action = getText (_config >> "driverAction");
_inAction = getText (_config >> "driverInAction");
} else {
- _turretIndex = [_unit] call GVAR(fnc_getTurretIndex);
+ _turretIndex = [_unit] call FUNC(getTurretIndex);
- _config = [_config, _turretIndex] call GVAR(fnc_getTurretConfigPath);
+ _config = [_config, _turretIndex] call FUNC(getTurretConfigPath);
_action = getText (_config >> "gunnerAction");
_inAction = getText (_config >> "gunnerInAction");
diff --git a/addons/core/functions/fn_map.sqf b/addons/core/functions/fn_map.sqf
index 3884348ca9..c1f3ab4802 100644
--- a/addons/core/functions/fn_map.sqf
+++ b/addons/core/functions/fn_map.sqf
@@ -11,7 +11,7 @@
* Final array
*
* Usage:
- * [["2", "gobblecock", "25"], {parseNumber _this}] call GVAR(fnc_map) ==> [2, 0, 25]
+ * [["2", "gobblecock", "25"], {parseNumber _this}] call FUNC(map) ==> [2, 0, 25]
*/
private ["_array", "_code"];
diff --git a/addons/core/functions/fn_moduleCheckPBOs.sqf b/addons/core/functions/fn_moduleCheckPBOs.sqf
index dd55133c76..9e502fc325 100644
--- a/addons/core/functions/fn_moduleCheckPBOs.sqf
+++ b/addons/core/functions/fn_moduleCheckPBOs.sqf
@@ -24,7 +24,7 @@ if (isNil "_whitelist") then {
_whitelist = [];
};
-_whitelist = [_whitelist, {toLower _this}] call GVAR(fnc_map);
+_whitelist = [_whitelist, {toLower _this}] call FUNC(map);
AGM_Version_CheckAll = _checkAll;
AGM_Version_Whitelist = _whitelist;
@@ -67,7 +67,7 @@ if (!isServer) then {
_error = _error + "Newer version; ";
};
- //[_error, "{systemChat _this}"] call GVAR(fnc_execRemoteFnc);
+ //[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
diag_log text _error;
_text = composeText [lineBreak, parseText format ["%1", _text]];
@@ -87,7 +87,7 @@ if (!isServer) then {
if (_mode == 2) then {
sleep 10;
waitUntil {alive player};
- [player] call GVAR(fnc_adminKick);
+ [player] call FUNC(adminKick);
};
};
};
diff --git a/addons/core/functions/fn_muteUnit.sqf b/addons/core/functions/fn_muteUnit.sqf
index ae9704c10c..0175118b50 100644
--- a/addons/core/functions/fn_muteUnit.sqf
+++ b/addons/core/functions/fn_muteUnit.sqf
@@ -19,6 +19,6 @@ if (isNull _unit) exitWith {};
_speaker = speaker _unit;
if (_speaker == "AGM_NoVoice") exitWith {};
-[0, "{(_this select 1) setSpeaker 'AGM_NoVoice'}", _unit, "AGM_Speaker"] call GVAR(fnc_execPersistentFnc);
+[0, "{(_this select 1) setSpeaker 'AGM_NoVoice'}", _unit, "AGM_Speaker"] call FUNC(execPersistentFnc);
_unit setVariable ["AGM_OriginalSpeaker", _speaker, true];
diff --git a/addons/core/functions/fn_numberToDigitsString.sqf b/addons/core/functions/fn_numberToDigitsString.sqf
index 82b6aa4cdf..492137009f 100644
--- a/addons/core/functions/fn_numberToDigitsString.sqf
+++ b/addons/core/functions/fn_numberToDigitsString.sqf
@@ -13,7 +13,7 @@
private ["_digits", "_count", "_string", "_index"];
-_digits = _this call GVAR(fnc_numberToDigits);
+_digits = _this call FUNC(numberToDigits);
_count = count _digits;
diff --git a/addons/core/functions/fn_onLoadRscDisplayChannel.sqf b/addons/core/functions/fn_onLoadRscDisplayChannel.sqf
index 490122352b..c1b7faa1ff 100644
--- a/addons/core/functions/fn_onLoadRscDisplayChannel.sqf
+++ b/addons/core/functions/fn_onLoadRscDisplayChannel.sqf
@@ -1,5 +1,5 @@
/*
- Name: GVAR(fnc_onLoadRscDisplayChannel)
+ Name: FUNC(onLoadRscDisplayChannel)
Author: Pabst Mirror, commy2
diff --git a/addons/core/functions/fn_progressBar.sqf b/addons/core/functions/fn_progressBar.sqf
index f48a888618..37d353940e 100644
--- a/addons/core/functions/fn_progressBar.sqf
+++ b/addons/core/functions/fn_progressBar.sqf
@@ -15,7 +15,7 @@
*/
closeDialog 0;
-createDialog "GVAR(ProgressBar_Dialog)";
+createDialog QGVAR(ProgressBar_Dialog);
_this spawn {
_time = _this select 0;
@@ -25,8 +25,8 @@ _this spawn {
_function2 = call compile (_this select 4);
disableSerialization;
- _ctrlProgressBar = uiNamespace getVariable "GVAR(ctrlProgressBar)";
- _ctrlProgressBarTitle = uiNamespace getVariable "GVAR(ctrlProgressBarTitle)";
+ _ctrlProgressBar = uiNamespace getVariable QGVAR(ctrlProgressBar);
+ _ctrlProgressBarTitle = uiNamespace getVariable QGVAR(ctrlProgressBarTitle);
_ctrlProgressBar ctrlSetPosition [
safezoneX + 0.1 * safezoneW,
@@ -42,7 +42,7 @@ _this spawn {
_time = time + _time;
waitUntil {
//make sure the progressBar is still open, not just any dialog
- (isNull (uiNamespace getVariable ["GVAR(ctrlProgressBar)", controlNull])) || {!alive AGM_player} || {time > _time}
+ (isNull (uiNamespace getVariable [QGVAR(ctrlProgressBar), controlNull])) || {!alive AGM_player} || {time > _time}
};
closeDialog 0;
@@ -51,7 +51,7 @@ _this spawn {
if (time > _time) then {
_arguments call _function;
} else {
- [localize "STR_GVAR(ActionAborted)"] call GVAR(fnc_displayTextStructured);
+ [localize QOUTE(DOUBLES(STR,GVAR(ActionAborted)))] call FUNC(displayTextStructured);
if (!isNil "_function2") then {
_progress = 1 - ((_time - time) / (_this select 0)) max 0 min 1;
_arguments call _function2;
diff --git a/addons/core/functions/fn_queueAnimation.sqf b/addons/core/functions/fn_queueAnimation.sqf
index 94bbc21502..eea4118dea 100644
--- a/addons/core/functions/fn_queueAnimation.sqf
+++ b/addons/core/functions/fn_queueAnimation.sqf
@@ -3,7 +3,7 @@
terminate (missionNamespace getVariable ["AGM_waitForAnimationHandle", scriptNull]);
AGM_waitForAnimationHandle = _this spawn {
- waitUntil {!([_this select 0] call GVAR(fnc_inTransitionAnim))};
+ waitUntil {!([_this select 0] call FUNC(inTransitionAnim))};
- _this call GVAR(fnc_doAnimation);
+ _this call FUNC(doAnimation);
};
diff --git a/addons/core/functions/fn_readBooleanParameterFromModule.sqf b/addons/core/functions/fn_readBooleanParameterFromModule.sqf
index 91e538bbbd..6d9c51f184 100644
--- a/addons/core/functions/fn_readBooleanParameterFromModule.sqf
+++ b/addons/core/functions/fn_readBooleanParameterFromModule.sqf
@@ -24,4 +24,4 @@ if (isNil {_logic getVariable _moduleParameterName}) exitWith {
};
// Set the parameter
-[_agmParameterName , if (_logic getVariable _moduleParameterName) then {1} else {0}] call GVAR(fnc_setParameter);
+[_agmParameterName , if (_logic getVariable _moduleParameterName) then {1} else {0}] call FUNC(setParameter);
diff --git a/addons/core/functions/fn_readNumericParameterFromModule.sqf b/addons/core/functions/fn_readNumericParameterFromModule.sqf
index 05bdf00f85..723c0945a4 100644
--- a/addons/core/functions/fn_readNumericParameterFromModule.sqf
+++ b/addons/core/functions/fn_readNumericParameterFromModule.sqf
@@ -30,4 +30,4 @@ if (typeName _value == "STRING") then {
};
// Set the parameter
-[_agmParameterName, _value] call GVAR(fnc_setParameter);
+[_agmParameterName, _value] call FUNC(setParameter);
diff --git a/addons/core/functions/fn_restoreVariablesJIP.sqf b/addons/core/functions/fn_restoreVariablesJIP.sqf
index a48f6e296b..04d08e83b9 100644
--- a/addons/core/functions/fn_restoreVariablesJIP.sqf
+++ b/addons/core/functions/fn_restoreVariablesJIP.sqf
@@ -1,7 +1,7 @@
/*
* Author: commy2
*
- * Called from respawn eventhandler. Resets all public object namespace variables that are added via GVAR(fnc_setVariableJIP).
+ * Called from respawn eventhandler. Resets all public object namespace variables that are added via FUNC(setVariableJIP).
*
* Argument:
* 0: Object (Object)
@@ -24,4 +24,4 @@ _respawnVariables pushBack "AGM_PersistentFunctions";
} forEach _respawnVariables;
// fix speaker after respawn
-[_unit, format ["{_this setSpeaker '%1'}", speaker _unit], 2] call GVAR(fnc_execRemoteFnc);
+[_unit, format ["{_this setSpeaker '%1'}", speaker _unit], 2] call FUNC(execRemoteFnc);
diff --git a/addons/core/functions/fn_revertKeyCodeLocalized.sqf b/addons/core/functions/fn_revertKeyCodeLocalized.sqf
index 2c42127c36..d7bd7cff99 100644
--- a/addons/core/functions/fn_revertKeyCodeLocalized.sqf
+++ b/addons/core/functions/fn_revertKeyCodeLocalized.sqf
@@ -19,19 +19,19 @@ _key = toString ((toArray keyName floor _keyCode) - [34]);
_keyCode = round ((_keyCode % 1) * 10);
switch (_keyCode) do {
- case 8 : {format [localize "STR_GVAR(DoubleTapKey)", _key]};
- case 9 : {format [localize "STR_GVAR(HoldKey)", _key]};
+ case 8 : {format [localize QUOTE(DOUBLES(STR,GVAR(DoubleTapKey))), _key]};
+ case 9 : {format [localize QUOTE(DOUBLES(STR,GVAR(HoldKey))), _key]};
default {
- _keyCode = toArray ([_keyCode, 3] call GVAR(fnc_toBin));
+ _keyCode = toArray ([_keyCode, 3] call FUNC(toBin));
_alt = "1" == toString [_keyCode select 0];
_ctrl = "1" == toString [_keyCode select 1];
_shift = "1" == toString [_keyCode select 2];
format ["%1%2%3%4",
- ["", format ["%1 + ", localize "STR_GVAR(Alt)"]] select _alt,
- ["", format ["%1 + ", localize "STR_GVAR(Ctrl)"]] select _ctrl,
- ["", format ["%1 + ", localize "STR_GVAR(Shift)"]] select _shift,
+ ["", format ["%1 + ", localize QUOTE(DOUBLES(STR,GVAR(Alt)))]] select _alt,
+ ["", format ["%1 + ", localize QUOTE(DOUBLES(STR,GVAR(Ctrl)))]] select _ctrl,
+ ["", format ["%1 + ", localize QUOTE(DOUBLES(STR,GVAR(Shift)))]] select _shift,
_key
]
};
diff --git a/addons/core/functions/fn_serverLog.sqf b/addons/core/functions/fn_serverLog.sqf
index 275be41e85..8e4b99d50d 100644
--- a/addons/core/functions/fn_serverLog.sqf
+++ b/addons/core/functions/fn_serverLog.sqf
@@ -3,5 +3,5 @@
if (isServer) then {
diag_log _this;
} else {
- [_this, "GVAR(fnc_serverLog)", 1] call GVAR(fnc_execRemoteFnc);
+ [_this, QUOTE(FUNC(serverLog)), 1] call FUNC(execRemoteFnc);
};
diff --git a/addons/core/functions/fn_setCaptivityStatus.sqf b/addons/core/functions/fn_setCaptivityStatus.sqf
index fa65793800..792a893fa7 100644
--- a/addons/core/functions/fn_setCaptivityStatus.sqf
+++ b/addons/core/functions/fn_setCaptivityStatus.sqf
@@ -29,7 +29,7 @@ if !(_reason in _captivityReasons) then {
};
// get reasons why the unit is captive already and update to the new status
-_unitCaptivityReasons = [_unit] call GVAR(fnc_getCaptivityStatus);
+_unitCaptivityReasons = [_unit] call FUNC(getCaptivityStatus);
_captivityReasonsBooleans = [];
{
@@ -38,7 +38,7 @@ _captivityReasonsBooleans = [];
_captivityReasonsBooleans set [_captivityReasons find _reason, _status];
-_bitmask = _captivityReasonsBooleans call GVAR(fnc_toBitmask);
+_bitmask = _captivityReasonsBooleans call FUNC(toBitmask);
// actually apply the setCaptive command globaly
-[[_unit, _bitmask], "{(_this select 0) setCaptive (_this select 1)}", _unit] call GVAR(fnc_execRemoteFnc);
+[[_unit, _bitmask], "{(_this select 0) setCaptive (_this select 1)}", _unit] call FUNC(execRemoteFnc);
diff --git a/addons/core/functions/fn_setForceWalkStatus.sqf b/addons/core/functions/fn_setForceWalkStatus.sqf
index b33fd216a3..4aab1a9998 100644
--- a/addons/core/functions/fn_setForceWalkStatus.sqf
+++ b/addons/core/functions/fn_setForceWalkStatus.sqf
@@ -1,5 +1,5 @@
/*
-Name: GVAR(fnc_setForceWalkStatus)
+Name: FUNC(setForceWalkStatus)
Author: Pabst Mirror (from captivity by commy2)
@@ -16,7 +16,7 @@ Returns:
None
Example:
- [AGM_Player, "BrokenLeg", true] call GVAR(fnc_setForceWalkStatus)
+ [AGM_Player, "BrokenLeg", true] call FUNC(setForceWalkStatus)
*/
private ["_unit", "_reason", "_status", "_forceWalkReasons", "_unitForceWalkReasons", "_forceWalkReasonsBooleans", "_bitmaskNumber"];
@@ -35,7 +35,7 @@ if !(_reason in _forceWalkReasons) then {
};
// get reasons why the unit is forceWalking already and update to the new status
-_unitForceWalkReasons = [_unit] call GVAR(fnc_getForceWalkStatus);
+_unitForceWalkReasons = [_unit] call FUNC(getForceWalkStatus);
_forceWalkReasonsBooleans = [];
{
@@ -44,9 +44,9 @@ _forceWalkReasonsBooleans = [];
_forceWalkReasonsBooleans set [_forceWalkReasons find _reason, _status];
-_bitmaskNumber = _forceWalkReasonsBooleans call GVAR(fnc_toBitmask);
+_bitmaskNumber = _forceWalkReasonsBooleans call FUNC(toBitmask);
_unit setVariable ["AGM_forceWalkStatusNumber", _bitmaskNumber, true];
// actually apply the forceWalk command globaly
-[[_unit], "GVAR(fnc_applyForceWalkStatus)", _unit] call GVAR(fnc_execRemoteFnc);
+[[_unit], QUOTE(FUNC(applyForceWalkStatus)), _unit] call FUNC(execRemoteFnc);
diff --git a/addons/core/functions/fn_setKeyDefault.sqf b/addons/core/functions/fn_setKeyDefault.sqf
index 1554084e89..5882603038 100644
--- a/addons/core/functions/fn_setKeyDefault.sqf
+++ b/addons/core/functions/fn_setKeyDefault.sqf
@@ -16,7 +16,7 @@ _overwrite = _this select 0;
_saveProfile = false;
-_config = configFile >> "GVAR(Default_Keys)";
+_config = configFile >> QGVAR(Default_Keys);
_count = count _config;
for "_index" from 0 to (_count - 1) do {
@@ -30,14 +30,14 @@ for "_index" from 0 to (_count - 1) do {
_ctrl = getNumber (_configFile >> "Control") == 1;
_alt = getNumber (_configFile >> "Alt") == 1;
- _keyCode = [_key, _shft, _ctrl, _alt] call GVAR(fnc_convertKeyCode);
+ _keyCode = [_key, _shft, _ctrl, _alt] call FUNC(convertKeyCode);
profileNamespace setVariable [_name, _keyCode];
_saveProfile = true;
};
};
-_config = configFile >> "GVAR(Options)";
+_config = configFile >> QGVAR(Options);
_count = count _config;
for "_index" from 0 to (_count - 1) do {
diff --git a/addons/core/functions/fn_setName.sqf b/addons/core/functions/fn_setName.sqf
index 452b3b973a..c5736e0a03 100644
--- a/addons/core/functions/fn_setName.sqf
+++ b/addons/core/functions/fn_setName.sqf
@@ -17,7 +17,7 @@ _unit = _this select 0;
if (isNull _unit || {!alive _unit}) exitWith {};
if (_unit isKindOf "CAManBase") then {
- _name = [name _unit, true] call GVAR(fnc_sanitizeString);
+ _name = [name _unit, true] call FUNC(sanitizeString);
//if (_name != _unit getVariable ["AGM_Name", ""]) then {
_unit setVariable ["AGM_Name", _name, true];
diff --git a/addons/core/functions/fn_stringToColoredText.sqf b/addons/core/functions/fn_stringToColoredText.sqf
index 2f5530c6f5..4f90a92984 100644
--- a/addons/core/functions/fn_stringToColoredText.sqf
+++ b/addons/core/functions/fn_stringToColoredText.sqf
@@ -17,11 +17,11 @@ _string = format ["%1", _this select 0];
_color = _this select 1;
_color = (
- [255 * (_color select 0), 2] call GVAR(fnc_toHex)
+ [255 * (_color select 0), 2] call FUNC(toHex)
) + (
- [255 * (_color select 1), 2] call GVAR(fnc_toHex)
+ [255 * (_color select 1), 2] call FUNC(toHex)
) + (
- [255 * (_color select 2), 2] call GVAR(fnc_toHex)
+ [255 * (_color select 2), 2] call FUNC(toHex)
);
parseText format ["%1", _string, _color];
diff --git a/addons/core/functions/fn_toNumber.sqf b/addons/core/functions/fn_toNumber.sqf
index a467f105b7..053714d3ca 100644
--- a/addons/core/functions/fn_toNumber.sqf
+++ b/addons/core/functions/fn_toNumber.sqf
@@ -1,5 +1,5 @@
/*
- Name: GVAR(fnc_toNumber)
+ Name: FUNC(toNumber)
Author(s):
Garth de Wet (LH)
@@ -14,7 +14,7 @@
NUMBER
Example:
- _number = ["102"] call GVAR(fnc_toNumber);
+ _number = ["102"] call FUNC(toNumber);
*/
if (TYPENAME(_this select 0) == "SCALAR")exitWith {
(_this select 0)
diff --git a/addons/core/functions/fn_unmuteUnit.sqf b/addons/core/functions/fn_unmuteUnit.sqf
index dcb998094b..3e2dae2c22 100644
--- a/addons/core/functions/fn_unmuteUnit.sqf
+++ b/addons/core/functions/fn_unmuteUnit.sqf
@@ -19,4 +19,4 @@ if (isNull _unit) exitWith {};
_speaker = _unit getVariable ["AGM_OriginalSpeaker", ""];
if (_speaker == "") exitWith {};
-[0, format ["{(_this select 1) setSpeaker '%1'}", _speaker], _unit, "AGM_Speaker"] call GVAR(fnc_execPersistentFnc);
+[0, format ["{(_this select 1) setSpeaker '%1'}", _speaker], _unit, "AGM_Speaker"] call FUNC(execPersistentFnc);
diff --git a/addons/core/scripts/KeyInput/initCanInteractFunction.sqf b/addons/core/scripts/KeyInput/initCanInteractFunction.sqf
index 7dce174f44..ed0cc60042 100644
--- a/addons/core/scripts/KeyInput/initCanInteractFunction.sqf
+++ b/addons/core/scripts/KeyInput/initCanInteractFunction.sqf
@@ -4,7 +4,7 @@ private ["_function", "_configFile", "_count", "_index", "_config", "_configName
_function = "private '_exceptions'; _exceptions = _this; alive AGM_player";
-_configFile = configFile >> "GVAR(canInteractConditions)";
+_configFile = configFile >> QGVAR(canInteractConditions);
_count = count _configFile;
for "_index" from 0 to (_count -1) do {
diff --git a/addons/core/scripts/KeyInput/initKeys.sqf b/addons/core/scripts/KeyInput/initKeys.sqf
index ba40049da6..cf24748840 100644
--- a/addons/core/scripts/KeyInput/initKeys.sqf
+++ b/addons/core/scripts/KeyInput/initKeys.sqf
@@ -1,9 +1,9 @@
// by commy2
-_config = configFile >> "GVAR(Default_Keys)";
+_config = configFile >> QGVAR(Default_Keys);
_count = count _config;
-_header = "_keyCode = [_this select 1, _this select 2, _this select 3, _this select 4] call GVAR(fnc_convertKeyCode); _keyIndex = floor _keyCode; if (_keyIndex == 0) exitWith {false}; if (!(profileNamespace getVariable ['AGM_enableNumberHotkeys', true]) && {_keyIndex < 12} && {_keyIndex > 1} && {_keyCode mod 1 == 0}) exitWith {false}; _time = time; _player = AGM_player; _vehicle = vehicle _player; _isInput = false;";
+_header = "_keyCode = [_this select 1, _this select 2, _this select 3, _this select 4] call FUNC(convertKeyCode); _keyIndex = floor _keyCode; if (_keyIndex == 0) exitWith {false}; if (!(profileNamespace getVariable ['AGM_enableNumberHotkeys', true]) && {_keyIndex < 12} && {_keyIndex > 1} && {_keyCode mod 1 == 0}) exitWith {false}; _time = time; _player = AGM_player; _vehicle = vehicle _player; _isInput = false;";
_headerUp = "_keyCode = _this select 1; _keyIndex = _keyCode; if (_keyIndex == 0) exitWith {false}; _time = time; _player = AGM_player; _vehicle = vehicle _player;";
_handleDoubleTap = "if (_time < (GVAR(keyTimes) select _keyIndex) + 0.5 && {_keyIndex == _keyCode}) then {_keyCode = _keyIndex + 0.8};";
@@ -56,7 +56,7 @@ for "_index" from 0 to (_count - 1) do {
};
_halt = "if (!(_allowHold) || {_disallowHold}) then {GVAR(keyStates) set [_keyIndex, (GVAR(keyStates) select _keyIndex) + 1]; GVAR(keyTimes) set [_keyIndex, _time];};";
-_haltUp = "GVAR(keyStates) set [_keyIndex, 0];";
+_haltUp = QGVAR(keyStates) set [_keyIndex, 0];;
//_return = "_isInput";
_return = "if (profileNamespace getVariable ['AGM_enableNumberHotkeys', true] && {_keyIndex < 12} && {_keyIndex > 1}) then {true} else {_isInput}";
diff --git a/addons/core/scripts/Version/checkVersionNumber.sqf b/addons/core/scripts/Version/checkVersionNumber.sqf
index 3407269770..4e7049eeb2 100644
--- a/addons/core/scripts/Version/checkVersionNumber.sqf
+++ b/addons/core/scripts/Version/checkVersionNumber.sqf
@@ -131,7 +131,7 @@ if (!isServer) then {
_error = _error call _fnc_cutComma;
diag_log text _error;
- [_error, "{systemChat _this}"] call GVAR(fnc_execRemoteFnc);
+ [_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
};
_missingAddonServer = false;
@@ -148,7 +148,7 @@ if (!isServer) then {
_error = _error call _fnc_cutComma;
diag_log text _error;
- [_error, "{systemChat _this}"] call GVAR(fnc_execRemoteFnc);
+ [_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
};
_oldVersionClient = false;
@@ -165,7 +165,7 @@ if (!isServer) then {
_error = _error call _fnc_cutComma;
diag_log text _error;
- [_error, "{systemChat _this}"] call GVAR(fnc_execRemoteFnc);
+ [_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
};
_oldVersionServer = false;
@@ -182,7 +182,7 @@ if (!isServer) then {
_error = _error call _fnc_cutComma;
diag_log text _error;
- [_error, "{systemChat _this}"] call GVAR(fnc_execRemoteFnc);
+ [_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
};
AGM_Version_ClientErrors = [_missingAddon, _missingAddonServer, _oldVersionClient, _oldVersionServer];
diff --git a/addons/core/scripts/closeMenu.sqf b/addons/core/scripts/closeMenu.sqf
index d2d62d018d..f641bc499c 100644
--- a/addons/core/scripts/closeMenu.sqf
+++ b/addons/core/scripts/closeMenu.sqf
@@ -1,4 +1,4 @@
// by commy2
closeDialog 0;
-[localize "STR_GVAR(ProfileNotSaved)"] call GVAR(fnc_displayTextStructured);
+[localize QUOTE(DOUBLES(STR,GVAR(ProfileNotSaved)))] call FUNC(displayTextStructured);
diff --git a/addons/core/scripts/editKey.sqf b/addons/core/scripts/editKey.sqf
index 43d4aa986d..4d55a9808b 100644
--- a/addons/core/scripts/editKey.sqf
+++ b/addons/core/scripts/editKey.sqf
@@ -5,17 +5,17 @@
#define OFFSET_1 100
#define OFFSET_2 200
-waitUntil {isNil "GVAR(keyNewTemp)"};
+waitUntil {isNil QGVAR(keyNewTemp)};
GVAR(keyNewTemp) = [];
GVAR(keySet) = 0;
_index = count GVAR(keyNew);
disableSerialization;
-_dlgMenuDialog = uiNamespace getVariable "GVAR(MenuDialog)";
+_dlgMenuDialog = uiNamespace getVariable QGVAR(MenuDialog);
_ctrlMenuDialog = _dlgMenuDialog displayCtrl (OFFSET_2 + (_this select 0));
_action = GVAR(keyNames) select (_this select 0);
-_displayName = getText (configFile >> "GVAR(Default_Keys)" >> _action >> "displayName");
+_displayName = getText (configFile >> QGVAR(Default_Keys)" >> _action >> "displayName);
_keyCode = profileNamespace getVariable [format ["AGM_Key_%1", _action], 0];//
for "_index1" from 0 to (count GVAR(keyNew) - 1) do {
@@ -23,7 +23,7 @@ for "_index1" from 0 to (count GVAR(keyNew) - 1) do {
_keyCode = (GVAR(keyNew) select _index1) select 1;
}
};
-(_dlgMenuDialog displayCtrl 24) ctrlSetText ([_keyCode] call GVAR(fnc_revertKeyCodeLocalized));//"";
+(_dlgMenuDialog displayCtrl 24) ctrlSetText ([_keyCode] call FUNC(revertKeyCodeLocalized));//"";
/*(_dlgMenuDialog displayCtrl 21) ctrlSetTextColor GRAY;
(_dlgMenuDialog displayCtrl 22) ctrlSetTextColor GRAY;
(_dlgMenuDialog displayCtrl 23) ctrlSetTextColor GRAY;*/
@@ -40,7 +40,7 @@ GVAR(keysetDefault) = compile format [
_ctrl = getNumber (_configFile >> 'Control') == 1;
_alt = getNumber (_configFile >> 'Alt') == 1;
- _keyCode = [_key, _shft, _ctrl, _alt] call GVAR(fnc_convertKeyCode);
+ _keyCode = [_key, _shft, _ctrl, _alt] call FUNC(convertKeyCode);
GVAR(keyNewTemp) = [_key, [_shft, _ctrl, _alt], _keyCode];",
_action
@@ -59,20 +59,20 @@ waitUntil {
//_keyCode = round (10 * ((GVAR(keyNewTemp) select 2) % 1));
_keyCode = GVAR(keyNewTemp) select 2;
- (_dlgMenuDialog displayCtrl 24) ctrlSetText ([_keyCode] call GVAR(fnc_revertKeyCodeLocalized));
+ (_dlgMenuDialog displayCtrl 24) ctrlSetText ([_keyCode] call FUNC(revertKeyCodeLocalized));
/*_key = toString (toArray (keyName _key) - [34]);
switch (_keyCode) do {
case 8 : {
- (_dlgMenuDialog displayCtrl 24) ctrlSetText format [localize "STR_GVAR(DoubleTapKey)", _key];
+ (_dlgMenuDialog displayCtrl 24) ctrlSetText format [localize QUOTE(DOUBLES(STR,GVAR(DoubleTapKey))), _key];
(_dlgMenuDialog displayCtrl 21) ctrlSetTextColor GRAY;
(_dlgMenuDialog displayCtrl 22) ctrlSetTextColor GRAY;
(_dlgMenuDialog displayCtrl 23) ctrlSetTextColor GRAY;
};
case 9 : {
- (_dlgMenuDialog displayCtrl 24) ctrlSetText format [localize "STR_GVAR(HoldKey)", _key];
+ (_dlgMenuDialog displayCtrl 24) ctrlSetText format [localize QUOTE(DOUBLES(STR,GVAR(HoldKey))), _key];
(_dlgMenuDialog displayCtrl 21) ctrlSetTextColor GRAY;
(_dlgMenuDialog displayCtrl 22) ctrlSetTextColor GRAY;
@@ -99,7 +99,7 @@ _dlgMenuDialog displayRemoveEventHandler ["KeyUp", _ehid_keyup];
if (GVAR(keySet) == 1 && {count GVAR(keyNewTemp) > 0}) then {
_keyCode = GVAR(keyNewTemp) select 2;
- _description = [_keyCode] call GVAR(fnc_revertKeyCodeLocalized);
+ _description = [_keyCode] call FUNC(revertKeyCodeLocalized);
_ctrlMenuDialog ctrlSetText _description;
GVAR(keyNew) set [_index, [_action, _keyCode]];
diff --git a/addons/core/scripts/keyInput.sqf b/addons/core/scripts/keyInput.sqf
index 90cece0f90..3c3c15fb35 100644
--- a/addons/core/scripts/keyInput.sqf
+++ b/addons/core/scripts/keyInput.sqf
@@ -9,7 +9,7 @@ _alt =_this select 4;
if (_key in FORBIDDEN_KEYS) exitWith {true};
-_keyCode = [_key, _shft, _ctrl, _alt] call GVAR(fnc_convertKeyCode);
+_keyCode = [_key, _shft, _ctrl, _alt] call FUNC(convertKeyCode);
_keyIndex = floor _keyCode;
_time = time;
diff --git a/addons/core/scripts/nextKeys.sqf b/addons/core/scripts/nextKeys.sqf
index 6f5af7977c..ff544f312c 100644
--- a/addons/core/scripts/nextKeys.sqf
+++ b/addons/core/scripts/nextKeys.sqf
@@ -6,7 +6,7 @@
#define OFFSET_4 400
#define OFFSET_5 500
-_config = configFile >> "GVAR(Default_Keys)";
+_config = configFile >> QGVAR(Default_Keys);
_count = count _config;
_countPages = ceil (_count / 20) + 1;
@@ -17,7 +17,7 @@ if (GVAR(MenuPage) == - 1) then {GVAR(MenuPage) = _countPages - 1};
if (GVAR(MenuPage) > _countPages - 1) then {GVAR(MenuPage) = 0};
disableSerialization;
-_dlgMenuDialog = uiNamespace getVariable "GVAR(MenuDialog)";
+_dlgMenuDialog = uiNamespace getVariable QGVAR(MenuDialog);
(_dlgMenuDialog displayCtrl 14) ctrlSetText format ["%1/%2", GVAR(MenuPage) + 1, _countPages];
@@ -25,7 +25,7 @@ if (GVAR(MenuPage) == _countPages - 1) then {
for "_index" from OFFSET_1 to (OFFSET_1 + 19) do {(_dlgMenuDialog displayCtrl _index) ctrlShow false};
for "_index" from OFFSET_2 to (OFFSET_2 + 19) do {(_dlgMenuDialog displayCtrl _index) ctrlShow false};
- _config = configFile >> "GVAR(Options)";
+ _config = configFile >> QGVAR(Options);
_count = count _config;
_offset = 0;
@@ -40,7 +40,7 @@ if (GVAR(MenuPage) == _countPages - 1) then {
_control2 = _dlgMenuDialog displayCtrl (OFFSET_4 + _index);
_control3 = _dlgMenuDialog displayCtrl (OFFSET_5 + _index);
- _control1 ctrlSetText format ["\AGM_Core\UI\box_%1checked_ca.paa", ["un", ""] select _state];
+ _control1 ctrlSetText format [PATHTOF(UI\box_%1checked_ca.paa", ["un", ")] select _state];
_control2 ctrlSetText _displayName;
_control1 ctrlShow true;
@@ -96,7 +96,7 @@ if (GVAR(MenuPage) == _countPages - 1) then {
_updateKeys select _indexUpdate;
};
- _description = [_keyCode] call GVAR(fnc_revertKeyCodeLocalized);
+ _description = [_keyCode] call FUNC(revertKeyCodeLocalized);
_control1 = _dlgMenuDialog displayCtrl (OFFSET_1 + _index);
_control2 = _dlgMenuDialog displayCtrl (OFFSET_2 + _index);
diff --git a/addons/core/scripts/openMenu.sqf b/addons/core/scripts/openMenu.sqf
index 672f92abd1..12383b2f88 100644
--- a/addons/core/scripts/openMenu.sqf
+++ b/addons/core/scripts/openMenu.sqf
@@ -4,7 +4,7 @@
#define OFFSET_2 200
closeDialog 0;
-createDialog "GVAR(OptionsMenu_Dialog)";
+createDialog QGVAR(OptionsMenu_Dialog);
GVAR(keyNew) = [];
GVAR(keySet) = -1;
@@ -16,12 +16,12 @@ GVAR(OptionNamesNew) = [];
GVAR(OptionStatesNew) = [];
disableSerialization;
-_dlgMenuDialog = uiNamespace getVariable "GVAR(MenuDialog)";
+_dlgMenuDialog = uiNamespace getVariable QGVAR(MenuDialog);
_ehid_keydown = _dlgMenuDialog displayAddEventHandler ["KeyDown", "_this select 1 > 1"];
_ehid_keyup = _dlgMenuDialog displayAddEventHandler ["KeyUp", "_this select 1 > 1"];
-_config = configFile >> "GVAR(Default_Keys)";
+_config = configFile >> QGVAR(Default_Keys);
_count = count _config;
_countPages = ceil (_count / 20) + 1;
@@ -34,7 +34,7 @@ for "_index" from 0 to (_count - 1 min 19) do {
_isDisabled = getNumber (_configFile >> "disabled") == 1;
_keyCode = profileNamespace getVariable format ["AGM_Key_%1", _keyName];
- _description = [_keyCode] call GVAR(fnc_revertKeyCodeLocalized);
+ _description = [_keyCode] call FUNC(revertKeyCodeLocalized);
_control1 = _dlgMenuDialog displayCtrl (OFFSET_1 + _index);
_control2 = _dlgMenuDialog displayCtrl (OFFSET_2 + _index);
@@ -83,12 +83,12 @@ if (GVAR(keySave) == 1) then {
if (_count0 > 0 || {_count1 > 0}) then {
saveProfileNamespace;
- [localize "STR_GVAR(ProfileSaved)"] call GVAR(fnc_displayTextStructured);
+ [localize QUOTE(DOUBLES(STR,GVAR(ProfileSaved)))] call FUNC(displayTextStructured);
} else {
- [localize "STR_GVAR(ProfileNotSaved)"] call GVAR(fnc_displayTextStructured);
+ [localize QUOTE(DOUBLES(STR,GVAR(ProfileNotSaved)))] call FUNC(displayTextStructured);
};
} else {
- [localize "STR_GVAR(ProfileNotSaved)"] call GVAR(fnc_displayTextStructured);
+ [localize QUOTE(DOUBLES(STR,GVAR(ProfileNotSaved)))] call FUNC(displayTextStructured);
};
GVAR(keyNewTemp) = nil;
diff --git a/addons/core/scripts/readParameters.sqf b/addons/core/scripts/readParameters.sqf
index e99e66906e..363b4915d5 100644
--- a/addons/core/scripts/readParameters.sqf
+++ b/addons/core/scripts/readParameters.sqf
@@ -8,7 +8,7 @@ for "_index" from 0 to (_count - 1) do {
_name = configName _x;
_value = _x call bis_fnc_getcfgdata;
- [_name, _value] call GVAR(fnc_setParameter);
+ [_name, _value] call FUNC(setParameter);
};
_config = configFile >> "AGM_Parameters_Numeric";
@@ -18,7 +18,7 @@ for "_index" from 0 to (_count - 1) do {
_name = configName _x;
_value = _x call bis_fnc_getcfgdata;
- [_name, _value] call GVAR(fnc_setParameter);
+ [_name, _value] call FUNC(setParameter);
};
_config = configFile >> "AGM_Parameters_Boolean";
@@ -28,7 +28,7 @@ for "_index" from 0 to (_count - 1) do {
_name = configName _x;
_value = _x call bis_fnc_getcfgdata;
- [_name, _value > 0] call GVAR(fnc_setParameter);
+ [_name, _value > 0] call FUNC(setParameter);
};
@@ -40,7 +40,7 @@ for "_index" from 0 to (_count - 1) do {
_name = configName _x;
_value = _x call bis_fnc_getcfgdata;
- [_name, _value] call GVAR(fnc_setParameter);
+ [_name, _value] call FUNC(setParameter);
};
_config = missionConfigFile >> "AGM_Parameters_Numeric";
@@ -50,7 +50,7 @@ for "_index" from 0 to (_count - 1) do {
_name = configName _x;
_value = _x call bis_fnc_getcfgdata;
- [_name, _value] call GVAR(fnc_setParameter);
+ [_name, _value] call FUNC(setParameter);
};
_config = missionConfigFile >> "AGM_Parameters_Boolean";
@@ -60,5 +60,5 @@ for "_index" from 0 to (_count - 1) do {
_name = configName _x;
_value = _x call bis_fnc_getcfgdata;
- [_name, _value > 0] call GVAR(fnc_setParameter);
+ [_name, _value > 0] call FUNC(setParameter);
};
diff --git a/addons/core/scripts/toggleState.sqf b/addons/core/scripts/toggleState.sqf
index 2ea670d640..1bd9b09912 100644
--- a/addons/core/scripts/toggleState.sqf
+++ b/addons/core/scripts/toggleState.sqf
@@ -8,10 +8,10 @@ _index1 = GVAR(OptionNamesNew) find _name;
_state = if (_index1 == -1) then {_index1 = count GVAR(OptionNamesNew); !(profileNamespace getVariable _name)} else {!(GVAR(OptionStatesNew) select _index1)};
disableSerialization;
-_dlgMenuDialog = uiNamespace getVariable "GVAR(MenuDialog)";
+_dlgMenuDialog = uiNamespace getVariable QGVAR(MenuDialog);
_control = _dlgMenuDialog displayCtrl (300 + _index);
-_control ctrlSetText format ["\AGM_Core\UI\box_%1checked_ca.paa", ["un", ""] select _state];
+_control ctrlSetText format [PATHTOF(UI\box_%1checked_ca.paa", ["un", ")] select _state];
GVAR(OptionNamesNew) set [_index1, _name];
GVAR(OptionStatesNew) set [_index1, _state];