From 557aff9c13c4644f32e7d57af5998899ea169ab5 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Sun, 25 Aug 2024 14:24:49 +0200 Subject: [PATCH 1/2] change toLower to toLowerANSI --- addons/main/XEH_postInit.sqf | 2 +- addons/main/functions/fnc_doAnimation.sqf | 2 +- addons/main/functions/fnc_doCallout.sqf | 2 +- addons/main/functions/fnc_getShareInformationParams.sqf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/main/XEH_postInit.sqf b/addons/main/XEH_postInit.sqf index 4da87308..5474f659 100644 --- a/addons/main/XEH_postInit.sqf +++ b/addons/main/XEH_postInit.sqf @@ -11,7 +11,7 @@ GVAR(CalloutCacheNamespace) = call CBA_fnc_createNamespace; if !(".p3d" in _string) then { _string = _string + ".p3d"; }; - GVAR(blockSuppressionModelCache) setVariable [toLower _string, true]; + GVAR(blockSuppressionModelCache) setVariable [toLowerANSI _string, true]; }; } forEach ("private _name = configName _x; _name isKindof 'building' || {_name isKindOf 'Rocks_base_F'}" configClasses (configFile >> "CfgVehicles")); diff --git a/addons/main/functions/fnc_doAnimation.sqf b/addons/main/functions/fnc_doAnimation.sqf index 956ffc7e..415a30d0 100644 --- a/addons/main/functions/fnc_doAnimation.sqf +++ b/addons/main/functions/fnc_doAnimation.sqf @@ -30,7 +30,7 @@ params [ // switchMove "" no longer works in dev 1.37 if (_animation == "") then { - _animation = toLower (animationState _unit); + _animation = toLowerANSI (animationState _unit); // stances are broken for some Animations private _stance = switch (_animation select [4, 4]) do { diff --git a/addons/main/functions/fnc_doCallout.sqf b/addons/main/functions/fnc_doCallout.sqf index 6f86d512..e778d055 100644 --- a/addons/main/functions/fnc_doCallout.sqf +++ b/addons/main/functions/fnc_doCallout.sqf @@ -40,7 +40,7 @@ if (_time >= time) exitWith { private _speaker = speaker _unit; if (toUpper(_speaker) in ["", "ACE_NOVOICE"]) exitWith {}; // Early Exit if Unit is "Mute" -switch (toLower(_callout)) do { +switch (toLowerANSI(_callout)) do { case ("contact"): { _callout = selectRandom ["ContactE_1", "ContactE_2", "ContactE_3", "Danger"]; }; diff --git a/addons/main/functions/fnc_getShareInformationParams.sqf b/addons/main/functions/fnc_getShareInformationParams.sqf index 0acd584d..5b60bf30 100644 --- a/addons/main/functions/fnc_getShareInformationParams.sqf +++ b/addons/main/functions/fnc_getShareInformationParams.sqf @@ -40,7 +40,7 @@ private _units = units _unit select { private _index = _units findIf { _x getVariable [QEGVAR(danger,dangerRadio), false] //|| {(!isNull objectParent _x && {_x distance2D _unit < 70})} - || {"b_radiobag_01_" in (toLower backpack _x)} + || {"b_radiobag_01_" in (toLowerANSI backpack _x)} || {(getNumber (configFile >> "CfgVehicles" >> (backpack _x) >> "tf_hasLRradio")) isEqualTo 1} }; _radio = _index isNotEqualTo -1; From e7bcd80bd26491811cdf4ad90eb3f7a3aab8ece7 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Sun, 25 Aug 2024 16:03:01 +0200 Subject: [PATCH 2/2] also change toUpper toUpperANSI --- addons/main/functions/VehicleAction/fnc_doSelectWarhead.sqf | 4 ++-- addons/main/functions/fnc_doCallout.sqf | 2 +- addons/main/functions/fnc_showDialog.sqf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/main/functions/VehicleAction/fnc_doSelectWarhead.sqf b/addons/main/functions/VehicleAction/fnc_doSelectWarhead.sqf index d9eee778..b41e4844 100644 --- a/addons/main/functions/VehicleAction/fnc_doSelectWarhead.sqf +++ b/addons/main/functions/VehicleAction/fnc_doSelectWarhead.sqf @@ -47,7 +47,7 @@ if (_switchMuzzle) then { private _muzzles = getArray (configFile >> "CfgWeapons" >> _turret >> "muzzles"); // first pass, try to find a muzzle that has the same name - private _index = _muzzles findIf {(toUpper _x) in _warheadTypes}; + private _index = _muzzles findIf {(toUpperANSI _x) in _warheadTypes}; if (_index > -1 && { // found muzzle with same name // one of the mags that can be loaded into that muzzle is in available mags ((getArray (configFile >> "CfgWeapons" >> _turret >> (_muzzles select _index) >> "magazines")) arrayIntersect _availableMags) isNotEqualTo [] @@ -74,7 +74,7 @@ if (_muzzle isEqualTo "") then { { private _ammo = getText (configFile >> "CfgMagazines" >> _x >> "ammo"); if (_ammo isEqualTo "") then {continue}; - if ((toUpper (getText (configFile >> "CfgAmmo" >> _ammo >> "warheadName"))) in _warheadTypes) then { + if ((toUpperANSI (getText (configFile >> "CfgAmmo" >> _ammo >> "warheadName"))) in _warheadTypes) then { _foundMag = _x; break; }; diff --git a/addons/main/functions/fnc_doCallout.sqf b/addons/main/functions/fnc_doCallout.sqf index e778d055..830a5553 100644 --- a/addons/main/functions/fnc_doCallout.sqf +++ b/addons/main/functions/fnc_doCallout.sqf @@ -38,7 +38,7 @@ if (_time >= time) exitWith { }; private _speaker = speaker _unit; -if (toUpper(_speaker) in ["", "ACE_NOVOICE"]) exitWith {}; // Early Exit if Unit is "Mute" +if (toUpperANSI(_speaker) in ["", "ACE_NOVOICE"]) exitWith {}; // Early Exit if Unit is "Mute" switch (toLowerANSI(_callout)) do { case ("contact"): { diff --git a/addons/main/functions/fnc_showDialog.sqf b/addons/main/functions/fnc_showDialog.sqf index a0d81820..c78e8100 100644 --- a/addons/main/functions/fnc_showDialog.sqf +++ b/addons/main/functions/fnc_showDialog.sqf @@ -344,7 +344,7 @@ private _fnc_AddSideSelector = { private _controls = []; { - private _type = toUpper (_x select 1); + private _type = toUpperANSI (_x select 1); switch (_type) do { case ("BOOLEAN"); case ("BOOL"): {