Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General - Fix command casing #1687

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/accessory/fnc_addAttachmentCondition.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
4 changes: 2 additions & 2 deletions addons/accessory/fnc_switchAttachment.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -51,7 +51,7 @@ while {_testItem != ""} do {
} else {
configProperties [_cfgWeapons >> _testItem, "configName _x == 'MRT_SwitchItemPrevClass'", false];
};

if (_configs isEqualTo []) then {
_testItem = "";
} else {
Expand Down
2 changes: 1 addition & 1 deletion addons/accessory/fnc_switchableAttachments.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Author:

params ["_item"];

private _cfgWeapons = configfile >> "CfgWeapons";
private _cfgWeapons = configFile >> "CfgWeapons";
private _config = _cfgWeapons >> _item;

private _forward = [];
Expand Down
2 changes: 1 addition & 1 deletion addons/ai/fnc_addWaypoint.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion addons/ai/fnc_searchNearby.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand Down
6 changes: 3 additions & 3 deletions addons/ai/fnc_taskDefend.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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", []];

Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion addons/arrays/fnc_shuffle.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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))];
};
Expand Down
4 changes: 2 additions & 2 deletions addons/common/fnc_deleteEntity.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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];
Expand Down
4 changes: 2 additions & 2 deletions addons/common/fnc_execNextFrame.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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];
Expand Down
4 changes: 2 additions & 2 deletions addons/common/fnc_getTerrainProfile.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand All @@ -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]
4 changes: 2 additions & 2 deletions addons/common/fnc_isAlive.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion addons/common/fnc_turretDir.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion addons/common/fnc_weaponComponents.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
26 changes: 13 additions & 13 deletions addons/common/init_addMiscItemsToArsenal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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']}"]);
Expand All @@ -51,26 +51,26 @@ 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;
TRACE_2("",_virtualAll,_virtualCargo);
{
// 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)
Expand Down
10 changes: 5 additions & 5 deletions addons/common/init_perFrameHandler.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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) = [];
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions addons/common/test_macro_is_x.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -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");

Expand Down
16 changes: 8 additions & 8 deletions addons/diagnostic/fnc_initExtendedDebugConsole.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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
];
Expand All @@ -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
];
Expand Down
4 changes: 2 additions & 2 deletions addons/help/XEH_preStart.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand All @@ -58,7 +58,7 @@ _mods = _mods apply {
_name = _name call CBA_fnc_sanitizeHTML;
_name = format [" <font color='#cc9cbd'>%1 - %2</font>", _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;
Expand Down
2 changes: 1 addition & 1 deletion addons/keybinding/fnc_registerKeybind.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand Down
2 changes: 1 addition & 1 deletion addons/music/fnc_compileMusic.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
{
Expand Down
4 changes: 2 additions & 2 deletions addons/music/fnc_findMusic.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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 - [""];
Expand Down
2 changes: 1 addition & 1 deletion addons/music/fnc_playMusic.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Loading
Loading