Skip to content

Commit

Permalink
change toLower to toLowerANSI where applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
jokoho48 committed Aug 25, 2024
1 parent 667ea5e commit 7f6c653
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion addons/Streamator/Spectator/fn_firedEH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (GVAR(OverlayBulletTracer)) then {
if (isNull _projectile) then {
_projectile = (getPos _unit) nearestObject _ammo;
};
if (toLower _weapon in ["put", "throw"]) then { // Handle Thrown Grenate
if (toLowerANSI _weapon in ["put", "throw"]) then { // Handle Thrown Grenate
GVAR(ThrownTracked) pushBack [_projectile, time + 10];
};
private _color = +(GVAR(SideColorsArray) getOrDefault [side (group _unit), [0.4, 0, 0.5, 1]]);
Expand Down
6 changes: 3 additions & 3 deletions addons/Streamator/Spectator/fn_getUnitType.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ if (_isEngineer) exitWith {
//"\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\repair_ca.paa";
["\A3\ui_f\data\gui\cfg\respawnroles\support_ca.paa", 1];
};
if ((toLower (getText(configFile >> "CfgWeapons" >> (secondaryWeapon _unit) >> "UIPicture")) == "\a3\weapons_f\data\ui\icon_at_ca.paa")) exitWith {
if ((toLowerANSI (getText(configFile >> "CfgWeapons" >> (secondaryWeapon _unit) >> "UIPicture")) == "\a3\weapons_f\data\ui\icon_at_ca.paa")) exitWith {
//"\a3\ui_f\data\igui\cfg\weaponicons\at_ca.paa";
["\A3\ui_f\data\gui\rsc\rscdisplayarsenal\secondaryweapon_ca.paa", 1.3];
};

private _primaryWeapon = toLower primaryWeapon _unit;
private _primaryWeapon = toLowerANSI primaryWeapon _unit;
if ("srifle" in _primaryWeapon) exitWith {
//"\a3\ui_f\data\igui\cfg\weaponicons\srifle_ca.paa";
["\A3\ui_f\data\gui\cfg\respawnroles\recon_ca.paa", 1];
Expand All @@ -88,7 +88,7 @@ if ("gl" in _primaryWeapon) exitWith {
["\A3\ui_f_curator\data\rsccommon\rscattributeinventory\filter_6_ca.paa", 1];
};

if ((toLower (getText (configFile >> "CfgWeapons" >> (primaryWeapon _unit) >> "UIPicture")) == "\a3\weapons_f\data\ui\icon_mg_ca.paa")) exitWith {
if ((toLowerANSI (getText (configFile >> "CfgWeapons" >> (primaryWeapon _unit) >> "UIPicture")) == "\a3\weapons_f\data\ui\icon_mg_ca.paa")) exitWith {
//"\a3\ui_f\data\igui\cfg\weaponicons\mg_ca.paa";
["\A3\ui_f\data\gui\cfg\respawnroles\assault_ca.paa", 1];
};
Expand Down
10 changes: 5 additions & 5 deletions addons/Streamator/UnitTracker/fn_updateIcons.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ private _vehicles = (vehicles select { _x call FUNC(isValidVehicle) });
if (_units isNotEqualTo []) then {
{
if (isNull objectParent _x) then { // Infantry
private _iconId = toLower format [QGVAR(IconId_Player_%1_%2), _x, (group _x)];
private _iconId = toLowerANSI format [QGVAR(IconId_Player_%1_%2), _x, (group _x)];
if !(_iconId in GVAR(processedIcons)) then {
GVAR(processedIcons) pushBack _iconId;
// DUMP("UNIT ICON ADDED: " + _iconId);
[_x, _iconId] call FUNC(addUnitToTracker);
};

if (alive _x && { leader _x == _x }) then {
_iconId = toLower format [QGVAR(IconId_Group_%1_%2), group _x, _x];
_iconId = toLowerANSI format [QGVAR(IconId_Group_%1_%2), group _x, _x];
if !(_iconId in GVAR(processedIcons)) then {
GVAR(processedIcons) pushBack _iconId;
// DUMP("GROUP ICON ADDED: " + _iconId);
Expand All @@ -52,7 +52,7 @@ if (_units isNotEqualTo []) then {
private _inGroup = {
if (leader _x == _x) then {
_nbrGroups = _nbrGroups + 1;
private _iconId = toLower format [QGVAR(IconId_Group_%1_%2_%3), group _x, _vehicle, _nbrGroups];
private _iconId = toLowerANSI format [QGVAR(IconId_Group_%1_%2_%3), group _x, _vehicle, _nbrGroups];
if !(_iconId in GVAR(processedIcons)) then {
GVAR(processedIcons) pushBack _iconId;
// DUMP("GROUP ICON ADDED: " + _iconId);
Expand All @@ -63,7 +63,7 @@ if (_units isNotEqualTo []) then {
} count (crew _vehicle);
_inGroup = _inGroup > 0;
if (!isNull _vehicle) then {
private _iconId = toLower format [QGVAR(IconId_Vehicle_%1), _vehicle];
private _iconId = toLowerANSI format [QGVAR(IconId_Vehicle_%1), _vehicle];
if !(_iconId in GVAR(processedIcons)) then {
GVAR(processedIcons) pushBack _iconId;
// DUMP("VEHICLE ADDED: " + _iconId);
Expand All @@ -76,7 +76,7 @@ if (_units isNotEqualTo []) then {

if (_vehicles isNotEqualTo []) then {
{
private _iconId = toLower format [QGVAR(IconId_Vehicle_%1), _x];
private _iconId = toLowerANSI format [QGVAR(IconId_Vehicle_%1), _x];
if (
!(_iconId in GVAR(processedIcons))
&& (locked _x) <= 1
Expand Down

0 comments on commit 7f6c653

Please sign in to comment.