Stringified, GVARified, FUNCified

This commit is contained in:
jaynus 2015-01-11 10:20:14 -08:00
parent 9dc020d114
commit 800c150446
77 changed files with 228 additions and 228 deletions

View File

@ -16,14 +16,14 @@ class Extended_PostInit_EventHandlers {
class Extended_InitPost_EventHandlers { class Extended_InitPost_EventHandlers {
class All { class All {
class GVAR(executePersistent) { class GVAR(executePersistent) {
init = QUOTE([_this select 0] call GVAR(fnc_executePersistent) ); init = QUOTE([_this select 0] call FUNC(executePersistent) );
}; };
}; };
class CAManBase { class CAManBase {
class GVAR(setName) { class GVAR(setName) {
init = QUOTE(if (local (_this select 0)) then { _this call FUNC(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); }; ); 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 Extended_Respawn_EventHandlers {
class All { class All {
class GVAR(restoreVariablesJIP) { class GVAR(restoreVariablesJIP) {
respawn = QUOTE(_this call GVAR(fnc_restoreVariablesJIP) ); respawn = QUOTE(_this call FUNC(restoreVariablesJIP) );
}; };
class GVAR(setName) { class GVAR(setName) {
respawn = QUOTE(_this call GVAR(fnc_setName) ); respawn = QUOTE(_this call FUNC(setName) );
}; };
}; };
}; };

View File

@ -126,7 +126,7 @@ class CfgFunctions {
}; };
class AGM_Debug { class AGM_Debug {
class AGM_Debug { class AGM_Debug {
file = "AGM_Core\functions\Debug"; file = PATHTOF(functions\Debug);
class exportConfig; class exportConfig;
class getChildren; class getChildren;
class getDisplayConfigName; class getDisplayConfigName;
@ -139,7 +139,7 @@ class CfgFunctions {
}; };
class AGM_CuratorFix { class AGM_CuratorFix {
class AGM_CuratorFix { class AGM_CuratorFix {
file = "AGM_Core\functions\CuratorFix"; file = PATHTOF(functions\CuratorFix);
class addUnloadEventhandler; class addUnloadEventhandler;
class fixCrateContent; class fixCrateContent;
}; };

View File

@ -1,7 +1,7 @@
class CfgSounds { class CfgSounds {
class AGM_Sound_Click { class AGM_Sound_Click {
sound[] = {"\AGM_Core\sounds\AGM_click.wav", 1, 1, 200}; sound[] = {PATHTOF(sounds\AGM_click.wav), 1, 1, 200};
titles[] = {}; titles[] = {};
}; };
}; };

View File

@ -32,7 +32,7 @@ class CfgVehicles {
function = "AGM_Core_fnc_moduleCheckPBOs"; function = "AGM_Core_fnc_moduleCheckPBOs";
scope = 2; scope = 2;
isGlobal = 1; isGlobal = 1;
icon = "\AGM_Core\UI\IconCheckPBO_ca.paa"; icon = PATHTOF(UI\IconCheckPBO_ca.paa);
class Arguments { class Arguments {
class Action { class Action {
displayName = "Action"; displayName = "Action";

View File

@ -366,7 +366,7 @@ class AGM_Core_OptionsMenu_Dialog {
idc = 300; idc = 300;
//type = 0; //type = 0;
style = 48; style = 48;
text = "\AGM_Core\UI\box_unchecked_ca.paa"; text = PATHTOF(UI\box_unchecked_ca.paa);
colorBackground[] = {0, 0, 0, 0}; colorBackground[] = {0, 0, 0, 0};
colorText[] = {1, 1, 1, 1}; colorText[] = {1, 1, 1, 1};
x = (HSPACE2 + 3 * 0.1) * safezoneW + safezoneX; x = (HSPACE2 + 3 * 0.1) * safezoneW + safezoneX;

View File

@ -1,11 +1,11 @@
// BWA3 Realism - Core // BWA3 Realism - Core
// (C) 2013 KoffeinFlummi. See LICENSE. // (C) 2013 KoffeinFlummi. See LICENSE.
"GVAR(remoteFnc)" addPublicVariableEventHandler { QGVAR(remoteFnc) addPublicVariableEventHandler {
(_this select 1) call GVAR(fnc_execRemoteFnc); (_this select 1) call FUNC(execRemoteFnc);
}; };
[missionNamespace] call GVAR(fnc_executePersistent); [missionNamespace] call FUNC(executePersistent);
// check previous version number from profile // check previous version number from profile
_currentVersion = getText (configFile >> "CfgPatches" >> "AGM_Core" >> "version"); _currentVersion = getText (configFile >> "CfgPatches" >> "AGM_Core" >> "version");
@ -17,22 +17,22 @@ if (_currentVersion != _previousVersion) then {
profileNamespace setVariable ["AGM_VersionNumberString", _currentVersion]; 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 // everything that only player controlled machines need, goes below this
if (!hasInterface) exitWith {}; 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(keyInput) = compile preprocessFileLineNumbers PATHTOF(scripts\keyInput.sqf);
GVAR(keyRelease) = compile preprocessFileLineNumbers "\AGM_core\scripts\keyRelease.sqf"; GVAR(keyRelease) = compile preprocessFileLineNumbers PATHTOF(scripts\keyRelease.sqf);
GVAR(editKey) = compile preprocessFileLineNumbers "\AGM_core\scripts\editKey.sqf"; GVAR(editKey) = compile preprocessFileLineNumbers PATHTOF(scripts\editKey.sqf);
GVAR(openMenu) = compile preprocessFileLineNumbers "\AGM_core\scripts\openMenu.sqf"; GVAR(openMenu) = compile preprocessFileLineNumbers PATHTOF(scripts\openMenu.sqf);
GVAR(closeMenu) = compile preprocessFileLineNumbers "\AGM_core\scripts\closeMenu.sqf"; GVAR(closeMenu) = compile preprocessFileLineNumbers PATHTOF(scripts\closeMenu.sqf);
GVAR(nextKeys) = compile preprocessFileLineNumbers "\AGM_core\scripts\nextKeys.sqf"; GVAR(nextKeys) = compile preprocessFileLineNumbers PATHTOF(scripts\nextKeys.sqf);
GVAR(toggleState) = compile preprocessFileLineNumbers "\AGM_core\scripts\toggleState.sqf"; GVAR(toggleState) = compile preprocessFileLineNumbers PATHTOF(scripts\toggleState.sqf);
[false] call GVAR(fnc_setKeyDefault); [false] call FUNC(setKeyDefault);
GVAR(keyStates) = []; GVAR(keyStates) = [];
GVAR(keyTimes) = []; GVAR(keyTimes) = [];
@ -41,9 +41,9 @@ for "_index" from 0 to 300 do {
GVAR(keyTimes) set [_index, -1]; GVAR(keyTimes) set [_index, -1];
}; };
call compile preprocessFileLineNumbers "\AGM_core\scripts\KeyInput\initCanInteractFunction.sqf"; call compile preprocessFileLineNumbers PATHTOF(scripts\KeyInput\initCanInteractFunction.sqf);
call compile preprocessFileLineNumbers "\AGM_core\scripts\KeyInput\initKeys.sqf"; call compile preprocessFileLineNumbers PATHTOF(scripts\KeyInput\initKeys.sqf);
call compile preprocessFileLineNumbers "\AGM_core\scripts\KeyInput\initScrollWheel.sqf"; call compile preprocessFileLineNumbers PATHTOF(scripts\KeyInput\initScrollWheel.sqf);
0 spawn { 0 spawn {
while {true} do { 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 ["KeyDown", "_this call GVAR(onKeyDown)"];
findDisplay 46 displayAddEventHandler ["KeyUp", "_this call GVAR(onKeyUp)"]; findDisplay 46 displayAddEventHandler ["KeyUp", "_this call GVAR(onKeyUp)"];
findDisplay 46 displayAddEventHandler ["MouseZChanged", "_this call GVAR(onScrollWheel)"]; findDisplay 46 displayAddEventHandler ["MouseZChanged", "_this call GVAR(onScrollWheel)"];
[false] call GVAR(fnc_disableUserInput); [false] call FUNC(disableUserInput);
waitUntil {isNull (findDisplay 46)}; waitUntil {isNull (findDisplay 46)};
}; };
}; };
enableCamShake true; 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);

View File

@ -11,7 +11,7 @@ if (hasInterface) then {
AGM_player = missionNamespace getVariable ["BIS_fnc_moduleRemoteControl_unit", player]; AGM_player = missionNamespace getVariable ["BIS_fnc_moduleRemoteControl_unit", player];
uiNamespace setVariable ["AGM_player", AGM_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; }] call BIS_fnc_addStackedEventHandler;
}; };

View File

@ -6,5 +6,5 @@ _name = _this select 0;
_cfgClass = _this select 1; _cfgClass = _this select 1;
_classes = format ["configName inheritsFrom _x == '%1'", _name] configClasses (configFile >> _cfgClass); _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 _classes

View File

@ -1,7 +1,7 @@
/* /*
* Author: commy2 * 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: * Argument:
* 0: Object the event should be assigned to or namespace (Object OR Namespace) * 0: Object the event should be assigned to or namespace (Object OR Namespace)

View File

@ -4,4 +4,4 @@ private "_name";
_name = name (_this select 0); _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);

View File

@ -1,5 +1,5 @@
/* /*
Name: GVAR(fnc_applyForceWalkStatus) Name: FUNC(applyForceWalkStatus)
Author: Pabst Mirror Author: Pabst Mirror
@ -13,7 +13,7 @@ Returns:
None None
Example: Example:
[AGM_Player] call GVAR(fnc_applyForceWalkStatus) [AGM_Player] call FUNC(applyForceWalkStatus)
*/ */
private ["_unit", "_forceWalkNumber"]; private ["_unit", "_forceWalkNumber"];

View File

@ -12,4 +12,4 @@
* None. * None.
*/ */
[_this, "GVAR(fnc_callCustomEventHandlers)", 2] call GVAR(fnc_execRemoteFnc); [_this, QUOTE(FUNC(callCustomEventHandlers)), 2] call FUNC(execRemoteFnc);

View File

@ -68,10 +68,10 @@ switch (_position) do {
case "gunner" : { case "gunner" : {
private "_turretConfig"; private "_turretConfig";
_turret = [typeOf _vehicle] call GVAR(fnc_getTurretGunner); _turret = [typeOf _vehicle] call FUNC(getTurretGunner);
if (_turret isEqualTo []) exitWith {false}; if (_turret isEqualTo []) exitWith {false};
_turretConfig = [_config, _turret] call GVAR(fnc_getTurretConfigPath); _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
_radius = getNumber (_config >> "getInRadius"); _radius = getNumber (_config >> "getInRadius");
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner")); _selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
@ -81,10 +81,10 @@ switch (_position) do {
case "commander" : { case "commander" : {
private "_turretConfig"; private "_turretConfig";
_turret = [typeOf _vehicle] call GVAR(fnc_getTurretCommander); _turret = [typeOf _vehicle] call FUNC(getTurretCommander);
if (_turret isEqualTo []) exitWith {false}; if (_turret isEqualTo []) exitWith {false};
_turretConfig = [_config, _turret] call GVAR(fnc_getTurretConfigPath); _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
_radius = getNumber (_config >> "getInRadius"); _radius = getNumber (_config >> "getInRadius");
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner")); _selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
@ -94,10 +94,10 @@ switch (_position) do {
case "copilot" : { case "copilot" : {
private "_turretConfig"; private "_turretConfig";
_turret = [typeOf _vehicle] call GVAR(fnc_getTurretCopilot); _turret = [typeOf _vehicle] call FUNC(getTurretCopilot);
if (_turret isEqualTo []) exitWith {false}; if (_turret isEqualTo []) exitWith {false};
_turretConfig = [_config, _turret] call GVAR(fnc_getTurretConfigPath); _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
_radius = getNumber (_config >> "getInRadius"); _radius = getNumber (_config >> "getInRadius");
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner")); _selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
@ -107,12 +107,12 @@ switch (_position) do {
case "turret" : { case "turret" : {
private ["_turrets", "_turretConfig"]; private ["_turrets", "_turretConfig"];
_turrets = [typeOf _vehicle] call GVAR(fnc_getTurretsOther); _turrets = [typeOf _vehicle] call FUNC(getTurretsOther);
if (_index != -1 && {_turret = _turrets select _index; if (_index != -1 && {_turret = _turrets select _index;
CANGETINTURRETINDEX CANGETINTURRETINDEX
}) then { }) then {
_turretConfig = [_config, _turret] call GVAR(fnc_getTurretConfigPath); _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
_radius = getNumber (_config >> "getInRadius"); _radius = getNumber (_config >> "getInRadius");
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner")); _selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
@ -122,7 +122,7 @@ switch (_position) do {
for "_index" from 0 to (count _turrets - 1) do { for "_index" from 0 to (count _turrets - 1) do {
_turret = _turrets select _index; _turret = _turrets select _index;
if (CANGETINTURRETINDEX) exitWith { if (CANGETINTURRETINDEX) exitWith {
_turretConfig = [_config, _turret] call GVAR(fnc_getTurretConfigPath); _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
_radius = getNumber (_config >> "getInRadius"); _radius = getNumber (_config >> "getInRadius");
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner")); _selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
@ -135,12 +135,12 @@ switch (_position) do {
case "ffv" : { case "ffv" : {
private ["_turrets", "_turretConfig"]; private ["_turrets", "_turretConfig"];
_turrets = [typeOf _vehicle] call GVAR(fnc_getTurretsFFV); _turrets = [typeOf _vehicle] call FUNC(getTurretsFFV);
if (_index != -1 && {_turret = _turrets select _index; if (_index != -1 && {_turret = _turrets select _index;
CANGETINTURRETINDEX CANGETINTURRETINDEX
}) then { }) then {
_turretConfig = [_config, _turret] call GVAR(fnc_getTurretConfigPath); _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
_radius = getNumber (_config >> "getInRadius"); _radius = getNumber (_config >> "getInRadius");
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner")); _selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
@ -150,7 +150,7 @@ switch (_position) do {
for "_index" from 0 to (count _turrets - 1) do { for "_index" from 0 to (count _turrets - 1) do {
_turret = _turrets select _index; _turret = _turrets select _index;
if (CANGETINTURRETINDEX) exitWith { if (CANGETINTURRETINDEX) exitWith {
_turretConfig = [_config, _turret] call GVAR(fnc_getTurretConfigPath); _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
_radius = getNumber (_config >> "getInRadius"); _radius = getNumber (_config >> "getInRadius");
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner")); _selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
@ -163,7 +163,7 @@ switch (_position) do {
case "codriver" : { case "codriver" : {
private "_positions"; 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))}; if (alive _x) then {_positions deleteAt (_positions find (_vehicle getCargoIndex _x))};
@ -198,7 +198,7 @@ switch (_position) do {
case "cargo" : { case "cargo" : {
private "_positions"; 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))}; 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 you want into the cargo and you can't, then check ffv turrets aswell
if (_position == "cargo") exitWith { if (_position == "cargo") exitWith {
if (_return && {!_checkDistance || {_vehicle == vehicle _unit} || _fnc_isInRange}) then {true} else { 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);
} }
}; };

View File

@ -35,5 +35,5 @@ _logic = "Logic" createVehicleLocal [0,0,0];
_logic setVariable ["Action", _mode]; _logic setVariable ["Action", _mode];
_logic setVariable ["CheckAll", _checkAll]; _logic setVariable ["CheckAll", _checkAll];
_logic setVariable ["Whitelist", _whitelist]; _logic setVariable ["Whitelist", _whitelist];
[_logic, [], true] call GVAR(fnc_moduleCheckPBOs); [_logic, [], true] call FUNC(moduleCheckPBOs);
deleteVehicle _logic; deleteVehicle _logic;

View File

@ -18,9 +18,9 @@ _target setVariable ["AGM_isUsedBy", _unit, true];
if (_lockTarget) then { if (_lockTarget) then {
if (!isNull _unit) 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 { } 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);
}; };
}; };

View File

@ -42,6 +42,6 @@ _this spawn {
closeDialog 0; closeDialog 0;
call AGM_Interaction_fnc_hideMenu; 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
}; };
}; };

View File

@ -17,19 +17,19 @@ _state = _this select 0;
if (_state) then { if (_state) then {
disableSerialization; disableSerialization;
if (!isNull (uiNamespace getVariable ["GVAR(dlgDisableMouse)", displayNull])) exitWith {}; if (!isNull (uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull])) exitWith {};
if ("AGM_DisableUserInput" in ([BIS_stackedEventHandlers_onEachFrame, {_this select 0}] call GVAR(fnc_map))) exitWith {}; if ("AGM_DisableUserInput" in ([BIS_stackedEventHandlers_onEachFrame, {_this select 0}] call FUNC(map))) exitWith {};
// end TFAR and ACRE2 radio transmissions // end TFAR and ACRE2 radio transmissions
0 spawn GVAR(fnc_endRadioTransmission); 0 spawn FUNC(endRadioTransmission);
// Close map // Close map
if (visibleMap && {!(player getVariable ["AGM_canSwitchUnits", false])}) then {openMap false}; if (visibleMap && {!(player getVariable ["AGM_canSwitchUnits", false])}) then {openMap false};
closeDialog 0; closeDialog 0;
createDialog "GVAR(DisableMouse_Dialog)"; createDialog QGVAR(DisableMouse_Dialog);
_dlg = uiNamespace getVariable "GVAR(dlgDisableMouse)"; _dlg = uiNamespace getVariable QGVAR(dlgDisableMouse);
_dlg displayAddEventHandler ["KeyDown", { _dlg displayAddEventHandler ["KeyDown", {
_key = _this select 1; _key = _this select 1;
@ -49,23 +49,23 @@ if (_state) then {
}; };
_ctrl = _dlg displayctrl 103; _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 ctrlEnable true;
_ctrl ctrlSetText "ABORT"; _ctrl ctrlSetText "ABORT";
_ctrl ctrlSetTooltip "Abort."; _ctrl ctrlSetTooltip "Abort.";
_ctrl = _dlg displayctrl ([104, 1010] select isMultiplayer); _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 ctrlEnable (call {_config = missionConfigFile >> "respawnButton"; !isNumber _config || {getNumber _config == 1}});
_ctrl ctrlSetText "RESPAWN"; _ctrl ctrlSetText "RESPAWN";
_ctrl ctrlSetTooltip "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 "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 ["GVAR(dlgDisableMouse)", displayNull]) closeDisplay 0; openCuratorInterface}; 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 ["GVAR(dlgDisableMouse)", displayNull]) closeDisplay 0; openMap true}; 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 { if (!(_key in (actionKeys "DefaultAction" + actionKeys "Throw")) && {_key in (actionKeys "Chat" + actionKeys "PrevChannel" + actionKeys "NextChannel")}) then {
_key = 0; _key = 0;
}; };
@ -76,15 +76,15 @@ if (_state) then {
_dlg displayAddEventHandler ["KeyUp", {true}]; _dlg displayAddEventHandler ["KeyUp", {true}];
["AGM_DisableUserInput", "onEachFrame", { ["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; ["AGM_DisableUserInput", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
[true] call GVAR(fnc_disableUserInput); [true] call FUNC(disableUserInput);
}; };
}] call BIS_fnc_addStackedEventHandler; }] call BIS_fnc_addStackedEventHandler;
} else { } 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; ["AGM_DisableUserInput", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
}; };
(uiNamespace getVariable ["GVAR(dlgDisableMouse)", displayNull]) closeDisplay 0; (uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0;
}; };

View File

@ -17,7 +17,7 @@
#define DEFAULT_DELAY 2 #define DEFAULT_DELAY 2
#define DEFAULT_PRIORITY 0 #define DEFAULT_PRIORITY 0
if (isNil "GVAR(lastHint)") then { if (isNil QGVAR(lastHint)) then {
GVAR(lastHint) = [0, 0]; GVAR(lastHint) = [0, 0];
}; };

View File

@ -26,4 +26,4 @@ _text = composeText [
_text _text
]; ];
[_text] call GVAR(fnc_displayTextStructured); [_text] call FUNC(displayTextStructured);

View File

@ -37,7 +37,7 @@ if (count _this > 3) then {
// don't overwrite more important animations // don't overwrite more important animations
if (_unit getVariable ["AGM_isUnconscious", false] && {!_force}) exitWith { if (_unit getVariable ["AGM_isUnconscious", false] && {!_force}) exitWith {
if (_animation != "Unconscious") then { 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 // switchMove "" no longer works in dev 1.37
if (_animation == "") then { if (_animation == "") then {
_animation = [_unit] call GVAR(fnc_getDefaultAnim); _animation = [_unit] call FUNC(getDefaultAnim);
}; };
switch (_priority) do { switch (_priority) do {
case 0 : { case 0 : {
if (_unit == vehicle _unit) then { 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 { } else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles. // 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 : { case 1 : {
if (_unit == vehicle _unit) then { 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 { } else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles. // 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 : { case 2 : {
// Execute on all machines. SwitchMove has local effects. // 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 {}; default {};
}; };

View File

@ -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; ["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 // 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 // save persistent function for JIP
private ["_persistentFunctions", "_index"]; private ["_persistentFunctions", "_index"];

View File

@ -39,20 +39,20 @@ if (typeName _unit == "SCALAR") exitWith {
if (isServer) then { if (isServer) then {
_arguments call _function; _arguments call _function;
} else { } else {
publicVariableServer "GVAR(remoteFnc)"; publicVariableServer QGVAR(remoteFnc);
}; };
}; };
case 2 : { case 2 : {
_arguments call _function; _arguments call _function;
GVAR(remoteFnc) set [2, 0]; GVAR(remoteFnc) set [2, 0];
publicVariable "GVAR(remoteFnc)"; publicVariable QGVAR(remoteFnc);
}; };
case 3 : { case 3 : {
if (isDedicated) then { if (isDedicated) then {
_arguments call _function; _arguments call _function;
} else { } else {
if (!isServer) then {publicVariableServer "GVAR(remoteFnc)"}; if (!isServer) then {publicVariableServer QGVAR(remoteFnc)};
}; };
}; };
}; };
@ -63,8 +63,8 @@ if (local _unit) then {
} else { } else {
if (isServer) then { if (isServer) then {
_id = owner _unit; _id = owner _unit;
_id publicVariableClient "GVAR(remoteFnc)"; _id publicVariableClient QGVAR(remoteFnc);
} else { } else {
publicVariableServer "GVAR(remoteFnc)"; publicVariableServer QGVAR(remoteFnc);
}; };
}; };

View File

@ -11,7 +11,7 @@
* Final array * Final array
* *
* Usage: * 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"]; private ["_array", "_code", "_newArray", "_index"];

View File

@ -5,5 +5,5 @@ private "_unit";
_unit = _this select 0; _unit = _this select 0;
if (currentWeapon _unit != "" && {currentWeapon _unit == primaryWeapon _unit} && {weaponLowered _unit} && {stance _unit == "STAND"}) then { 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);
}; };

View File

@ -16,7 +16,7 @@ _unit = _this select 0;
_captivityReasons = missionNamespace getVariable ["AGM_captivityReasons", []]; _captivityReasons = missionNamespace getVariable ["AGM_captivityReasons", []];
_unitCaptivityStatus = [captiveNum _unit, count _captivityReasons] call GVAR(fnc_binarizeNumber); _unitCaptivityStatus = [captiveNum _unit, count _captivityReasons] call FUNC(binarizeNumber);
_unitCaptivityReasons = []; _unitCaptivityReasons = [];
{ {

View File

@ -15,6 +15,6 @@ private ["_vehicle", "_config", "_turret"];
_vehicle = _this select 0; _vehicle = _this select 0;
_config = configFile >> "CfgVehicles" >> _vehicle; _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)

View File

@ -15,6 +15,6 @@ private ["_vehicle", "_config", "_turret"];
_vehicle = _this select 0; _vehicle = _this select 0;
_config = configFile >> "CfgVehicles" >> _vehicle; _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)

View File

@ -11,7 +11,7 @@
*/ */
/* /*
Name: GVAR(fnc_getDoorTurrets) Name: FUNC(getDoorTurrets)
Author(s): Author(s):
bux578 bux578
@ -30,13 +30,13 @@ private ["_vehicleType", "_turrets", "_doorTurrets", "_config"];
_vehicleType = _this select 0; _vehicleType = _this select 0;
_turrets = [_vehicleType] call GVAR(fnc_getTurrets); _turrets = [_vehicleType] call FUNC(getTurrets);
_doorTurrets = []; _doorTurrets = [];
{ {
_config = configFile >> "CfgVehicles" >> _vehicleType; _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 { if ((getNumber (_config >> "isCopilot") == 0) && count (getArray (_config >> "weapons")) > 0 ) then {
_doorTurrets pushBack _x; _doorTurrets pushBack _x;

View File

@ -1,5 +1,5 @@
/* /*
Name: GVAR(fnc_getForceWalkStatus) Name: FUNC(getForceWalkStatus)
Author: Pabst Mirror (from captivity by commy2) Author: Pabst Mirror (from captivity by commy2)
@ -13,7 +13,7 @@ Returns:
ARRAY(of strings) - Reason why the unit is force walking ARRAY(of strings) - Reason why the unit is force walking
Example: Example:
[AGM_Player] call GVAR(fnc_getForceWalkStatus) [AGM_Player] call FUNC(getForceWalkStatus)
*/ */
private ["_unit", "_forceWalkReasons", "_unitForceWalkNumber", "_unitForceWalkStatus", "_unitForceWalkReasons"]; private ["_unit", "_forceWalkReasons", "_unitForceWalkNumber", "_unitForceWalkStatus", "_unitForceWalkReasons"];
@ -24,7 +24,7 @@ _forceWalkReasons = missionNamespace getVariable ["AGM_forceWalkReasons", []];
_unitForceWalkNumber = _unit getVariable ["AGM_forceWalkStatusNumber", 0]; _unitForceWalkNumber = _unit getVariable ["AGM_forceWalkStatusNumber", 0];
_unitForceWalkStatus = [_unitForceWalkNumber, count _forceWalkReasons] call GVAR(fnc_binarizeNumber); _unitForceWalkStatus = [_unitForceWalkNumber, count _forceWalkReasons] call FUNC(binarizeNumber);
_unitForceWalkReasons = []; _unitForceWalkReasons = [];
{ {

View File

@ -23,7 +23,7 @@ private "_hitpointClasses";
_hitpointClasses = [_config >> "HitPoints"]; _hitpointClasses = [_config >> "HitPoints"];
{ {
private "_class"; private "_class";
_class = ([_config, _x] call GVAR(fnc_getTurretConfigPath)) >> "HitPoints"; _class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
if (isClass _class) then { if (isClass _class) then {
_hitpointClasses pushBack _class; _hitpointClasses pushBack _class;

View File

@ -24,7 +24,7 @@ private "_hitpointClasses";
_hitpointClasses = [_config >> "HitPoints"]; _hitpointClasses = [_config >> "HitPoints"];
{ {
private "_class"; private "_class";
_class = ([_config, _x] call GVAR(fnc_getTurretConfigPath)) >> "HitPoints"; _class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
if (isClass _class) then { if (isClass _class) then {
_hitpointClasses pushBack _class; _hitpointClasses pushBack _class;

View File

@ -63,7 +63,7 @@ switch (_position) do {
}; };
case "gunner" : { case "gunner" : {
_turret = [typeOf _vehicle] call GVAR(fnc_getTurretGunner); _turret = [typeOf _vehicle] call FUNC(getTurretGunner);
if (CANGETINTURRETINDEX) then { if (CANGETINTURRETINDEX) then {
_script = [ _script = [
@ -74,7 +74,7 @@ switch (_position) do {
}; };
case "commander" : { case "commander" : {
_turret = [typeOf _vehicle] call GVAR(fnc_getTurretCommander); _turret = [typeOf _vehicle] call FUNC(getTurretCommander);
if (CANGETINTURRETINDEX) then { if (CANGETINTURRETINDEX) then {
_script = [ _script = [
@ -85,7 +85,7 @@ switch (_position) do {
}; };
case "copilot" : { case "copilot" : {
_turret = [typeOf _vehicle] call GVAR(fnc_getTurretCopilot); _turret = [typeOf _vehicle] call FUNC(getTurretCopilot);
if (CANGETINTURRETINDEX) then { if (CANGETINTURRETINDEX) then {
_script = [ _script = [
@ -99,7 +99,7 @@ switch (_position) do {
case "turret" : { case "turret" : {
private "_turrets"; private "_turrets";
_turrets = [typeOf _vehicle] call GVAR(fnc_getTurretsOther); _turrets = [typeOf _vehicle] call FUNC(getTurretsOther);
if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX}) then { if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX}) then {
_script = [ _script = [
@ -126,7 +126,7 @@ switch (_position) do {
case "ffv" : { case "ffv" : {
private "_turrets"; private "_turrets";
_turrets = [typeOf _vehicle] call GVAR(fnc_getTurretsFFV); _turrets = [typeOf _vehicle] call FUNC(getTurretsFFV);
if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX}) then { if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX}) then {
_script = [ _script = [
@ -153,7 +153,7 @@ switch (_position) do {
case "codriver" : { case "codriver" : {
private "_positions"; 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))}; if (alive _x) then {_positions deleteAt (_positions find (_vehicle getCargoIndex _x))};
@ -182,7 +182,7 @@ switch (_position) do {
case "cargo" : { case "cargo" : {
private "_positions"; 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))}; 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 you want into the cargo and you can't, then check ffv turrets aswell
if (_position == "cargo") exitWith { if (_position == "cargo") exitWith {
if (_script isEqualTo {}) then { if (_script isEqualTo {}) then {
[_unit, _vehicle, "ffv"] call GVAR(fnc_getInPosition); [_unit, _vehicle, "ffv"] call FUNC(getInPosition);
} else { } else {
call _script; call _script;
}; };

View File

@ -23,10 +23,10 @@ if (isNil "_showEffective") then {
_name = ""; _name = "";
if (_unit isKindOf "CAManBase") then { 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 { } else {
if (_showEffective) then { if (_showEffective) then {
_name = [effectiveCommander _unit] call GVAR(fnc_getName); _name = [effectiveCommander _unit] call FUNC(getName);
} else { } else {
_name = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName"); _name = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName");
}; };

View File

@ -12,6 +12,6 @@
private "_number"; private "_number";
_number = _this call GVAR(fnc_getStringFromMissionSQM); _number = _this call FUNC(getStringFromMissionSQM);
parseNumber _number; parseNumber _number;

View File

@ -14,13 +14,13 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
_vehicle = _this select 0; _vehicle = _this select 0;
_turrets = [_vehicle] call GVAR(fnc_getTurrets); _turrets = [_vehicle] call FUNC(getTurrets);
_turret = []; _turret = [];
{ {
_config = configFile >> "CfgVehicles" >> _vehicle; _config = configFile >> "CfgVehicles" >> _vehicle;
_config = [_config, _x] call GVAR(fnc_getTurretConfigPath); _config = [_config, _x] call FUNC(getTurretConfigPath);
if (getNumber (_config >> "primaryObserver") == 1) exitWith { if (getNumber (_config >> "primaryObserver") == 1) exitWith {
_turret = _x; _turret = _x;

View File

@ -14,13 +14,13 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
_vehicle = _this select 0; _vehicle = _this select 0;
_turrets = [_vehicle] call GVAR(fnc_getTurrets); _turrets = [_vehicle] call FUNC(getTurrets);
_turret = []; _turret = [];
{ {
_config = configFile >> "CfgVehicles" >> _vehicle; _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 { if (getNumber (_config >> "isCopilot") == 1 && {getNumber (_config >> "primaryGunner") != 1} && {getNumber (_config >> "primaryObserver") != 1}) exitWith {
_turret = _x; _turret = _x;

View File

@ -14,13 +14,13 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
_vehicle = _this select 0; _vehicle = _this select 0;
_turrets = [_vehicle] call GVAR(fnc_getTurrets); _turrets = [_vehicle] call FUNC(getTurrets);
_turret = []; _turret = [];
{ {
_config = configFile >> "CfgVehicles" >> _vehicle; _config = configFile >> "CfgVehicles" >> _vehicle;
_config = [_config, _x] call GVAR(fnc_getTurretConfigPath); _config = [_config, _x] call FUNC(getTurretConfigPath);
if (getNumber (_config >> "primaryGunner") == 1) exitWith { if (getNumber (_config >> "primaryGunner") == 1) exitWith {
_turret = _x; _turret = _x;

View File

@ -15,7 +15,7 @@ private ["_unit", "_vehicle", "_turrets", "_units", "_index"];
_unit = _this select 0; _unit = _this select 0;
_vehicle = vehicle _unit; _vehicle = vehicle _unit;
//_turrets = [typeOf _vehicle] call GVAR(fnc_getTurrets); //_turrets = [typeOf _vehicle] call FUNC(getTurrets);
_turrets = allTurrets [_vehicle, true]; _turrets = allTurrets [_vehicle, true];
_units = []; _units = [];

View File

@ -14,13 +14,13 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
_vehicle = _this select 0; _vehicle = _this select 0;
_turrets = [_vehicle] call GVAR(fnc_getTurrets); _turrets = [_vehicle] call FUNC(getTurrets);
_turret = []; _turret = [];
{ {
_config = configFile >> "CfgVehicles" >> _vehicle; _config = configFile >> "CfgVehicles" >> _vehicle;
_config = [_config, _x] call GVAR(fnc_getTurretConfigPath); _config = [_config, _x] call FUNC(getTurretConfigPath);
if (getNumber (_config >> "isPersonTurret") == 1) then { if (getNumber (_config >> "isPersonTurret") == 1) then {
_turret pushBack _x; _turret pushBack _x;

View File

@ -14,13 +14,13 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
_vehicle = _this select 0; _vehicle = _this select 0;
_turrets = [_vehicle] call GVAR(fnc_getTurrets); _turrets = [_vehicle] call FUNC(getTurrets);
_turret = []; _turret = [];
{ {
_config = configFile >> "CfgVehicles" >> _vehicle; _config = configFile >> "CfgVehicles" >> _vehicle;
_config = [_config, _x] call GVAR(fnc_getTurretConfigPath); _config = [_config, _x] call FUNC(getTurretConfigPath);
if ( getNumber (_config >> "isCopilot") != 1 if ( getNumber (_config >> "isCopilot") != 1
&& {getNumber (_config >> "primaryGunner") != 1} && {getNumber (_config >> "primaryGunner") != 1}

View File

@ -1,5 +1,5 @@
/* /*
Name: GVAR(fnc_getUavControlPosition) Name: FUNC(getUavControlPosition)
Author: Pabst Mirror Author: Pabst Mirror
@ -16,7 +16,7 @@ Returns:
STRING - Position in the UAV that is currently being controled by the unit. STRING - Position in the UAV that is currently being controled by the unit.
Example: Example:
[AGM_Player] call GVAR(fnc_getUavControlPosition) [AGM_Player] call FUNC(getUavControlPosition)
*/ */
private ["_unit", "_uav", "_positionArray", "_playerIndex"]; private ["_unit", "_uav", "_positionArray", "_playerIndex"];

View File

@ -14,7 +14,7 @@ private ["_weapon", "_type", "_index"];
_weapon = _this select 0; _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; _index = 0;
while {!(_type select _index) && {_index < 16}} do { while {!(_type select _index) && {_index < 16}} do {

View File

@ -11,20 +11,20 @@
*/ */
switch (round (windDir / 360 * 16)) do { switch (round (windDir / 360 * 16)) do {
case 1 : {localize "STR_GVAR(SSW)"}; case 1 : {localize QUOTE(DOUBLES(STR,GVAR(SSW)))};
case 2 : {localize "STR_GVAR(SW)"}; case 2 : {localize QUOTE(DOUBLES(STR,GVAR(SW)))};
case 3 : {localize "STR_GVAR(WSW)"}; case 3 : {localize QUOTE(DOUBLES(STR,GVAR(WSW)))};
case 4 : {localize "STR_GVAR(W)"}; case 4 : {localize QUOTE(DOUBLES(STR,GVAR(W)))};
case 5 : {localize "STR_GVAR(WNW)"}; case 5 : {localize QUOTE(DOUBLES(STR,GVAR(WNW)))};
case 6 : {localize "STR_GVAR(NW)"}; case 6 : {localize QUOTE(DOUBLES(STR,GVAR(NW)))};
case 7 : {localize "STR_GVAR(NNW)"}; case 7 : {localize QUOTE(DOUBLES(STR,GVAR(NNW)))};
case 8 : {localize "STR_GVAR(N)"}; case 8 : {localize QUOTE(DOUBLES(STR,GVAR(N)))};
case 9 : {localize "STR_GVAR(NNE)"}; case 9 : {localize QUOTE(DOUBLES(STR,GVAR(NNE)))};
case 10 : {localize "STR_GVAR(NE)"}; case 10 : {localize QUOTE(DOUBLES(STR,GVAR(NE)))};
case 11 : {localize "STR_GVAR(ENE)"}; case 11 : {localize QUOTE(DOUBLES(STR,GVAR(ENE)))};
case 12 : {localize "STR_GVAR(E)"}; case 12 : {localize QUOTE(DOUBLES(STR,GVAR(E)))};
case 13 : {localize "STR_GVAR(ESE)"}; case 13 : {localize QUOTE(DOUBLES(STR,GVAR(ESE)))};
case 14 : {localize "STR_GVAR(SE)"}; case 14 : {localize QUOTE(DOUBLES(STR,GVAR(SE)))};
case 15 : {localize "STR_GVAR(SSE)"}; case 15 : {localize QUOTE(DOUBLES(STR,GVAR(SSE)))};
default {localize "STR_GVAR(S)"}; default {localize QUOTE(DOUBLES(STR,GVAR(S)))};
}; };

View File

@ -26,6 +26,6 @@ try {
}; };
} catch { } catch {
if (stance _unit != "PRONE") then { if (stance _unit != "PRONE") then {
[_unit, _exception] call GVAR(fnc_doAnimation); [_unit, _exception] call FUNC(doAnimation);
}; };
}; };

View File

@ -10,4 +10,4 @@
* This mission has automatic wind? (Bool) * This mission has automatic wind? (Bool)
*/ */
["Mission", "Intel", "windForced"] call GVAR(fnc_getNumberFromMissionSQM) != 1 ["Mission", "Intel", "windForced"] call FUNC(getNumberFromMissionSQM) != 1

View File

@ -1,5 +1,5 @@
/* /*
Name: GVAR(fnc_isEOD) Name: FUNC(isEOD)
Author: Garth de Wet (LH) Author: Garth de Wet (LH)
@ -16,7 +16,7 @@
BOOLEAN BOOLEAN
Example: Example:
_isSpecialist = [player] call GVAR(fnc_isEOD); _isSpecialist = [player] call FUNC(isEOD);
*/ */
private "_unit"; private "_unit";

View File

@ -11,4 +11,4 @@
* Bool: is unit a player? * 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)}

View File

@ -21,9 +21,9 @@ if (_unit == driver _vehicle) then {
_action = getText (_config >> "driverAction"); _action = getText (_config >> "driverAction");
_inAction = getText (_config >> "driverInAction"); _inAction = getText (_config >> "driverInAction");
} else { } 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"); _action = getText (_config >> "gunnerAction");
_inAction = getText (_config >> "gunnerInAction"); _inAction = getText (_config >> "gunnerInAction");

View File

@ -11,7 +11,7 @@
* Final array * Final array
* *
* Usage: * 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"]; private ["_array", "_code"];

View File

@ -24,7 +24,7 @@ if (isNil "_whitelist") then {
_whitelist = []; _whitelist = [];
}; };
_whitelist = [_whitelist, {toLower _this}] call GVAR(fnc_map); _whitelist = [_whitelist, {toLower _this}] call FUNC(map);
AGM_Version_CheckAll = _checkAll; AGM_Version_CheckAll = _checkAll;
AGM_Version_Whitelist = _whitelist; AGM_Version_Whitelist = _whitelist;
@ -67,7 +67,7 @@ if (!isServer) then {
_error = _error + "Newer version; "; _error = _error + "Newer version; ";
}; };
//[_error, "{systemChat _this}"] call GVAR(fnc_execRemoteFnc); //[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
diag_log text _error; diag_log text _error;
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]]; _text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
@ -87,7 +87,7 @@ if (!isServer) then {
if (_mode == 2) then { if (_mode == 2) then {
sleep 10; sleep 10;
waitUntil {alive player}; waitUntil {alive player};
[player] call GVAR(fnc_adminKick); [player] call FUNC(adminKick);
}; };
}; };
}; };

View File

@ -19,6 +19,6 @@ if (isNull _unit) exitWith {};
_speaker = speaker _unit; _speaker = speaker _unit;
if (_speaker == "AGM_NoVoice") exitWith {}; 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]; _unit setVariable ["AGM_OriginalSpeaker", _speaker, true];

View File

@ -13,7 +13,7 @@
private ["_digits", "_count", "_string", "_index"]; private ["_digits", "_count", "_string", "_index"];
_digits = _this call GVAR(fnc_numberToDigits); _digits = _this call FUNC(numberToDigits);
_count = count _digits; _count = count _digits;

View File

@ -1,5 +1,5 @@
/* /*
Name: GVAR(fnc_onLoadRscDisplayChannel) Name: FUNC(onLoadRscDisplayChannel)
Author: Pabst Mirror, commy2 Author: Pabst Mirror, commy2

View File

@ -15,7 +15,7 @@
*/ */
closeDialog 0; closeDialog 0;
createDialog "GVAR(ProgressBar_Dialog)"; createDialog QGVAR(ProgressBar_Dialog);
_this spawn { _this spawn {
_time = _this select 0; _time = _this select 0;
@ -25,8 +25,8 @@ _this spawn {
_function2 = call compile (_this select 4); _function2 = call compile (_this select 4);
disableSerialization; disableSerialization;
_ctrlProgressBar = uiNamespace getVariable "GVAR(ctrlProgressBar)"; _ctrlProgressBar = uiNamespace getVariable QGVAR(ctrlProgressBar);
_ctrlProgressBarTitle = uiNamespace getVariable "GVAR(ctrlProgressBarTitle)"; _ctrlProgressBarTitle = uiNamespace getVariable QGVAR(ctrlProgressBarTitle);
_ctrlProgressBar ctrlSetPosition [ _ctrlProgressBar ctrlSetPosition [
safezoneX + 0.1 * safezoneW, safezoneX + 0.1 * safezoneW,
@ -42,7 +42,7 @@ _this spawn {
_time = time + _time; _time = time + _time;
waitUntil { waitUntil {
//make sure the progressBar is still open, not just any dialog //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; closeDialog 0;
@ -51,7 +51,7 @@ _this spawn {
if (time > _time) then { if (time > _time) then {
_arguments call _function; _arguments call _function;
} else { } else {
[localize "STR_GVAR(ActionAborted)"] call GVAR(fnc_displayTextStructured); [localize QOUTE(DOUBLES(STR,GVAR(ActionAborted)))] call FUNC(displayTextStructured);
if (!isNil "_function2") then { if (!isNil "_function2") then {
_progress = 1 - ((_time - time) / (_this select 0)) max 0 min 1; _progress = 1 - ((_time - time) / (_this select 0)) max 0 min 1;
_arguments call _function2; _arguments call _function2;

View File

@ -3,7 +3,7 @@
terminate (missionNamespace getVariable ["AGM_waitForAnimationHandle", scriptNull]); terminate (missionNamespace getVariable ["AGM_waitForAnimationHandle", scriptNull]);
AGM_waitForAnimationHandle = _this spawn { 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);
}; };

View File

@ -24,4 +24,4 @@ if (isNil {_logic getVariable _moduleParameterName}) exitWith {
}; };
// Set the parameter // 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);

View File

@ -30,4 +30,4 @@ if (typeName _value == "STRING") then {
}; };
// Set the parameter // Set the parameter
[_agmParameterName, _value] call GVAR(fnc_setParameter); [_agmParameterName, _value] call FUNC(setParameter);

View File

@ -1,7 +1,7 @@
/* /*
* Author: commy2 * 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: * Argument:
* 0: Object (Object) * 0: Object (Object)
@ -24,4 +24,4 @@ _respawnVariables pushBack "AGM_PersistentFunctions";
} forEach _respawnVariables; } forEach _respawnVariables;
// fix speaker after respawn // 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);

View File

@ -19,19 +19,19 @@ _key = toString ((toArray keyName floor _keyCode) - [34]);
_keyCode = round ((_keyCode % 1) * 10); _keyCode = round ((_keyCode % 1) * 10);
switch (_keyCode) do { switch (_keyCode) do {
case 8 : {format [localize "STR_GVAR(DoubleTapKey)", _key]}; case 8 : {format [localize QUOTE(DOUBLES(STR,GVAR(DoubleTapKey))), _key]};
case 9 : {format [localize "STR_GVAR(HoldKey)", _key]}; case 9 : {format [localize QUOTE(DOUBLES(STR,GVAR(HoldKey))), _key]};
default { default {
_keyCode = toArray ([_keyCode, 3] call GVAR(fnc_toBin)); _keyCode = toArray ([_keyCode, 3] call FUNC(toBin));
_alt = "1" == toString [_keyCode select 0]; _alt = "1" == toString [_keyCode select 0];
_ctrl = "1" == toString [_keyCode select 1]; _ctrl = "1" == toString [_keyCode select 1];
_shift = "1" == toString [_keyCode select 2]; _shift = "1" == toString [_keyCode select 2];
format ["%1%2%3%4", format ["%1%2%3%4",
["", format ["%1 + ", localize "STR_GVAR(Alt)"]] select _alt, ["", format ["%1 + ", localize QUOTE(DOUBLES(STR,GVAR(Alt)))]] select _alt,
["", format ["%1 + ", localize "STR_GVAR(Ctrl)"]] select _ctrl, ["", format ["%1 + ", localize QUOTE(DOUBLES(STR,GVAR(Ctrl)))]] select _ctrl,
["", format ["%1 + ", localize "STR_GVAR(Shift)"]] select _shift, ["", format ["%1 + ", localize QUOTE(DOUBLES(STR,GVAR(Shift)))]] select _shift,
_key _key
] ]
}; };

View File

@ -3,5 +3,5 @@
if (isServer) then { if (isServer) then {
diag_log _this; diag_log _this;
} else { } else {
[_this, "GVAR(fnc_serverLog)", 1] call GVAR(fnc_execRemoteFnc); [_this, QUOTE(FUNC(serverLog)), 1] call FUNC(execRemoteFnc);
}; };

View File

@ -29,7 +29,7 @@ if !(_reason in _captivityReasons) then {
}; };
// get reasons why the unit is captive already and update to the new status // 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 = []; _captivityReasonsBooleans = [];
{ {
@ -38,7 +38,7 @@ _captivityReasonsBooleans = [];
_captivityReasonsBooleans set [_captivityReasons find _reason, _status]; _captivityReasonsBooleans set [_captivityReasons find _reason, _status];
_bitmask = _captivityReasonsBooleans call GVAR(fnc_toBitmask); _bitmask = _captivityReasonsBooleans call FUNC(toBitmask);
// actually apply the setCaptive command globaly // 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);

View File

@ -1,5 +1,5 @@
/* /*
Name: GVAR(fnc_setForceWalkStatus) Name: FUNC(setForceWalkStatus)
Author: Pabst Mirror (from captivity by commy2) Author: Pabst Mirror (from captivity by commy2)
@ -16,7 +16,7 @@ Returns:
None None
Example: Example:
[AGM_Player, "BrokenLeg", true] call GVAR(fnc_setForceWalkStatus) [AGM_Player, "BrokenLeg", true] call FUNC(setForceWalkStatus)
*/ */
private ["_unit", "_reason", "_status", "_forceWalkReasons", "_unitForceWalkReasons", "_forceWalkReasonsBooleans", "_bitmaskNumber"]; 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 // 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 = []; _forceWalkReasonsBooleans = [];
{ {
@ -44,9 +44,9 @@ _forceWalkReasonsBooleans = [];
_forceWalkReasonsBooleans set [_forceWalkReasons find _reason, _status]; _forceWalkReasonsBooleans set [_forceWalkReasons find _reason, _status];
_bitmaskNumber = _forceWalkReasonsBooleans call GVAR(fnc_toBitmask); _bitmaskNumber = _forceWalkReasonsBooleans call FUNC(toBitmask);
_unit setVariable ["AGM_forceWalkStatusNumber", _bitmaskNumber, true]; _unit setVariable ["AGM_forceWalkStatusNumber", _bitmaskNumber, true];
// actually apply the forceWalk command globaly // actually apply the forceWalk command globaly
[[_unit], "GVAR(fnc_applyForceWalkStatus)", _unit] call GVAR(fnc_execRemoteFnc); [[_unit], QUOTE(FUNC(applyForceWalkStatus)), _unit] call FUNC(execRemoteFnc);

View File

@ -16,7 +16,7 @@ _overwrite = _this select 0;
_saveProfile = false; _saveProfile = false;
_config = configFile >> "GVAR(Default_Keys)"; _config = configFile >> QGVAR(Default_Keys);
_count = count _config; _count = count _config;
for "_index" from 0 to (_count - 1) do { 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; _ctrl = getNumber (_configFile >> "Control") == 1;
_alt = getNumber (_configFile >> "Alt") == 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]; profileNamespace setVariable [_name, _keyCode];
_saveProfile = true; _saveProfile = true;
}; };
}; };
_config = configFile >> "GVAR(Options)"; _config = configFile >> QGVAR(Options);
_count = count _config; _count = count _config;
for "_index" from 0 to (_count - 1) do { for "_index" from 0 to (_count - 1) do {

View File

@ -17,7 +17,7 @@ _unit = _this select 0;
if (isNull _unit || {!alive _unit}) exitWith {}; if (isNull _unit || {!alive _unit}) exitWith {};
if (_unit isKindOf "CAManBase") then { 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 { //if (_name != _unit getVariable ["AGM_Name", ""]) then {
_unit setVariable ["AGM_Name", _name, true]; _unit setVariable ["AGM_Name", _name, true];

View File

@ -17,11 +17,11 @@ _string = format ["%1", _this select 0];
_color = _this select 1; _color = _this select 1;
_color = ( _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 ["<t align='center' color='#%2' >%1</t>", _string, _color]; parseText format ["<t align='center' color='#%2' >%1</t>", _string, _color];

View File

@ -1,5 +1,5 @@
/* /*
Name: GVAR(fnc_toNumber) Name: FUNC(toNumber)
Author(s): Author(s):
Garth de Wet (LH) Garth de Wet (LH)
@ -14,7 +14,7 @@
NUMBER NUMBER
Example: Example:
_number = ["102"] call GVAR(fnc_toNumber); _number = ["102"] call FUNC(toNumber);
*/ */
if (TYPENAME(_this select 0) == "SCALAR")exitWith { if (TYPENAME(_this select 0) == "SCALAR")exitWith {
(_this select 0) (_this select 0)

View File

@ -19,4 +19,4 @@ if (isNull _unit) exitWith {};
_speaker = _unit getVariable ["AGM_OriginalSpeaker", ""]; _speaker = _unit getVariable ["AGM_OriginalSpeaker", ""];
if (_speaker == "") exitWith {}; 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);

View File

@ -4,7 +4,7 @@ private ["_function", "_configFile", "_count", "_index", "_config", "_configName
_function = "private '_exceptions'; _exceptions = _this; alive AGM_player"; _function = "private '_exceptions'; _exceptions = _this; alive AGM_player";
_configFile = configFile >> "GVAR(canInteractConditions)"; _configFile = configFile >> QGVAR(canInteractConditions);
_count = count _configFile; _count = count _configFile;
for "_index" from 0 to (_count -1) do { for "_index" from 0 to (_count -1) do {

View File

@ -1,9 +1,9 @@
// by commy2 // by commy2
_config = configFile >> "GVAR(Default_Keys)"; _config = configFile >> QGVAR(Default_Keys);
_count = count _config; _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;"; _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};"; _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];};"; _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 = "_isInput";
_return = "if (profileNamespace getVariable ['AGM_enableNumberHotkeys', true] && {_keyIndex < 12} && {_keyIndex > 1}) then {true} else {_isInput}"; _return = "if (profileNamespace getVariable ['AGM_enableNumberHotkeys', true] && {_keyIndex < 12} && {_keyIndex > 1}) then {true} else {_isInput}";

View File

@ -131,7 +131,7 @@ if (!isServer) then {
_error = _error call _fnc_cutComma; _error = _error call _fnc_cutComma;
diag_log text _error; diag_log text _error;
[_error, "{systemChat _this}"] call GVAR(fnc_execRemoteFnc); [_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
}; };
_missingAddonServer = false; _missingAddonServer = false;
@ -148,7 +148,7 @@ if (!isServer) then {
_error = _error call _fnc_cutComma; _error = _error call _fnc_cutComma;
diag_log text _error; diag_log text _error;
[_error, "{systemChat _this}"] call GVAR(fnc_execRemoteFnc); [_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
}; };
_oldVersionClient = false; _oldVersionClient = false;
@ -165,7 +165,7 @@ if (!isServer) then {
_error = _error call _fnc_cutComma; _error = _error call _fnc_cutComma;
diag_log text _error; diag_log text _error;
[_error, "{systemChat _this}"] call GVAR(fnc_execRemoteFnc); [_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
}; };
_oldVersionServer = false; _oldVersionServer = false;
@ -182,7 +182,7 @@ if (!isServer) then {
_error = _error call _fnc_cutComma; _error = _error call _fnc_cutComma;
diag_log text _error; diag_log text _error;
[_error, "{systemChat _this}"] call GVAR(fnc_execRemoteFnc); [_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
}; };
AGM_Version_ClientErrors = [_missingAddon, _missingAddonServer, _oldVersionClient, _oldVersionServer]; AGM_Version_ClientErrors = [_missingAddon, _missingAddonServer, _oldVersionClient, _oldVersionServer];

View File

@ -1,4 +1,4 @@
// by commy2 // by commy2
closeDialog 0; closeDialog 0;
[localize "STR_GVAR(ProfileNotSaved)"] call GVAR(fnc_displayTextStructured); [localize QUOTE(DOUBLES(STR,GVAR(ProfileNotSaved)))] call FUNC(displayTextStructured);

View File

@ -5,17 +5,17 @@
#define OFFSET_1 100 #define OFFSET_1 100
#define OFFSET_2 200 #define OFFSET_2 200
waitUntil {isNil "GVAR(keyNewTemp)"}; waitUntil {isNil QGVAR(keyNewTemp)};
GVAR(keyNewTemp) = []; GVAR(keyNewTemp) = [];
GVAR(keySet) = 0; GVAR(keySet) = 0;
_index = count GVAR(keyNew); _index = count GVAR(keyNew);
disableSerialization; disableSerialization;
_dlgMenuDialog = uiNamespace getVariable "GVAR(MenuDialog)"; _dlgMenuDialog = uiNamespace getVariable QGVAR(MenuDialog);
_ctrlMenuDialog = _dlgMenuDialog displayCtrl (OFFSET_2 + (_this select 0)); _ctrlMenuDialog = _dlgMenuDialog displayCtrl (OFFSET_2 + (_this select 0));
_action = GVAR(keyNames) select (_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];// _keyCode = profileNamespace getVariable [format ["AGM_Key_%1", _action], 0];//
for "_index1" from 0 to (count GVAR(keyNew) - 1) do { 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; _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 21) ctrlSetTextColor GRAY;
(_dlgMenuDialog displayCtrl 22) ctrlSetTextColor GRAY; (_dlgMenuDialog displayCtrl 22) ctrlSetTextColor GRAY;
(_dlgMenuDialog displayCtrl 23) ctrlSetTextColor GRAY;*/ (_dlgMenuDialog displayCtrl 23) ctrlSetTextColor GRAY;*/
@ -40,7 +40,7 @@ GVAR(keysetDefault) = compile format [
_ctrl = getNumber (_configFile >> 'Control') == 1; _ctrl = getNumber (_configFile >> 'Control') == 1;
_alt = getNumber (_configFile >> 'Alt') == 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];", GVAR(keyNewTemp) = [_key, [_shft, _ctrl, _alt], _keyCode];",
_action _action
@ -59,20 +59,20 @@ waitUntil {
//_keyCode = round (10 * ((GVAR(keyNewTemp) select 2) % 1)); //_keyCode = round (10 * ((GVAR(keyNewTemp) select 2) % 1));
_keyCode = GVAR(keyNewTemp) select 2; _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]); /*_key = toString (toArray (keyName _key) - [34]);
switch (_keyCode) do { switch (_keyCode) do {
case 8 : { 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 21) ctrlSetTextColor GRAY;
(_dlgMenuDialog displayCtrl 22) ctrlSetTextColor GRAY; (_dlgMenuDialog displayCtrl 22) ctrlSetTextColor GRAY;
(_dlgMenuDialog displayCtrl 23) ctrlSetTextColor GRAY; (_dlgMenuDialog displayCtrl 23) ctrlSetTextColor GRAY;
}; };
case 9 : { 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 21) ctrlSetTextColor GRAY;
(_dlgMenuDialog displayCtrl 22) 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 { if (GVAR(keySet) == 1 && {count GVAR(keyNewTemp) > 0}) then {
_keyCode = GVAR(keyNewTemp) select 2; _keyCode = GVAR(keyNewTemp) select 2;
_description = [_keyCode] call GVAR(fnc_revertKeyCodeLocalized); _description = [_keyCode] call FUNC(revertKeyCodeLocalized);
_ctrlMenuDialog ctrlSetText _description; _ctrlMenuDialog ctrlSetText _description;
GVAR(keyNew) set [_index, [_action, _keyCode]]; GVAR(keyNew) set [_index, [_action, _keyCode]];

View File

@ -9,7 +9,7 @@ _alt =_this select 4;
if (_key in FORBIDDEN_KEYS) exitWith {true}; 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; _keyIndex = floor _keyCode;
_time = time; _time = time;

View File

@ -6,7 +6,7 @@
#define OFFSET_4 400 #define OFFSET_4 400
#define OFFSET_5 500 #define OFFSET_5 500
_config = configFile >> "GVAR(Default_Keys)"; _config = configFile >> QGVAR(Default_Keys);
_count = count _config; _count = count _config;
_countPages = ceil (_count / 20) + 1; _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}; if (GVAR(MenuPage) > _countPages - 1) then {GVAR(MenuPage) = 0};
disableSerialization; disableSerialization;
_dlgMenuDialog = uiNamespace getVariable "GVAR(MenuDialog)"; _dlgMenuDialog = uiNamespace getVariable QGVAR(MenuDialog);
(_dlgMenuDialog displayCtrl 14) ctrlSetText format ["%1/%2", GVAR(MenuPage) + 1, _countPages]; (_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_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}; 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; _count = count _config;
_offset = 0; _offset = 0;
@ -40,7 +40,7 @@ if (GVAR(MenuPage) == _countPages - 1) then {
_control2 = _dlgMenuDialog displayCtrl (OFFSET_4 + _index); _control2 = _dlgMenuDialog displayCtrl (OFFSET_4 + _index);
_control3 = _dlgMenuDialog displayCtrl (OFFSET_5 + _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; _control2 ctrlSetText _displayName;
_control1 ctrlShow true; _control1 ctrlShow true;
@ -96,7 +96,7 @@ if (GVAR(MenuPage) == _countPages - 1) then {
_updateKeys select _indexUpdate; _updateKeys select _indexUpdate;
}; };
_description = [_keyCode] call GVAR(fnc_revertKeyCodeLocalized); _description = [_keyCode] call FUNC(revertKeyCodeLocalized);
_control1 = _dlgMenuDialog displayCtrl (OFFSET_1 + _index); _control1 = _dlgMenuDialog displayCtrl (OFFSET_1 + _index);
_control2 = _dlgMenuDialog displayCtrl (OFFSET_2 + _index); _control2 = _dlgMenuDialog displayCtrl (OFFSET_2 + _index);

View File

@ -4,7 +4,7 @@
#define OFFSET_2 200 #define OFFSET_2 200
closeDialog 0; closeDialog 0;
createDialog "GVAR(OptionsMenu_Dialog)"; createDialog QGVAR(OptionsMenu_Dialog);
GVAR(keyNew) = []; GVAR(keyNew) = [];
GVAR(keySet) = -1; GVAR(keySet) = -1;
@ -16,12 +16,12 @@ GVAR(OptionNamesNew) = [];
GVAR(OptionStatesNew) = []; GVAR(OptionStatesNew) = [];
disableSerialization; disableSerialization;
_dlgMenuDialog = uiNamespace getVariable "GVAR(MenuDialog)"; _dlgMenuDialog = uiNamespace getVariable QGVAR(MenuDialog);
_ehid_keydown = _dlgMenuDialog displayAddEventHandler ["KeyDown", "_this select 1 > 1"]; _ehid_keydown = _dlgMenuDialog displayAddEventHandler ["KeyDown", "_this select 1 > 1"];
_ehid_keyup = _dlgMenuDialog displayAddEventHandler ["KeyUp", "_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; _count = count _config;
_countPages = ceil (_count / 20) + 1; _countPages = ceil (_count / 20) + 1;
@ -34,7 +34,7 @@ for "_index" from 0 to (_count - 1 min 19) do {
_isDisabled = getNumber (_configFile >> "disabled") == 1; _isDisabled = getNumber (_configFile >> "disabled") == 1;
_keyCode = profileNamespace getVariable format ["AGM_Key_%1", _keyName]; _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); _control1 = _dlgMenuDialog displayCtrl (OFFSET_1 + _index);
_control2 = _dlgMenuDialog displayCtrl (OFFSET_2 + _index); _control2 = _dlgMenuDialog displayCtrl (OFFSET_2 + _index);
@ -83,12 +83,12 @@ if (GVAR(keySave) == 1) then {
if (_count0 > 0 || {_count1 > 0}) then { if (_count0 > 0 || {_count1 > 0}) then {
saveProfileNamespace; saveProfileNamespace;
[localize "STR_GVAR(ProfileSaved)"] call GVAR(fnc_displayTextStructured); [localize QUOTE(DOUBLES(STR,GVAR(ProfileSaved)))] call FUNC(displayTextStructured);
} else { } else {
[localize "STR_GVAR(ProfileNotSaved)"] call GVAR(fnc_displayTextStructured); [localize QUOTE(DOUBLES(STR,GVAR(ProfileNotSaved)))] call FUNC(displayTextStructured);
}; };
} else { } else {
[localize "STR_GVAR(ProfileNotSaved)"] call GVAR(fnc_displayTextStructured); [localize QUOTE(DOUBLES(STR,GVAR(ProfileNotSaved)))] call FUNC(displayTextStructured);
}; };
GVAR(keyNewTemp) = nil; GVAR(keyNewTemp) = nil;

View File

@ -8,7 +8,7 @@ for "_index" from 0 to (_count - 1) do {
_name = configName _x; _name = configName _x;
_value = _x call bis_fnc_getcfgdata; _value = _x call bis_fnc_getcfgdata;
[_name, _value] call GVAR(fnc_setParameter); [_name, _value] call FUNC(setParameter);
}; };
_config = configFile >> "AGM_Parameters_Numeric"; _config = configFile >> "AGM_Parameters_Numeric";
@ -18,7 +18,7 @@ for "_index" from 0 to (_count - 1) do {
_name = configName _x; _name = configName _x;
_value = _x call bis_fnc_getcfgdata; _value = _x call bis_fnc_getcfgdata;
[_name, _value] call GVAR(fnc_setParameter); [_name, _value] call FUNC(setParameter);
}; };
_config = configFile >> "AGM_Parameters_Boolean"; _config = configFile >> "AGM_Parameters_Boolean";
@ -28,7 +28,7 @@ for "_index" from 0 to (_count - 1) do {
_name = configName _x; _name = configName _x;
_value = _x call bis_fnc_getcfgdata; _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; _name = configName _x;
_value = _x call bis_fnc_getcfgdata; _value = _x call bis_fnc_getcfgdata;
[_name, _value] call GVAR(fnc_setParameter); [_name, _value] call FUNC(setParameter);
}; };
_config = missionConfigFile >> "AGM_Parameters_Numeric"; _config = missionConfigFile >> "AGM_Parameters_Numeric";
@ -50,7 +50,7 @@ for "_index" from 0 to (_count - 1) do {
_name = configName _x; _name = configName _x;
_value = _x call bis_fnc_getcfgdata; _value = _x call bis_fnc_getcfgdata;
[_name, _value] call GVAR(fnc_setParameter); [_name, _value] call FUNC(setParameter);
}; };
_config = missionConfigFile >> "AGM_Parameters_Boolean"; _config = missionConfigFile >> "AGM_Parameters_Boolean";
@ -60,5 +60,5 @@ for "_index" from 0 to (_count - 1) do {
_name = configName _x; _name = configName _x;
_value = _x call bis_fnc_getcfgdata; _value = _x call bis_fnc_getcfgdata;
[_name, _value > 0] call GVAR(fnc_setParameter); [_name, _value > 0] call FUNC(setParameter);
}; };

View File

@ -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)}; _state = if (_index1 == -1) then {_index1 = count GVAR(OptionNamesNew); !(profileNamespace getVariable _name)} else {!(GVAR(OptionStatesNew) select _index1)};
disableSerialization; disableSerialization;
_dlgMenuDialog = uiNamespace getVariable "GVAR(MenuDialog)"; _dlgMenuDialog = uiNamespace getVariable QGVAR(MenuDialog);
_control = _dlgMenuDialog displayCtrl (300 + _index); _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(OptionNamesNew) set [_index1, _name];
GVAR(OptionStatesNew) set [_index1, _state]; GVAR(OptionStatesNew) set [_index1, _state];