From ad2dded86a544cdfa0b87968e2ae3cac15d10d7e Mon Sep 17 00:00:00 2001 From: BrettMayson Date: Mon, 2 Sep 2024 14:33:33 -0600 Subject: [PATCH] fix command casing --- .../accessory/fnc_addAttachmentCondition.sqf | 2 +- addons/accessory/fnc_switchAttachment.sqf | 4 +- .../accessory/fnc_switchableAttachments.sqf | 2 +- addons/ai/fnc_addWaypoint.sqf | 2 +- addons/ai/fnc_searchNearby.sqf | 2 +- addons/ai/fnc_taskDefend.sqf | 6 +- addons/arrays/fnc_shuffle.sqf | 2 +- addons/common/fnc_deleteEntity.sqf | 4 +- addons/common/fnc_execNextFrame.sqf | 4 +- addons/common/fnc_getTerrainProfile.sqf | 4 +- addons/common/fnc_isAlive.sqf | 4 +- addons/common/fnc_turretDir.sqf | 2 +- addons/common/fnc_weaponComponents.sqf | 2 +- addons/common/init_addMiscItemsToArsenal.sqf | 26 ++++---- addons/common/init_perFrameHandler.sqf | 10 +-- addons/common/test_macro_is_x.sqf | 4 +- .../fnc_initExtendedDebugConsole.sqf | 16 ++--- addons/help/XEH_preStart.sqf | 4 +- addons/keybinding/fnc_registerKeybind.sqf | 2 +- addons/music/fnc_compileMusic.sqf | 2 +- addons/music/fnc_findMusic.sqf | 4 +- addons/music/fnc_playMusic.sqf | 2 +- addons/optics/RscInGameUI.hpp | 8 +-- addons/optics/fnc_animateScriptedOptic.sqf | 6 +- addons/optics/fnc_initDisplayInterrupt.sqf | 14 ++-- addons/optics/fnc_loadScriptedOptic.sqf | 4 +- addons/optics/script_component.hpp | 2 +- addons/settings/script_component.hpp | 6 +- addons/ui/RscTitles.hpp | 8 +-- addons/ui/flexiMenu/fnc_getMenuOption.sqf | 4 +- addons/ui/flexiMenu/fnc_list.sqf | 4 +- addons/ui/flexiMenu/fnc_menu.sqf | 2 +- addons/ui/fnc_initDisplayInterrupt.sqf | 4 +- addons/ui/fnc_initDisplayPassword.sqf | 4 +- addons/ui/fnc_initDisplayRemoteMissions.sqf | 2 +- addons/ui/fnc_notify.sqf | 8 +-- addons/ui/fnc_openItemContextMenu.sqf | 2 +- addons/ui/script_component.hpp | 4 +- .../debug/fn_isDebugConsoleAllowed.sqf | 40 ++++++------ include/a3/functions_f/gui/fn_initDisplay.sqf | 64 +++++++++---------- .../functions_f/misc/fn_endLoadingScreen.sqf | 6 +- .../misc/fn_startLoadingScreen.sqf | 6 +- 42 files changed, 154 insertions(+), 154 deletions(-) diff --git a/addons/accessory/fnc_addAttachmentCondition.sqf b/addons/accessory/fnc_addAttachmentCondition.sqf index cad7f8820b..40657225c9 100644 --- a/addons/accessory/fnc_addAttachmentCondition.sqf +++ b/addons/accessory/fnc_addAttachmentCondition.sqf @@ -23,7 +23,7 @@ Author: params [["_item", "", [""]], ["_condition", {true}, [{}]]]; -if (!isClass (configfile >> "CfgWeapons" >> _item)) exitWith { ERROR_1("Item not found [%1]",_item); }; +if (!isClass (configFile >> "CfgWeapons" >> _item)) exitWith { ERROR_1("Item not found [%1]",_item); }; private _usageArray = GVAR(usageHash) getOrDefault [_item, [], true]; _usageArray pushBack _condition; diff --git a/addons/accessory/fnc_switchAttachment.sqf b/addons/accessory/fnc_switchAttachment.sqf index f08b9ee2ab..f2759fa997 100644 --- a/addons/accessory/fnc_switchAttachment.sqf +++ b/addons/accessory/fnc_switchAttachment.sqf @@ -41,7 +41,7 @@ private _currWeaponType = call { }; if (_currWeaponType < 0) exitWith {false}; -private _cfgWeapons = configfile >> "CfgWeapons"; +private _cfgWeapons = configFile >> "CfgWeapons"; private _testItem = _currItem; while {_testItem != ""} do { @@ -51,7 +51,7 @@ while {_testItem != ""} do { } else { configProperties [_cfgWeapons >> _testItem, "configName _x == 'MRT_SwitchItemPrevClass'", false]; }; - + if (_configs isEqualTo []) then { _testItem = ""; } else { diff --git a/addons/accessory/fnc_switchableAttachments.sqf b/addons/accessory/fnc_switchableAttachments.sqf index 9078721e66..df809f0482 100644 --- a/addons/accessory/fnc_switchableAttachments.sqf +++ b/addons/accessory/fnc_switchableAttachments.sqf @@ -22,7 +22,7 @@ Author: params ["_item"]; -private _cfgWeapons = configfile >> "CfgWeapons"; +private _cfgWeapons = configFile >> "CfgWeapons"; private _config = _cfgWeapons >> _item; private _forward = []; diff --git a/addons/ai/fnc_addWaypoint.sqf b/addons/ai/fnc_addWaypoint.sqf index 1312bca508..f34fe21b9b 100644 --- a/addons/ai/fnc_addWaypoint.sqf +++ b/addons/ai/fnc_addWaypoint.sqf @@ -52,7 +52,7 @@ _position = _position call CBA_fnc_getPos; // addWaypoint expects ASL when a negative radius is provided for exact placement // otherwise waypoints will be placed under the ground if (_radius < 0) then { - _position = AGLtoASL _position; + _position = AGLToASL _position; }; private _waypoint = _group addWaypoint [_position, _radius]; diff --git a/addons/ai/fnc_searchNearby.sqf b/addons/ai/fnc_searchNearby.sqf index 1a1c6d8774..cee4397a05 100644 --- a/addons/ai/fnc_searchNearby.sqf +++ b/addons/ai/fnc_searchNearby.sqf @@ -26,7 +26,7 @@ _group = _group call CBA_fnc_getGroup; if !(local _group) exitWith {}; // Don't create waypoints on each machine private _building = nearestBuilding (leader _group); -if ((leader _group) distanceSqr _building > 250e3) exitwith {}; +if ((leader _group) distanceSqr _building > 250e3) exitWith {}; [_group, _building] spawn { params ["_group", "_building"]; diff --git a/addons/ai/fnc_taskDefend.sqf b/addons/ai/fnc_taskDefend.sqf index ee325bba4c..14bac4c51e 100644 --- a/addons/ai/fnc_taskDefend.sqf +++ b/addons/ai/fnc_taskDefend.sqf @@ -87,7 +87,7 @@ if (_patrol > 0 && {count _units > 1}) then { [_x] orderGetIn true; } else { // Respect chance to patrol, or force if no building positions left - if !((_buildings isEqualto []) || { (random 1 < _patrol) }) then { + if !((_buildings isEqualTo []) || { (random 1 < _patrol) }) then { private _building = selectRandom _buildings; private _array = _building getVariable ["CBA_taskDefend_positions", []]; @@ -105,10 +105,10 @@ if (_patrol > 0 && {count _units > 1}) then { // Wait until AI is in position then force them to stay [_x, _pos, _hold] spawn { params ["_unit", "_pos", "_hold"]; - if (surfaceIsWater _pos) exitwith {}; + if (surfaceIsWater _pos) exitWith {}; _unit doMove _pos; - waituntil {unitReady _unit}; + waitUntil {unitReady _unit}; if (random 1 < _hold) then { _unit disableAI "PATH"; } else { diff --git a/addons/arrays/fnc_shuffle.sqf b/addons/arrays/fnc_shuffle.sqf index 7b946cbe7d..ae1f2fe1e4 100644 --- a/addons/arrays/fnc_shuffle.sqf +++ b/addons/arrays/fnc_shuffle.sqf @@ -31,7 +31,7 @@ params [["_array", [], [[]]], ["_inPlace", false, [false]]]; private _tempArray = + _array; -If (_inPlace) then { +if (_inPlace) then { for "_size" from (count _tempArray) to 1 step -1 do { _array set [_size - 1, (_tempArray deleteAt (floor random _size))]; }; diff --git a/addons/common/fnc_deleteEntity.sqf b/addons/common/fnc_deleteEntity.sqf index 0f7c3bc468..69e18d6a84 100644 --- a/addons/common/fnc_deleteEntity.sqf +++ b/addons/common/fnc_deleteEntity.sqf @@ -42,7 +42,7 @@ switch (typeName _entity) do { }; case "GROUP" : { (units _entity) call CBA_fnc_deleteEntity; - {deleteWaypoint _x} forEach (wayPoints _entity); + {deleteWaypoint _x} forEach (waypoints _entity); if (isNull _entity) exitWith {}; if (local _entity) then { deleteGroup _entity; @@ -54,7 +54,7 @@ switch (typeName _entity) do { _this call CBA_fnc_deleteEntity; }, _entity] call CBA_fnc_waitUntilAndExecute; } else { - _entity remoteExecCall ["CBA_fnc_deleteEntity", _groupOwner]; + _entity remoteExecCall ["CBA_fnc_deleteEntity", _groupOwner]; }; } else { _entity remoteExecCall ["CBA_fnc_deleteEntity", 2]; diff --git a/addons/common/fnc_execNextFrame.sqf b/addons/common/fnc_execNextFrame.sqf index e0b2b00eef..9e2b6181d4 100644 --- a/addons/common/fnc_execNextFrame.sqf +++ b/addons/common/fnc_execNextFrame.sqf @@ -14,7 +14,7 @@ Returns: Examples: (begin example) - [{player sideChat format ["This is frame %1, not %2", diag_frameno, _this select 0];}, [diag_frameno]] call CBA_fnc_execNextFrame; + [{player sideChat format ["This is frame %1, not %2", diag_frameNo, _this select 0];}, [diag_frameNo]] call CBA_fnc_execNextFrame; (end) Author: @@ -23,7 +23,7 @@ Author: params [["_function", {}, [{}]], ["_args", []]]; -if (diag_frameno != GVAR(nextFrameNo)) then { +if (diag_frameNo != GVAR(nextFrameNo)) then { GVAR(nextFrameBufferA) pushBack [_args, _function]; } else { GVAR(nextFrameBufferB) pushBack [_args, _function]; diff --git a/addons/common/fnc_getTerrainProfile.sqf b/addons/common/fnc_getTerrainProfile.sqf index 47b5c90ff3..2145dd2f9c 100644 --- a/addons/common/fnc_getTerrainProfile.sqf +++ b/addons/common/fnc_getTerrainProfile.sqf @@ -32,7 +32,7 @@ DEFAULT_PARAM(2,_resolution,10); private _angle = [_posA, _posB] call BIS_fnc_dirTo; private _2Ddistance = [_posA, _posB] call BIS_fnc_distance2D; -private _logic = "logic" createvehiclelocal _posA; +private _logic = "logic" createVehicleLocal _posA; _logic setPosATL _posA; private _z = (getPosASL _logic) select 2; private _return = []; @@ -49,6 +49,6 @@ _logic setPosATL _posB; private _alt = ((getPosASL _logic) select 2) - _z; _return pushBack [_alt, _2Ddistance, _pos]; -deletevehicle _logic; +deleteVehicle _logic; [_2Ddistance, _angle, _return] diff --git a/addons/common/fnc_isAlive.sqf b/addons/common/fnc_isAlive.sqf index a0092ef2c2..e7c7f978ef 100644 --- a/addons/common/fnc_isAlive.sqf +++ b/addons/common/fnc_isAlive.sqf @@ -23,7 +23,7 @@ SCRIPT(isAlive); [_this] params [["_entity", objNull, [objNull, grpNull, []]]]; -switch (typename _entity) do { +switch (typeName _entity) do { case "ARRAY" : { private _return = false; @@ -39,7 +39,7 @@ switch (typename _entity) do { alive _entity; }; case "GROUP" : { - if (isnull (leader _entity)) then { + if (isNull (leader _entity)) then { false } else { (units _entity) call CBA_fnc_isAlive diff --git a/addons/common/fnc_turretDir.sqf b/addons/common/fnc_turretDir.sqf index 152e608e21..de7fd97cbd 100644 --- a/addons/common/fnc_turretDir.sqf +++ b/addons/common/fnc_turretDir.sqf @@ -37,7 +37,7 @@ if (_gunEnd isEqualTo _gunBeg) then { _gunBeg = _gunEnd vectorAdd (_vehicle vectorWorldToModel eyeDirection _vehicle); }; private _vehicleConfig = configOf _vehicle; - if (((getNumber (_vehicleConfig >> "isUAV")) == 1) && {_turret isEqualto [0]}) then { + if (((getNumber (_vehicleConfig >> "isUAV")) == 1) && {_turret isEqualTo [0]}) then { _gunBeg = _vehicle selectionPosition getText (_vehicleConfig >> "uavCameraGunnerDir"); _gunEnd = _vehicle selectionPosition getText (_vehicleConfig >> "uavCameraGunnerPos"); } else { diff --git a/addons/common/fnc_weaponComponents.sqf b/addons/common/fnc_weaponComponents.sqf index b08d8667d9..f40eac579c 100644 --- a/addons/common/fnc_weaponComponents.sqf +++ b/addons/common/fnc_weaponComponents.sqf @@ -35,7 +35,7 @@ if (isNil QGVAR(weaponComponentsCache)) then { private _components = GVAR(weaponComponentsCache) getVariable _weapon; if (isNil "_components") then { - private _config = configfile >> "CfgWeapons" >> _weapon; + private _config = configFile >> "CfgWeapons" >> _weapon; // Return empty array if the weapon doesn't exist if (!isClass _config) exitWith { diff --git a/addons/common/init_addMiscItemsToArsenal.sqf b/addons/common/init_addMiscItemsToArsenal.sqf index d6769e45d3..987f267f5d 100644 --- a/addons/common/init_addMiscItemsToArsenal.sqf +++ b/addons/common/init_addMiscItemsToArsenal.sqf @@ -33,9 +33,9 @@ Author: private _cbaMiscItems = []; { private _class = _x; - private _scope = if (isnumber (_class >> "scopeArsenal")) then {getnumber (_class >> "scopeArsenal")} else {getnumber (_class >> "scope")}; + private _scope = if (isNumber (_class >> "scopeArsenal")) then {getNumber (_class >> "scopeArsenal")} else {getNumber (_class >> "scope")}; TRACE_2("",_class,_scope); - if (_scope == 2 && {gettext (_class >> "model") != ""}) then { + if (_scope == 2 && {getText (_class >> "model") != ""}) then { _cbaMiscItems pushBack (configName _class); }; } forEach (configProperties [configFile >> "CfgWeapons", "(isClass _x) && {(configName _x) isKindOf ['CBA_MiscItem', configFile >> 'CfgWeapons']}"]); @@ -51,13 +51,13 @@ Author: (missionNamespace call bis_fnc_getVirtualItemCargo) + (_cargo call bis_fnc_getVirtualItemCargo) + items _center + - assigneditems _center + - primaryweaponitems _center + - secondaryweaponitems _center + - handgunitems _center + + assignedItems _center + + primaryWeaponItems _center + + secondaryWeaponItems _center + + handgunItems _center + [uniform _center,vest _center,headgear _center,goggles _center]; - private _ctrlList = _display displayctrl (IDC_RSCDISPLAYARSENAL_LIST + IDC_RSCDISPLAYARSENAL_TAB_CARGOMISC); + private _ctrlList = _display displayCtrl (IDC_RSCDISPLAYARSENAL_LIST + IDC_RSCDISPLAYARSENAL_TAB_CARGOMISC); private _virtualCargo = _virtualItemCargo; private _virtualAll = _fullVersion || {"%ALL" in _virtualCargo}; private _columns = count lnbGetColumnsPosition _ctrlList; @@ -65,12 +65,12 @@ Author: { // Add item to display list if allowed if (_virtualAll || {_x in _virtualCargo}) then { - private _xCfg = configfile >> "cfgweapons" >> _x; - private _lbAdd = _ctrlList lnbaddrow ["",gettext (_xCfg >> "displayName"),str 0]; - _ctrlList lnbsetdata [[_lbAdd,0],_x]; - _ctrlList lnbsetpicture [[_lbAdd,0],gettext (_xCfg >> "picture")]; - _ctrlList lnbsetvalue [[_lbAdd,0],getnumber (_xCfg >> "itemInfo" >> "mass")]; - _ctrlList lbsettooltip [_lbAdd * _columns,format ["%1\n%2",gettext (_xCfg >> "displayName"),_x]]; + private _xCfg = configFile >> "cfgweapons" >> _x; + private _lbAdd = _ctrlList lnbAddRow ["",getText (_xCfg >> "displayName"),str 0]; + _ctrlList lnbSetData [[_lbAdd,0],_x]; + _ctrlList lnbSetPicture [[_lbAdd,0],getText (_xCfg >> "picture")]; + _ctrlList lnbSetValue [[_lbAdd,0],getNumber (_xCfg >> "itemInfo" >> "mass")]; + _ctrlList lbSetTooltip [_lbAdd * _columns,format ["%1\n%2",getText (_xCfg >> "displayName"),_x]]; }; // Add item to main list (will be used on next arsenalOpened automaticly) diff --git a/addons/common/init_perFrameHandler.sqf b/addons/common/init_perFrameHandler.sqf index 795211f423..267a387f61 100644 --- a/addons/common/init_perFrameHandler.sqf +++ b/addons/common/init_perFrameHandler.sqf @@ -9,7 +9,7 @@ GVAR(lastTickTime) = diag_tickTime; GVAR(waitAndExecArray) = []; GVAR(waitAndExecArrayIsSorted) = false; -GVAR(nextFrameNo) = diag_frameno + 1; +GVAR(nextFrameNo) = diag_frameNo + 1; GVAR(nextFrameBufferA) = []; GVAR(nextFrameBufferB) = []; GVAR(waitUntilAndExecArray) = []; @@ -22,9 +22,9 @@ GVAR(waitUntilAndExecArray) = []; // frame number does not match expected; can happen between pre and postInit, save-game load and on closing map // need to manually set nextFrameNo, so new items get added to buffer B and are not executed this frame - if (diag_frameno != GVAR(nextFrameNo)) then { - TRACE_2("frame mismatch",diag_frameno,GVAR(nextFrameNo)); - GVAR(nextFrameNo) = diag_frameno; + if (diag_frameNo != GVAR(nextFrameNo)) then { + TRACE_2("frame mismatch",diag_frameNo,GVAR(nextFrameNo)); + GVAR(nextFrameNo) = diag_frameNo; }; // Execute per frame handlers @@ -67,7 +67,7 @@ GVAR(waitUntilAndExecArray) = []; // Swap double-buffer: GVAR(nextFrameBufferA) = GVAR(nextFrameBufferB); GVAR(nextFrameBufferB) = []; - GVAR(nextFrameNo) = diag_frameno + 1; + GVAR(nextFrameNo) = diag_frameNo + 1; // Execute the waitUntilAndExec functions: diff --git a/addons/common/test_macro_is_x.sqf b/addons/common/test_macro_is_x.sqf index 7a3862ec05..14e904d98f 100644 --- a/addons/common/test_macro_is_x.sqf +++ b/addons/common/test_macro_is_x.sqf @@ -50,7 +50,7 @@ _result = IS_CODE(_test); TEST_FALSE(_result,"MACRO_IS_CODE"); -_test = missionconfigfile; +_test = missionConfigFile; _result = IS_CONFIG(_test); TEST_TRUE(_result,"MACRO_IS_CONFIG"); @@ -89,7 +89,7 @@ _result = IS_SCALAR(_test); TEST_FALSE(_result,"MACRO_IS_SCALAR"); -_test = [] spawn {uisleep 15;}; +_test = [] spawn {uiSleep 15;}; _result = IS_SCRIPT(_test); TEST_TRUE(_result,"MACRO_IS_SCRIPT"); diff --git a/addons/diagnostic/fnc_initExtendedDebugConsole.sqf b/addons/diagnostic/fnc_initExtendedDebugConsole.sqf index 0692610769..4677478137 100644 --- a/addons/diagnostic/fnc_initExtendedDebugConsole.sqf +++ b/addons/diagnostic/fnc_initExtendedDebugConsole.sqf @@ -11,9 +11,9 @@ private _debugConsole = _display displayCtrl IDC_RSCDEBUGCONSOLE_RSCDEBUGCONSOLE _debugConsole ctrlSetPosition [ ctrlPosition _debugConsole select 0, // keep X - safezoneY + 1 * GUI_GRID_H, // top edge of the screen + safeZoneY + 1 * GUI_GRID_H, // top edge of the screen 22 * GUI_GRID_W, // slightly wider - 1 - 2 * safezoneY // full screen height + 1 - 2 * safeZoneY // full screen height ]; _debugConsole ctrlCommit 0; @@ -23,7 +23,7 @@ _debugConsole ctrlCommit 0; { if (ctrlParentControlsGroup _x == _debugConsole && {!(ctrlIDC _x in EXCLUDE)}) then { private _position = ctrlPosition _x; - _position set [1, (_position select 1) + safezoneH - 25 * GUI_GRID_H]; + _position set [1, (_position select 1) + safeZoneH - 25 * GUI_GRID_H]; _x ctrlSetPosition _position; _x ctrlCommit 0; @@ -38,7 +38,7 @@ _title ctrlSetText LLSTRING(ExtendedDebugConsole); private _expression = _display displayCtrl IDC_RSCDEBUGCONSOLE_EXPRESSION; private _position = ctrlPosition _expression; -_position set [3, safezoneH - 20.25 * GUI_GRID_H]; +_position set [3, safeZoneH - 20.25 * GUI_GRID_H]; _expression ctrlSetPosition _position; _expression ctrlCommit 0; @@ -122,7 +122,7 @@ _expression ctrlAddEventHandler ["KillFocus", { private _expressionBackground = _display displayCtrl IDC_RSCDEBUGCONSOLE_EXPRESSIONBACKGROUND; _position = ctrlPosition _expressionBackground; -_position set [3, safezoneH - 18.25 * GUI_GRID_H]; +_position set [3, safeZoneH - 18.25 * GUI_GRID_H]; _expressionBackground ctrlSetPosition _position; _expressionBackground ctrlCommit 0; @@ -132,7 +132,7 @@ _expressionBackground ctrlCommit 0; private _expressionOutput = _display displayCtrl _x; _position = ctrlPosition _expressionOutput; - _position set [1, (_position select 1) + safezoneH - 26.05 * GUI_GRID_H]; + _position set [1, (_position select 1) + safeZoneH - 26.05 * GUI_GRID_H]; _expressionOutput ctrlSetPosition _position; _expressionOutput ctrlCommit 0; @@ -143,7 +143,7 @@ private _prevButton = _display ctrlCreate ["RscButtonMenu", IDC_DEBUGCONSOLE_PRE _prevButton ctrlSetPosition [ 0 * GUI_GRID_W, - 9.25 * GUI_GRID_H + safezoneH - 26.25 * GUI_GRID_H, + 9.25 * GUI_GRID_H + safeZoneH - 26.25 * GUI_GRID_H, 10.875 * GUI_GRID_W, 1 * GUI_GRID_H ]; @@ -157,7 +157,7 @@ private _nextButton = _display ctrlCreate ["RscButtonMenu", IDC_DEBUGCONSOLE_NEX _nextButton ctrlSetPosition [ 11.125 * GUI_GRID_W, - 9.25 * GUI_GRID_H + safezoneH - 26.25 * GUI_GRID_H, + 9.25 * GUI_GRID_H + safeZoneH - 26.25 * GUI_GRID_H, 10.875 * GUI_GRID_W, 1 * GUI_GRID_H ]; diff --git a/addons/help/XEH_preStart.sqf b/addons/help/XEH_preStart.sqf index 1d53b0c3a2..9e5269764d 100644 --- a/addons/help/XEH_preStart.sqf +++ b/addons/help/XEH_preStart.sqf @@ -48,7 +48,7 @@ uiNamespace setVariable [QGVAR(credits), compileFinal str _credits]; // mods private _mods = ("true" configClasses (configFile >> "CfgPatches")) apply {configSourceMod _x}; -_mods = ((_mods arrayIntersect _mods) select {!isNumber (configfile >> "CfgMods" >> _x >> "appId")}) - [""]; +_mods = ((_mods arrayIntersect _mods) select {!isNumber (configFile >> "CfgMods" >> _x >> "appId")}) - [""]; _mods = _mods apply { (modParams [_x, ["name"]]) params ["_name"]; @@ -58,7 +58,7 @@ _mods = _mods apply { _name = _name call CBA_fnc_sanitizeHTML; _name = format [" %1 - %2", _mod, _name]; - private _entry = configfile >> "CfgMods" >> _x; // _x may be "@CBA_A3" + private _entry = configFile >> "CfgMods" >> _x; // _x may be "@CBA_A3" if (isClass _entry) then { if (isText (_entry >> "description")) then { private _description = getText (_entry >> "description") call CBA_fnc_sanitizeHTML; diff --git a/addons/keybinding/fnc_registerKeybind.sqf b/addons/keybinding/fnc_registerKeybind.sqf index cb585b842a..fb723f72f6 100644 --- a/addons/keybinding/fnc_registerKeybind.sqf +++ b/addons/keybinding/fnc_registerKeybind.sqf @@ -30,7 +30,7 @@ if (count _defaultKeybind != 4) then { _warn call BIS_fnc_error; diag_log format _warn; }; - diag_log Format ["Converted _defaultKeybind => %1",_defaultKeybind]; + diag_log format ["Converted _defaultKeybind => %1",_defaultKeybind]; }; _defaultKeybind params ["_dikCode", "_shift", "_ctrl", "_alt"]; diff --git a/addons/music/fnc_compileMusic.sqf b/addons/music/fnc_compileMusic.sqf index c76a6d6273..5cc682e4b8 100644 --- a/addons/music/fnc_compileMusic.sqf +++ b/addons/music/fnc_compileMusic.sqf @@ -21,7 +21,7 @@ Author: ---------------------------------------------------------------------------- */ if (isNil QGVARMAIN(compiledMusic)) then { - private _allMusic = configProperties [MissionConfigFile >> "CfgMusic", "(getNumber (_x >> 'duration')) > 0", true]; + private _allMusic = configProperties [missionConfigFile >> "CfgMusic", "(getNumber (_x >> 'duration')) > 0", true]; _allMusic append configProperties [configFile >> "CfgMusic", "(getNumber (_x >> 'duration')) > 0", true]; private _unsortedSongs = []; { diff --git a/addons/music/fnc_findMusic.sqf b/addons/music/fnc_findMusic.sqf index ae7766867e..b8728d24a9 100644 --- a/addons/music/fnc_findMusic.sqf +++ b/addons/music/fnc_findMusic.sqf @@ -30,8 +30,8 @@ if (IS_STRING(_searchTags)) then {_searchTags = [_searchTags];}; if (_searchType select 0 isEqualTo "any") then {_searchType = [];}; if (_searchTags select 0 isEqualTo "any") then {_searchTags = [];}; -_searchType = _searchType apply {If (IS_STRING(_x)) then {toLower _x} else {""};}; -_searchTags = _searchTags apply {If (IS_STRING(_x)) then {toLower _x} else {""};}; +_searchType = _searchType apply {if (IS_STRING(_x)) then {toLower _x} else {""};}; +_searchTags = _searchTags apply {if (IS_STRING(_x)) then {toLower _x} else {""};}; _searchType = _searchType - [""]; _searchTags = _searchTags - [""]; diff --git a/addons/music/fnc_playMusic.sqf b/addons/music/fnc_playMusic.sqf index cf7160d0ab..a42ded40f5 100644 --- a/addons/music/fnc_playMusic.sqf +++ b/addons/music/fnc_playMusic.sqf @@ -28,7 +28,7 @@ if (_className isEqualTo "") exitWith {WARNING("No class given"); false}; if ((!_overWrite) && {call CBA_fnc_isMusicPlaying}) exitWith {false}; -if (IS_CONFIG(_className)) then {_className = configname _className;}; +if (IS_CONFIG(_className)) then {_className = configName _className;}; private _return = false; diff --git a/addons/optics/RscInGameUI.hpp b/addons/optics/RscInGameUI.hpp index c5fbd29efe..486fffcb00 100644 --- a/addons/optics/RscInGameUI.hpp +++ b/addons/optics/RscInGameUI.hpp @@ -49,16 +49,16 @@ class RscInGameUI { // It will ONLY effect tripple head users, as (safeZoneX == safeZoneXAbs) for everyone else. class TrippleHeadLeft: RscText { idc = IDC_BLACK_LEFT; - x = QUOTE(safezoneXAbs); - y = QUOTE(safezoneY); + x = QUOTE(safeZoneXAbs); + y = QUOTE(safeZoneY); w = QUOTE(THIRD_SCREEN_WIDTH); - h = QUOTE(safezoneH); + h = QUOTE(safeZoneH); colorBackground[] = {0,0,0,1}; }; class TrippleHeadRight: TrippleHeadLeft { idc = IDC_BLACK_RIGHT; - x = QUOTE(safezoneXAbs + safezoneWAbs - THIRD_SCREEN_WIDTH); + x = QUOTE(safeZoneXAbs + safeZoneWAbs - THIRD_SCREEN_WIDTH); }; class Magnification: CA_Zeroing { diff --git a/addons/optics/fnc_animateScriptedOptic.sqf b/addons/optics/fnc_animateScriptedOptic.sqf index 658d1fc592..d76424596d 100644 --- a/addons/optics/fnc_animateScriptedOptic.sqf +++ b/addons/optics/fnc_animateScriptedOptic.sqf @@ -63,10 +63,10 @@ GVAR(camera) camCommitPrepared 0; // @todo, check if that needs to be done at all if (cameraView == "GUNNER") then { - GVAR(camera) camSetFOV 0.75; + GVAR(camera) camSetFov 0.75; GVAR(camera) camCommit 0; } else { - GVAR(camera) camSetFOV 0.01; + GVAR(camera) camSetFov 0.01; GVAR(camera) camCommit 0; }; @@ -123,7 +123,7 @@ _display setVariable [QGVAR(DetailScaleFactor), _detailScaleFactor]; _ctrlReticle ctrlSetText _texture; _ctrlBody ctrlSetTextColor [1,1,1,_dayOpacity]; _ctrlBodyNight ctrlSetTextColor [1,1,1,_nightOpacity]; -_ctrlBlackScope ctrlShow (GVAR(usePipOptics) && !isPipEnabled); +_ctrlBlackScope ctrlShow (GVAR(usePipOptics) && !isPiPEnabled); // tilt while leaning private _bank = 0; diff --git a/addons/optics/fnc_initDisplayInterrupt.sqf b/addons/optics/fnc_initDisplayInterrupt.sqf index 260923da1f..6050360cf7 100644 --- a/addons/optics/fnc_initDisplayInterrupt.sqf +++ b/addons/optics/fnc_initDisplayInterrupt.sqf @@ -46,24 +46,24 @@ private _ctrlBlackRight = _display ctrlCreate ["RscText", IDC_BLACK_RIGHT]; private _width = THIRD_SCREEN_WIDTH; if (GVAR(hidePeripheralVision)) then { - _width = 0.5 - (_bodyPosition select 2)/2 - safezoneXAbs + pixelW/2; + _width = 0.5 - (_bodyPosition select 2)/2 - safeZoneXAbs + pixelW/2; }; _ctrlBlackLeft ctrlSetBackgroundColor [0,0,0,1]; _ctrlBlackLeft ctrlSetPosition [ - safezoneXAbs, - safezoneY, + safeZoneXAbs, + safeZoneY, _width, - safezoneH + safeZoneH ]; _ctrlBlackLeft ctrlCommit 0; _ctrlBlackRight ctrlSetBackgroundColor [0,0,0,1]; _ctrlBlackRight ctrlSetPosition [ - safezoneXAbs + safezoneWAbs - _width, - safezoneY, + safeZoneXAbs + safeZoneWAbs - _width, + safeZoneY, _width, - safezoneH + safeZoneH ]; _ctrlBlackRight ctrlCommit 0; diff --git a/addons/optics/fnc_loadScriptedOptic.sqf b/addons/optics/fnc_loadScriptedOptic.sqf index 785d034c1d..e105f3f13f 100644 --- a/addons/optics/fnc_loadScriptedOptic.sqf +++ b/addons/optics/fnc_loadScriptedOptic.sqf @@ -85,14 +85,14 @@ _ctrlReticleSafezone ctrlCommit 0; private _width = THIRD_SCREEN_WIDTH; if (GVAR(hidePeripheralVision)) then { - _width = 0.5 - (_bodyPosition select 2)/2 - safezoneXAbs + pixelW/2; + _width = 0.5 - (_bodyPosition select 2)/2 - safeZoneXAbs + pixelW/2; }; _ctrlBlackLeft ctrlSetPositionW _width; _ctrlBlackLeft ctrlCommit 0; _ctrlBlackRight ctrlSetPositionW _width; -_ctrlBlackRight ctrlSetPositionX (safezoneXAbs + safezoneWAbs - _width); +_ctrlBlackRight ctrlSetPositionX (safeZoneXAbs + safeZoneWAbs - _width); _ctrlBlackRight ctrlCommit 0; if (_init) then { diff --git a/addons/optics/script_component.hpp b/addons/optics/script_component.hpp index 17de533083..b73c6b5d2c 100644 --- a/addons/optics/script_component.hpp +++ b/addons/optics/script_component.hpp @@ -23,7 +23,7 @@ #define WEAPON_MAGAZINES(unit,weapon) (weaponsItems (unit) select {_x select 0 == (weapon)} param [0, []] select {_x isEqualType []}) #define SOUND_RETICLE_SWITCH ["A3\Sounds_F\arsenal\weapons\UGL\Firemode_ugl",0.31622776,1,5] -#define THIRD_SCREEN_WIDTH ((safezoneX - safezoneXAbs) * ((getResolution select 4)/(16/3))) +#define THIRD_SCREEN_WIDTH ((safeZoneX - safeZoneXAbs) * ((getResolution select 4)/(16/3))) // control ids #define IDC_RETICLE 4000 diff --git a/addons/settings/script_component.hpp b/addons/settings/script_component.hpp index 9d7cb42a5c..02e54ae692 100644 --- a/addons/settings/script_component.hpp +++ b/addons/settings/script_component.hpp @@ -111,11 +111,11 @@ #define CAN_SET_SERVER_SETTINGS ((isServer || FUNC(whitelisted)) && {!isNull GVAR(server)}) // in single player, as host (local server) or as logged in (not voted) admin connected to a dedicated server #define CAN_SET_CLIENT_SETTINGS !isServer // in multiplayer as dedicated client -#define CAN_SET_MISSION_SETTINGS is3den // in editor +#define CAN_SET_MISSION_SETTINGS is3DEN // in editor #define CAN_VIEW_SERVER_SETTINGS !isNull GVAR(server) // everyone can peak at those in multiplayer #define CAN_VIEW_CLIENT_SETTINGS !isServer // in multiplayer as dedicated client -#define CAN_VIEW_MISSION_SETTINGS (is3den || {missionVersion >= 15}) // can view those in 3den or 3den missions +#define CAN_VIEW_MISSION_SETTINGS (is3DEN || {missionVersion >= 15}) // can view those in 3den or 3den missions #define HASH_NULL ([] call CBA_fnc_hashCreate) #define NAMESPACE_NULL objNull @@ -124,7 +124,7 @@ #define GET_TEMP_NAMESPACE_VALUE(setting,source) (GET_TEMP_NAMESPACE(source) getVariable [setting, [nil, nil]] select 0) #define GET_TEMP_NAMESPACE_PRIORITY(setting,source) (GET_TEMP_NAMESPACE(source) getVariable [setting, [nil, nil]] select 1) -#define SET_TEMP_NAMESPACE_AWAITING_RESTART(setting) if (toLower setting in GVAR(needRestart) && {!is3den}) then {GVAR(awaitingRestartTemp) pushBackUnique toLower setting} +#define SET_TEMP_NAMESPACE_AWAITING_RESTART(setting) if (toLower setting in GVAR(needRestart) && {!is3DEN}) then {GVAR(awaitingRestartTemp) pushBackUnique toLower setting} #define SET_TEMP_NAMESPACE_VALUE(setting,value,source) GET_TEMP_NAMESPACE(source) setVariable [setting, [value, GET_TEMP_NAMESPACE_PRIORITY(setting,source)]]; SET_TEMP_NAMESPACE_AWAITING_RESTART(setting) #define SET_TEMP_NAMESPACE_PRIORITY(setting,priority,source) GET_TEMP_NAMESPACE(source) setVariable [setting, [GET_TEMP_NAMESPACE_VALUE(setting,source), priority]]; SET_TEMP_NAMESPACE_AWAITING_RESTART(setting) diff --git a/addons/ui/RscTitles.hpp b/addons/ui/RscTitles.hpp index 5074d10b1b..219695b4cf 100644 --- a/addons/ui/RscTitles.hpp +++ b/addons/ui/RscTitles.hpp @@ -10,10 +10,10 @@ class RscTitles { class Background: RscText { colorBackground[] = {0,0,0,0}; - x = "safezoneXAbs"; - y = "safezoneY"; - w = "safezoneWAbs"; - h = "safezoneH"; + x = "safeZoneXAbs"; + y = "safeZoneY"; + w = "safeZoneWAbs"; + h = "safeZoneH"; }; class TitleBackground: RscText { diff --git a/addons/ui/flexiMenu/fnc_getMenuOption.sqf b/addons/ui/flexiMenu/fnc_getMenuOption.sqf index 2708501451..14f24b12e8 100644 --- a/addons/ui/flexiMenu/fnc_getMenuOption.sqf +++ b/addons/ui/flexiMenu/fnc_getMenuOption.sqf @@ -109,12 +109,12 @@ if (_enabled != 0 && {_visible > 0}) then { }; } else { _shortcut_DIK = -1; // disable shortcut for disabled menu options - if (_shortcut_DIK != -1) then {player sidechat str [_caption, _shortcut_DIK, _enabled, _visible]}; + if (_shortcut_DIK != -1) then {player sideChat str [_caption, _shortcut_DIK, _enabled, _visible]}; }; // remove "^" from caption and substitute coloured shortcut letter if enabled. if (_index >= 0) then { - if (_enabled != 0) then { + if (_enabled != 0) then { // TODO: Read an appropriate color from the menu class. private _offset = parseNumber _containCaret; diff --git a/addons/ui/flexiMenu/fnc_list.sqf b/addons/ui/flexiMenu/fnc_list.sqf index afda3206d6..fdc7edb183 100644 --- a/addons/ui/flexiMenu/fnc_list.sqf +++ b/addons/ui/flexiMenu/fnc_list.sqf @@ -96,7 +96,7 @@ _idc = _flexiMenu_baseIDC_listButton; }; _ctrl ctrlSetStructuredText parseText _caption; - _ctrl ctrlSetToolTip _tooltip; + _ctrl ctrlSetTooltip _tooltip; _ctrl buttonSetAction _action; _ctrl ctrlCommit 0; // commit pos/size before showing @@ -117,4 +117,4 @@ for "_i" from _idc to (_flexiMenu_baseIDC_listButton + _flexiMenu_maxButtons - 1 }; //----------------------------------------------------------------------------- _idc = _flexiMenu_baseIDC_listButton; -ctrlSetFocus (_disp displayCtrl _idc); \ No newline at end of file +ctrlSetFocus (_disp displayCtrl _idc); diff --git a/addons/ui/flexiMenu/fnc_menu.sqf b/addons/ui/flexiMenu/fnc_menu.sqf index 7f292e168a..0f798670d3 100644 --- a/addons/ui/flexiMenu/fnc_menu.sqf +++ b/addons/ui/flexiMenu/fnc_menu.sqf @@ -195,7 +195,7 @@ _commitList = []; _ctrl ctrlCommit 0; // commit pos/size before showing _ctrl ctrlSetStructuredText parseText _caption; - _ctrl ctrlSetToolTip _tooltip; + _ctrl ctrlSetTooltip _tooltip; buttonSetAction [_idc, _action]; _commitList pushBack [_idc, _enabled, _visible]; diff --git a/addons/ui/fnc_initDisplayInterrupt.sqf b/addons/ui/fnc_initDisplayInterrupt.sqf index 92f3f05d23..a4c23089b2 100644 --- a/addons/ui/fnc_initDisplayInterrupt.sqf +++ b/addons/ui/fnc_initDisplayInterrupt.sqf @@ -76,7 +76,7 @@ _button ctrlRemoveEventHandler ["ButtonClick", 0]; // remove vanilla button _button ctrlAddEventHandler ["ButtonClick", { // this is an edit of a BI script, don't change unnecessarily params ["_ctrl"]; - _display = ctrlparent _ctrl; + _display = ctrlParent _ctrl; if (!ctrlCommitted _ctrl) exitWith {}; @@ -91,7 +91,7 @@ _button ctrlAddEventHandler ["ButtonClick", { _buttonsTime = 0.05; //hide buttons and collapse accordion - if (uiNamespace getvariable "BIS_DisplayInterrupt_isOptionsExpanded") then { + if (uiNamespace getVariable "BIS_DisplayInterrupt_isOptionsExpanded") then { //move down - background, title, player's name, play, editor, profile, options //Title background diff --git a/addons/ui/fnc_initDisplayPassword.sqf b/addons/ui/fnc_initDisplayPassword.sqf index 854a32dc3e..8f0bae293d 100644 --- a/addons/ui/fnc_initDisplayPassword.sqf +++ b/addons/ui/fnc_initDisplayPassword.sqf @@ -5,13 +5,13 @@ if (profileNamespace getVariable [QGVAR(StorePasswords), 1] < 1) exitWith {}; params ["_display"]; private _ctrlConfirm = _display displayCtrl IDC_OK; private _ctrlPassword = _display displayCtrl IDC_PASSWORD; -private _ctrlServerList = (uinamespace getVariable "RscDisplayMultiplayer") displayCtrl IDC_MULTI_SESSIONS; +private _ctrlServerList = (uiNamespace getVariable "RscDisplayMultiplayer") displayCtrl IDC_MULTI_SESSIONS; _ctrlConfirm ctrlAddEventHandler ["ButtonClick", { params ["_ctrlConfirm"]; private _display = ctrlParent _ctrlConfirm; private _ctrlPassword = _display displayCtrl IDC_PASSWORD; - private _ctrlServerList = (uinamespace getVariable "RscDisplayMultiplayer") displayCtrl IDC_MULTI_SESSIONS; + private _ctrlServerList = (uiNamespace getVariable "RscDisplayMultiplayer") displayCtrl IDC_MULTI_SESSIONS; private _server = _ctrlServerList lbData lbCurSel _ctrlServerList; private _password = ctrlText _ctrlPassword; diff --git a/addons/ui/fnc_initDisplayRemoteMissions.sqf b/addons/ui/fnc_initDisplayRemoteMissions.sqf index 7e1951c325..06a1eeb299 100644 --- a/addons/ui/fnc_initDisplayRemoteMissions.sqf +++ b/addons/ui/fnc_initDisplayRemoteMissions.sqf @@ -31,7 +31,7 @@ private _worldNames = createHashMap; private _worldName = configName _x; private _description = getText (configFile >> "CfgWorlds" >> _worldName >> "description"); _worldNames set [_description, _worldname]; -} forEach (configProperties [configfile >> "CfgWorldList", "isClass _x"]); +} forEach (configProperties [configFile >> "CfgWorldList", "isClass _x"]); for "_index" from 0 to ((lbSize _ctrlMaps) - 1) do { private _description = _ctrlMaps lbText _index; private _worldName = _worldNames getOrDefault [_description, ""]; diff --git a/addons/ui/fnc_notify.sqf b/addons/ui/fnc_notify.sqf index e66e3a3a01..0dc44f0408 100644 --- a/addons/ui/fnc_notify.sqf +++ b/addons/ui/fnc_notify.sqf @@ -148,10 +148,10 @@ private _fnc_processQueue = { private _right = _left + _width; private _bottom = _top + _height; - private _leftEdge = safezoneX; - private _rightEdge = safezoneW + safezoneX; - private _topEdge = safezoneY; - private _bottomEdge = safezoneH + safezoneY; + private _leftEdge = safeZoneX; + private _rightEdge = safeZoneW + safeZoneX; + private _topEdge = safeZoneY; + private _bottomEdge = safeZoneH + safeZoneY; if (_right > _rightEdge) then { _left = _left - (_right - _rightEdge); diff --git a/addons/ui/fnc_openItemContextMenu.sqf b/addons/ui/fnc_openItemContextMenu.sqf index 1fb91c8620..c99cdf3053 100644 --- a/addons/ui/fnc_openItemContextMenu.sqf +++ b/addons/ui/fnc_openItemContextMenu.sqf @@ -48,7 +48,7 @@ if (_options isEqualTo []) exitWith {}; // ctrlSetBackgroundColor command does not seem to work for RscListBox. private _list = _display ctrlCreate [QGVAR(ItemContextMenu), -1]; -private _font = getText (configfile >> QGVAR(ItemContextMenu) >> "font"); +private _font = getText (configFile >> QGVAR(ItemContextMenu) >> "font"); private _fontSize = getNumber (configFile >> ctrlClassName _list >> "sizeEx"); private _longestName = ""; diff --git a/addons/ui/script_component.hpp b/addons/ui/script_component.hpp index 431bfc06a5..6722d4f4a7 100644 --- a/addons/ui/script_component.hpp +++ b/addons/ui/script_component.hpp @@ -59,8 +59,8 @@ #define SEPARATORS "@" // Notify -#define NOTIFY_DEFAULT_X (safezoneX + safezoneW - 13 * GUI_GRID_W) -#define NOTIFY_DEFAULT_Y (safezoneY + 6 * GUI_GRID_H) +#define NOTIFY_DEFAULT_X (safeZoneX + safeZoneW - 13 * GUI_GRID_W) +#define NOTIFY_DEFAULT_Y (safeZoneY + 6 * GUI_GRID_H) #define NOTIFY_MIN_WIDTH (12 * GUI_GRID_W) #define NOTIFY_MIN_HEIGHT (3 * GUI_GRID_H) diff --git a/include/a3/functions_f/debug/fn_isDebugConsoleAllowed.sqf b/include/a3/functions_f/debug/fn_isDebugConsoleAllowed.sqf index 95d8833225..e668085e1a 100644 --- a/include/a3/functions_f/debug/fn_isDebugConsoleAllowed.sqf +++ b/include/a3/functions_f/debug/fn_isDebugConsoleAllowed.sqf @@ -1,5 +1,5 @@ /* - Author: + Author: Killzone_Kid Description: @@ -19,7 +19,7 @@ if (is3DEN || is3DENMultiplayer) exitWith {true}; // allowed in 3DEN or 3DEN tes // == SP MODE == if (!isMultiplayer) exitWith -{ +{ allDisplays find findDisplay 313 in [0, 1] // 3DEN preview || {allDisplays find findDisplay 26 in [0, 1]} // 2DEN @@ -43,23 +43,23 @@ private _fnc_getConfigValue = }; private _enableDebugConsole = call -{ +{ // --- mission param (0 - disabled, 1 - enabled for admin) - private _chk = ["DebugConsole", nil] call (missionNamespace getVariable "BIS_fnc_getParamValue"); + private _chk = ["DebugConsole", nil] call (missionNamespace getVariable "BIS_fnc_getParamValue"); if (!isNil "_chk") exitWith {_chk}; - + // --- mission config (0 - disabled, 1 - enabled for admin, 2 - enabled for anyone, [...] - enabled for admin and whitelist) - private _cfg = missionConfigFile >> "enableDebugConsole"; + private _cfg = missionConfigFile >> "enableDebugConsole"; if (!isNull _cfg) exitWith {_cfg call _fnc_getConfigValue}; - + // --- mission attribute (1 - enabled for admin, 2 - enabled for anyone) - _chk = getMissionConfigValue ["enableDebugConsole", 0]; + _chk = getMissionConfigValue ["enableDebugConsole", 0]; if !(_chk isEqualTo 0) exitWith {_chk}; - + // --- mod config (0 - disabled, 1 - enabled for admin, 2 - enabled for anyone, [...] - enabled for admin and whitelist) - _cfg = configFile >> "enableDebugConsole"; + _cfg = configFile >> "enableDebugConsole"; if (!isNull _cfg) exitWith {_cfg call _fnc_getConfigValue}; - + //--- disabled 0 }; @@ -78,8 +78,8 @@ if !(_enableDebugConsole isEqualTo 1) exitWith {false}; // only admin or whiteli // --- Client check if ( - hasInterface - && + hasInterface + && isUIContext && { @@ -94,7 +94,7 @@ if ( && { getPlayerUID player in _whitelist // whitelisted caller - } + } } } ) @@ -102,26 +102,26 @@ exitWith {true}; // --- Server check if ( - isServer - && + isServer + && isRemoteExecuted && { - remoteExecutedOwner isEqualto 2 // server host + remoteExecutedOwner isEqualTo 2 // server host || { admin remoteExecutedOwner isEqualTo 2 // logged in admin } || - { + { !(_whitelist isEqualTo []) // non-empty whitelist check && { getPlayerUID (allPlayers select {owner _x isEqualTo remoteExecutedOwner} param [0, objNull]) in _whitelist // whitelisted caller } - } + } } ) exitWith {true}; -false \ No newline at end of file +false diff --git a/include/a3/functions_f/gui/fn_initDisplay.sqf b/include/a3/functions_f/gui/fn_initDisplay.sqf index b552313c7d..1b5eb9969e 100644 --- a/include/a3/functions_f/gui/fn_initDisplay.sqf +++ b/include/a3/functions_f/gui/fn_initDisplay.sqf @@ -1,5 +1,5 @@ /* - Author: + Author: Karel Moricky, improved by Killzone_Kid Description: @@ -30,26 +30,26 @@ if (_this isEqualTo []) exitWith { { if (getNumber (_x >> "scriptIsInternal") isEqualTo 0) then //--- Ignore internal scripts, they're recompiled first time they're opened - { + { _scriptName = getText (_x >> "scriptName"); _scriptPath = getText (_x >> "scriptPath"); - - if (_scriptName isEqualTo "" || _scriptPath isEqualTo "") exitWith + + if (_scriptName isEqualTo "" || _scriptPath isEqualTo "") exitWith { [ - 'Undefined param(s) [scriptPath: "%2", scriptName: "%3"] while trying to init display "%1"', - configName _x, - _scriptPath, + 'Undefined param(s) [scriptPath: "%2", scriptName: "%3"] while trying to init display "%1"', + configName _x, + _scriptPath, _scriptName - ] + ] call BIS_fnc_logFormat; }; - + _script = _scriptName + "_script"; - + if (uiNamespace getVariable [_script, 0] isEqualType {}) exitWith {}; //--- already compiled - - uiNamespace setVariable + + uiNamespace setVariable [ _script, compileScript [ @@ -59,9 +59,9 @@ if (_this isEqualTo []) exitWith ] ]; }; - } + } forEach ("isText (_x >> 'scriptPath')" configClasses _x); - } + } forEach [ configFile, @@ -76,7 +76,7 @@ if (_this isEqualTo []) exitWith //--- Register/unregister display with uiNamespace do { - params + params [ ["_mode", "", [""]], ["_params", []], @@ -89,50 +89,50 @@ with uiNamespace do if (isNull _display) exitWith {nil}; if (_register isEqualType true) then {_register = parseNumber _register}; - if (_register > 0) then + if (_register > 0) then { _varDisplays = _path + "_displays"; _displays = (uiNamespace getVariable [_varDisplays, []]) - [displayNull]; - if (_mode == "onLoad") exitWith + if (_mode == "onLoad") exitWith { //--- Register current display _display setVariable [CONFIG_CLASS_VAR, _class]; uiNamespace setVariable [_class, _display]; - + _displays pushBackUnique _display; uiNamespace setVariable [_varDisplays, _displays]; - - if !(uiNamespace getVariable [INIT_GAME_VAR, false]) then + + if !(uiNamespace getVariable [INIT_GAME_VAR, false]) then { - //--- tell loading screen it can stop using ARMA 3 logo which is shown only before main menu + //--- tell loading screen it can stop using ARMA 3 logo which is shown only before main menu //--- and start using the classic terrain picture uiNamespace setVariable [INIT_GAME_VAR, _path == "GUI" && {ctrlIdd _x >= 0} count _displays > 1]; }; - + [missionNamespace, "OnDisplayRegistered", [_display, _class]] call BIS_fnc_callScriptedEventHandler; }; - - if (_mode == "onUnload") exitWith + + if (_mode == "onUnload") exitWith { //--- Unregister current display _displays = _displays - [_display]; uiNamespace setVariable [_varDisplays, _displays]; - + [missionNamespace, "OnDisplayUnregistered", [_display, _class]] call BIS_fnc_callScriptedEventHandler; }; - + }; - + //--- Call script in public version - if (!cheatsEnabled) exitWith + if (!cheatsEnabled) exitWith { [_mode, _params, _class] call (uiNamespace getVariable (_class + "_script")); nil }; //--- Recompile in the internal version - uinamespace setvariable + uiNamespace setvariable [ _class + "_script", compileScript [ @@ -141,11 +141,11 @@ with uiNamespace do format ["scriptName '%1'; _fnc_scriptName = '%1'; ", _class] // prefix ] ]; - + //--- Call script in internal version - if !(uiNamespace getVariable ["BIS_disableUIscripts", false]) then + if !(uiNamespace getVariable ["BIS_disableUIscripts", false]) then { [_mode, _params, _class] call (uiNamespace getVariable (_class + "_script")); nil }; -}; \ No newline at end of file +}; diff --git a/include/a3/functions_f/misc/fn_endLoadingScreen.sqf b/include/a3/functions_f/misc/fn_endLoadingScreen.sqf index 52c88dd1c2..4da6f6ecc2 100644 --- a/include/a3/functions_f/misc/fn_endLoadingScreen.sqf +++ b/include/a3/functions_f/misc/fn_endLoadingScreen.sqf @@ -11,11 +11,11 @@ BOOL - true when unregistered */ -with uinamespace do { +with uiNamespace do { private ["_id","_ids"]; _id = _this param [0,"",[""]]; - _ids = missionnamespace getvariable ["BIS_fnc_startLoadingScreen_ids",[]]; + _ids = missionnamespace getVariable ["BIS_fnc_startLoadingScreen_ids",[]]; if (_id in _ids) then { _ids = _ids - [_id]; @@ -30,4 +30,4 @@ with uinamespace do { ["Loading screen '%1' did not start yet.",_id] call bis_fnc_error; false }; -}; \ No newline at end of file +}; diff --git a/include/a3/functions_f/misc/fn_startLoadingScreen.sqf b/include/a3/functions_f/misc/fn_startLoadingScreen.sqf index a8fe080670..ba637c8b94 100644 --- a/include/a3/functions_f/misc/fn_startLoadingScreen.sqf +++ b/include/a3/functions_f/misc/fn_startLoadingScreen.sqf @@ -12,19 +12,19 @@ BOOL - true when registered */ disableserialization; -with uinamespace do { +with uiNamespace do { private ["_id","_rsc","_ids"]; _id = _this param [0,"",[""]]; _text = _this param [1,"",[""]]; _rsc = _this param [2,"",[""]]; - _ids = missionnamespace getvariable ["BIS_fnc_startLoadingScreen_ids",[]]; + _ids = missionnamespace getVariable ["BIS_fnc_startLoadingScreen_ids",[]]; if !(_id in _ids) then { //--- Array has to be adjusted before loading screen starts, otherwise the rest of the script can be delayed _ids set [count _ids,_id]; missionnamespace setvariable ["BIS_fnc_startLoadingScreen_ids",_ids]; startloadingscreen [_text,_rsc]; - progressloadingscreen (uinamespace getvariable ["BIS_fnc_progressloadingscreen_progress",0]); + progressloadingscreen (uiNamespace getVariable ["BIS_fnc_progressloadingscreen_progress",0]); //["Start '%1' loading screen for %2",_id,profilename] call bis_fnc_logFormat; true } else {