mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
General - Replace toLower with toLowerANSI where applicable (#9790)
* General - Replace toLower with toLowerANSI where applicable * whoops Co-authored-by: PabstMirror <pabstmirror@gmail.com> * Update addons/repair/functions/fnc_setHitPointDamage.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/repair/dev/draw_showRepairInfo.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/tagging/XEH_preStart.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/vehicle_damage/functions/fnc_handleCookoff.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/tagging/XEH_preStart.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * comparment -> compartment * Update fnc_showHud.sqf * Update fnc_registerObjects.sqf * Update addons/common/functions/fnc_cbaSettings_settingChanged.sqf --------- Co-authored-by: PabstMirror <pabstmirror@gmail.com> Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
This commit is contained in:
parent
aa3917c299
commit
e06c6f7835
@ -17,9 +17,9 @@
|
||||
|
||||
params ["_magazineClassname"];
|
||||
|
||||
_magazineClassname = toLower _magazineClassname;
|
||||
_magazineClassname = toLowerANSI _magazineClassname;
|
||||
private _throwMuzzles = getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles");
|
||||
|
||||
_throwMuzzles = _throwMuzzles select {_magazineClassname in ((getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines")) apply {toLower _x})};
|
||||
_throwMuzzles = _throwMuzzles select {_magazineClassname in ((getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines")) apply {toLowerANSI _x})};
|
||||
|
||||
[_throwMuzzles select 0, ""] select (_throwMuzzles isEqualTo [])
|
||||
|
@ -23,7 +23,7 @@ TRACE_4("droneModifyWaypoint",_vehicle,_group,_type,_value);
|
||||
|
||||
private _index = (currentWaypoint _group) min count waypoints _group;
|
||||
private _waypoint = [_group, _index];
|
||||
switch (toLower _type) do {
|
||||
switch (toLowerANSI _type) do {
|
||||
case ("height"): {
|
||||
private _pos = waypointPosition _waypoint;
|
||||
_pos set [2, _value];
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
params ["_configCategory", "_className", "_ctrlPanel", ["_pictureEntryName", "picture", [""]], ["_configRoot", 0, [0]]];
|
||||
|
||||
private _skip = GVAR(favoritesOnly) && {!(_className in GVAR(currentItems))} && {!((toLower _className) in GVAR(favorites))};
|
||||
private _skip = GVAR(favoritesOnly) && {!(_className in GVAR(currentItems))} && {!((toLowerANSI _className) in GVAR(favorites))};
|
||||
if (_skip) then {
|
||||
switch (GVAR(currentLeftPanel)) do {
|
||||
case IDC_buttonPrimaryWeapon: {
|
||||
@ -58,7 +58,7 @@ _ctrlPanel lbSetPicture [_lbAdd, _itemPicture];
|
||||
_ctrlPanel lbSetPictureRight [_lbAdd, ["", _modPicture] select GVAR(enableModIcons)];
|
||||
_ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _className]];
|
||||
|
||||
if ((toLower _className) in GVAR(favorites)) then {
|
||||
if ((toLowerANSI _className) in GVAR(favorites)) then {
|
||||
_ctrlPanel lbSetColor [_lbAdd, FAVORITES_COLOR];
|
||||
_ctrlPanel lbSetSelectColor [_lbAdd, FAVORITES_COLOR];
|
||||
};
|
||||
|
@ -53,7 +53,7 @@ if (GVAR(favoritesOnly)) then {
|
||||
private _fnc_fillRightContainer = {
|
||||
params ["_configCategory", "_className", ["_isUnique", false, [false]], ["_unknownOrigin", false, [false]]];
|
||||
|
||||
if (GVAR(favoritesOnly) && {!(_className in _currentCargo)} && {!((toLower _className) in GVAR(favorites))}) exitWith {};
|
||||
if (GVAR(favoritesOnly) && {!(_className in _currentCargo)} && {!((toLowerANSI _className) in GVAR(favorites))}) exitWith {};
|
||||
|
||||
// If item is not in the arsenal, it must be unique
|
||||
if (!_isUnique && {!(_className in GVAR(virtualItemsFlat))}) then {
|
||||
@ -89,7 +89,7 @@ private _fnc_fillRightContainer = {
|
||||
_ctrlPanel lnbSetPicture [[_lbAdd, 0], _picture];
|
||||
_ctrlPanel lnbSetValue [[_lbAdd, 2], parseNumber _isUnique];
|
||||
_ctrlPanel lnbSetTooltip [[_lbAdd, 0], format ["%1\n%2", _displayName, _className]];
|
||||
if ((toLower _className) in GVAR(favorites)) then {
|
||||
if ((toLowerANSI _className) in GVAR(favorites)) then {
|
||||
_ctrlPanel lnbSetColor [[_lbAdd, 1], FAVORITES_COLOR];
|
||||
_ctrlPanel lnbSetColorRight [[_lbAdd, 1], FAVORITES_COLOR];
|
||||
};
|
||||
|
@ -27,9 +27,9 @@ private _favorited = false;
|
||||
// Favorites/blacklist will always be lowercase to handle configCase changes
|
||||
private _item = "";
|
||||
if (_isLnB) then {
|
||||
_item = toLower (_control lnbData [_curSel, 0]);
|
||||
_item = toLowerANSI (_control lnbData [_curSel, 0]);
|
||||
} else {
|
||||
_item = toLower (_control lbData _curSel);
|
||||
_item = toLowerANSI (_control lbData _curSel);
|
||||
};
|
||||
|
||||
if (_item in GVAR(favorites)) then {
|
||||
|
@ -31,7 +31,7 @@ private _tabToChange = [];
|
||||
_stringCount = count _currentID;
|
||||
|
||||
// Make sure to keep at least 1 sort per category, so make default sort not deletable
|
||||
if ("ace_alphabetically" in toLower (_currentID select [0, _stringCount - 3])) then {
|
||||
if ("ace_alphabetically" in toLowerANSI (_currentID select [0, _stringCount - 3])) then {
|
||||
continue;
|
||||
};
|
||||
|
||||
|
@ -17,7 +17,7 @@ params ["", "_config"];
|
||||
TRACE_1("statTextStatement_binoVisionMode",_config);
|
||||
|
||||
private _text = [];
|
||||
private _visionModes = getArray (_config >> "visionMode") apply {toLower _x};
|
||||
private _visionModes = getArray (_config >> "visionMode") apply {toLowerANSI _x};
|
||||
{
|
||||
if (_x in _visionModes) then {
|
||||
_text pushBack (localize ([LSTRING(VisionNormal), LSTRING(VisionNight), LSTRING(VisionThermal)] select _forEachIndex));
|
||||
|
@ -17,7 +17,7 @@ params ["", "_config"];
|
||||
TRACE_1("statTextStatement_scopeVisionMode",_config);
|
||||
|
||||
private _opticsModes = ("true" configClasses (_config >> "ItemInfo" >> "OpticsModes")) apply {
|
||||
private _visionMode = getArray (_x >> "visionMode") apply {toLower _x};
|
||||
private _visionMode = getArray (_x >> "visionMode") apply {toLowerANSI _x};
|
||||
[
|
||||
getNumber (_x >> "useModelOptics") == 1, // Is in optics
|
||||
_visionMode isEqualTo [], // Optional NVG
|
||||
|
@ -57,7 +57,7 @@ if (!_isChemlight) then {
|
||||
_unit addItem _itemName;
|
||||
};
|
||||
|
||||
if (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) then {
|
||||
if (toLowerANSI _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) then {
|
||||
// Hack for dealing with X_IR_Grenade effect not dissapearing on deleteVehicle
|
||||
detach _attachedObject;
|
||||
_attachedObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]);
|
||||
|
@ -361,7 +361,7 @@ addMissionEventHandler ["PlayerViewChanged", {
|
||||
private _position = [player] call FUNC(getUavControlPosition);
|
||||
private _seatAI = objNull;
|
||||
private _turret = [];
|
||||
switch (toLower _position) do {
|
||||
switch (toLowerANSI _position) do {
|
||||
case (""): {
|
||||
_UAV = objNull; // set to objNull if not actively controlling
|
||||
};
|
||||
|
@ -13,7 +13,7 @@ private _allPatches = "(configName _x) select [0,3] == 'ace'" configClasses (con
|
||||
// Get all units[]
|
||||
private _allUnits = [];
|
||||
{
|
||||
_allUnits append ((getArray (_x >> "units")) apply { toLower _x });
|
||||
_allUnits append ((getArray (_x >> "units")) apply { toLowerANSI _x });
|
||||
} forEach _allPatches;
|
||||
{
|
||||
private _class = configFile >> "CfgVehicles" >> _x;
|
||||
@ -31,7 +31,7 @@ private _allUnits = [];
|
||||
// Get all weapons[]
|
||||
private _allWeapons = [];
|
||||
{
|
||||
_allWeapons append ((getArray (_x >> "weapons")) apply { toLower _x });
|
||||
_allWeapons append ((getArray (_x >> "weapons")) apply { toLowerANSI _x });
|
||||
} forEach _allPatches;
|
||||
{
|
||||
private _class = configFile >> "CfgWeapons" >> _x;
|
||||
@ -50,7 +50,7 @@ private _allWeapons = [];
|
||||
private _vics = "(configName _x) select [0,3] == 'ace'" configClasses (configFile >> "CfgVehicles");
|
||||
{
|
||||
if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then {
|
||||
if (!((toLower configName _x) in _allUnits)) then {
|
||||
if (!((toLowerANSI configName _x) in _allUnits)) then {
|
||||
WARNING_2("Not in any units[] - %1 from %2",configName _x,configSourceMod _x);
|
||||
_testPass = false;
|
||||
};
|
||||
@ -60,9 +60,9 @@ private _vics = "(configName _x) select [0,3] == 'ace'" configClasses (configFil
|
||||
// Check if all public weapons are defined in a cfgPatch
|
||||
private _weapons = "(configName _x) select [0,3] == 'ace'" configClasses (configFile >> "CfgWeapons");
|
||||
{
|
||||
private _type = toLower configName _x;
|
||||
private _type = toLowerANSI configName _x;
|
||||
if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then {
|
||||
if (!((toLower configName _x) in _allWeapons)) then {
|
||||
if (!((toLowerANSI configName _x) in _allWeapons)) then {
|
||||
WARNING_2("Not in any weapons[] - %1 from %2",configName _x,configSourceMod _x);
|
||||
_testPass = false;
|
||||
};
|
||||
|
@ -14,7 +14,7 @@ private _vehicles = configProperties [configFile >> "CfgVehicles", "(isClass _x)
|
||||
private _glassesConfig = configFile >> "CfgGlasses" >> _name;
|
||||
if (((!isClass _weaponConfig) || {(getNumber (_weaponConfig >> "type")) in [1,2,4]}) && {!isClass _glassesConfig}) then {
|
||||
diag_log text format ["%1 -> TransportItems -> %2 = Bad", _vehType, _name];
|
||||
if ("ace" in toLower (_vehType + _name)) then { _testPass = false; };
|
||||
if ("ace" in toLowerANSI (_vehType + _name)) then { _testPass = false; };
|
||||
};
|
||||
};
|
||||
} forEach (configProperties [_x >> "TransportItems", "isClass _x", true]);
|
||||
@ -23,7 +23,7 @@ private _vehicles = configProperties [configFile >> "CfgVehicles", "(isClass _x)
|
||||
private _weaponConfig = configFile >> "CfgWeapons" >> _name;
|
||||
if ((!isClass _weaponConfig) || {!((getNumber (_weaponConfig >> "type")) in [1,2,4])}) then {
|
||||
diag_log text format ["%1 -> TransportWeapons -> %2 = Bad", _vehType, _name];
|
||||
if ("ace" in toLower (_vehType + _name)) then { _testPass = false; };
|
||||
if ("ace" in toLowerANSI (_vehType + _name)) then { _testPass = false; };
|
||||
};
|
||||
} forEach (configProperties [_x >> "TransportWeapons", "isClass _x", true]);
|
||||
{
|
||||
@ -31,7 +31,7 @@ private _vehicles = configProperties [configFile >> "CfgVehicles", "(isClass _x)
|
||||
private _magConfig = configFile >> "CfgMagazines" >> _name;
|
||||
if ((!isClass _magConfig)) then {
|
||||
diag_log text format ["%1 -> TransportMagazines -> %2 = Bad", _vehType, _name];
|
||||
if ("ace" in toLower (_vehType + _name)) then { _testPass = false; };
|
||||
if ("ace" in toLowerANSI (_vehType + _name)) then { _testPass = false; };
|
||||
};
|
||||
} forEach (configProperties [_x >> "TransportMagazines", "isClass _x", true]);
|
||||
{
|
||||
@ -39,7 +39,7 @@ private _vehicles = configProperties [configFile >> "CfgVehicles", "(isClass _x)
|
||||
private _vehConfig = configFile >> "CfgVehicles" >> _name;
|
||||
if ((!isClass _vehConfig)) then {
|
||||
diag_log text format ["%1 -> TransportBackpacks -> %2 = Bad", _vehType, _name];
|
||||
if ("ace" in toLower (_vehType + _name)) then { _testPass = false; };
|
||||
if ("ace" in toLowerANSI (_vehType + _name)) then { _testPass = false; };
|
||||
};
|
||||
} forEach (configProperties [_x >> "TransportBackpacks", "isClass _x", true]);
|
||||
} forEach _vehicles;
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
params ["_conditionName", "_conditionFunc"];
|
||||
|
||||
_conditionName = toLower _conditionName;
|
||||
_conditionName = toLowerANSI _conditionName;
|
||||
|
||||
private _conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]];
|
||||
_conditions params ["_conditionNames", "_conditionFuncs"];
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
params ["_type", "_code", "_id"];
|
||||
|
||||
_type = toLower _type;
|
||||
_type = toLowerANSI _type;
|
||||
|
||||
if !(_type in ["baseline", "multiplier"]) exitWith { ERROR_2("%1-%2 type unsupported",_type,_id); false };
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
params ["_unit", "_vehicle", "_position", ["_checkDistance", false], ["_index", -1]];
|
||||
|
||||
_position = toLower _position;
|
||||
_position = toLowerANSI _position;
|
||||
|
||||
// general
|
||||
if (!alive _vehicle || {locked _vehicle > 1}) exitWith {false};
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
params ["_unit", "_target", ["_exceptions", []]];
|
||||
|
||||
_exceptions = _exceptions apply {toLower _x};
|
||||
_exceptions = _exceptions apply {toLowerANSI _x};
|
||||
|
||||
private _owner = _target getVariable [QGVAR(owner), objNull];
|
||||
|
||||
|
@ -104,7 +104,7 @@ TRACE_1("Reading settings from missionConfigFile",_countOptions);
|
||||
for "_index" from 0 to (_countOptions - 1) do {
|
||||
private _optionEntry = _missionSettingsConfig select _index;
|
||||
private _settingName = configName _optionEntry;
|
||||
if ((toLower _settingName) in GVAR(cbaSettings_forcedSettings)) then {
|
||||
if ((toLowerANSI _settingName) in GVAR(cbaSettings_forcedSettings)) then {
|
||||
WARNING_1("Setting [%1] - Already Forced - ignoring missionConfig",_varName);
|
||||
} else {
|
||||
if ((isNil _settingName) && {(getNumber (_settingsConfig >> _settingName >> "movedToSQF")) == 0}) then {
|
||||
|
@ -44,7 +44,7 @@ private _settings = configProperties [configFile >> "ACE_Settings", "(isClass _x
|
||||
|
||||
private _cbaIsGlobal = (!_isClientSettable) || _isForced;
|
||||
private _warnIfChangedMidMission = _cbaIsGlobal && {(getNumber (_config >> "canBeChanged")) == 0};
|
||||
if (_isForced) then {GVAR(cbaSettings_forcedSettings) pushBack (toLower _varName);};
|
||||
if (_isForced) then {GVAR(cbaSettings_forcedSettings) pushBack (toLowerANSI _varName);};
|
||||
|
||||
// Basic handling of setting types CBA doesn't support:
|
||||
if (_typeName == "ARRAY") exitWith {
|
||||
|
@ -34,7 +34,7 @@ private _category = getText (_config >> "category");
|
||||
|
||||
private _cbaIsGlobal = (!_isClientSettable) || _isForced;
|
||||
private _warnIfChangedMidMission = _cbaIsGlobal && {(getNumber (_config >> "canBeChanged")) == 0};
|
||||
if (_isForced) then {GVAR(cbaSettings_forcedSettings) pushBack (toLower _varName);};
|
||||
if (_isForced) then {GVAR(cbaSettings_forcedSettings) pushBack (toLowerANSI _varName);};
|
||||
|
||||
// Basic handling of setting types CBA doesn't support:
|
||||
if (_typeName == "ARRAY") exitWith {
|
||||
@ -103,4 +103,3 @@ private _return = [_varName, _cbaSettingType, [_localizedName, _localizedDescrip
|
||||
TRACE_1("returned",_return);
|
||||
if ((isNil "_return") || {!_return}) then {ERROR_1("Setting [%1] - CBA Error",_varName);};
|
||||
_return
|
||||
|
||||
|
@ -40,7 +40,7 @@ if ([_cbaRequiredAr, _cbaVersionAr] call cba_versioning_fnc_version_compare) the
|
||||
};
|
||||
|
||||
//private _addons = activatedAddons; // broken with High-Command module, see #2134
|
||||
private _addons = (cba_common_addons select {(_x select [0,4]) == "ace_"}) apply {toLower _x};
|
||||
private _addons = (cba_common_addons select {(_x select [0,4]) == "ace_"}) apply {toLowerANSI _x};
|
||||
private _oldAddons = [];
|
||||
private _oldSources = [];
|
||||
private _oldCompats = [];
|
||||
@ -87,7 +87,7 @@ if (_oldCompats isNotEqualTo []) then {
|
||||
///////////////
|
||||
// check extensions
|
||||
///////////////
|
||||
private _platform = toLower (productVersion select 6);
|
||||
private _platform = toLowerANSI (productVersion select 6);
|
||||
if (!isServer && {_platform in ["linux", "osx"]}) then {
|
||||
// Linux and OSX client ports do not support extensions at all
|
||||
INFO("Operating system does not support extensions");
|
||||
|
@ -25,7 +25,7 @@ params ["_mode", ["_checkAll", false], ["_whitelist", "", [""]]];
|
||||
TRACE_3("params",_mode,_checkAll,_whitelist);
|
||||
|
||||
//lowercase and convert whiteList String into array of strings:
|
||||
_whitelist = toLower _whitelist;
|
||||
_whitelist = toLowerANSI _whitelist;
|
||||
_whitelist = _whitelist splitString "[,""']";
|
||||
TRACE_1("Array",_whitelist);
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
private _anim = toLower animationState _unit;
|
||||
private _anim = toLowerANSI animationState _unit;
|
||||
|
||||
// stance is broken for some animations.
|
||||
private _stance = stance _unit;
|
||||
|
@ -19,7 +19,7 @@
|
||||
params [["_vehicle", objNull, [objNull]], ["_weapon", "", [""]]];
|
||||
|
||||
// on foot
|
||||
if (gunner _vehicle == _vehicle && {_weapon in weapons _vehicle || {toLower _weapon in ["throw", "put"]}}) exitWith {gunner _vehicle};
|
||||
if (gunner _vehicle == _vehicle && {_weapon in weapons _vehicle || {toLowerANSI _weapon in ["throw", "put"]}}) exitWith {gunner _vehicle};
|
||||
|
||||
// inside vehicle
|
||||
private _gunner = objNull;
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
params ["_unit", "_vehicle", "_position", ["_index", -1]];
|
||||
|
||||
_position = toLower _position;
|
||||
_position = toLowerANSI _position;
|
||||
|
||||
// general
|
||||
if (!alive _vehicle || {locked _vehicle > 1}) exitWith {false};
|
||||
|
@ -67,7 +67,7 @@ switch (true) do {
|
||||
case (_type == TYPE_UNIFORM): {["item", "uniform"]};
|
||||
|
||||
case (_type == TYPE_BINOCULAR_AND_NVG): {
|
||||
switch (toLower _simulation) do {
|
||||
switch (toLowerANSI _simulation) do {
|
||||
case ("weapon"): {["weapon", "binocular"]};
|
||||
case ("binocular"): {["weapon", "binocular"]};
|
||||
case ("nvgoggles"): {["item", "nvgoggles"]};
|
||||
@ -78,7 +78,7 @@ switch (true) do {
|
||||
|
||||
case (_type == TYPE_WEAPON_VEHICLE): {["weapon", "vehicle"]};
|
||||
case (_type == TYPE_ITEM): {
|
||||
switch (toLower _simulation) do {
|
||||
switch (toLowerANSI _simulation) do {
|
||||
case ("itemmap"): {["item", "map"]};
|
||||
case ("itemgps"): {["item", "gps"]};
|
||||
case ("itemradio"): {["item", "radio"]};
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
params ["_map"];
|
||||
_map = toLower _map;
|
||||
_map = toLowerANSI _map;
|
||||
|
||||
// [latitude, altitude]
|
||||
|
||||
|
@ -43,8 +43,8 @@ private _stepY = 1e10;
|
||||
|
||||
private _letterGrid = false;
|
||||
|
||||
if (toLower _formatX find "a" != -1) then {_letterGrid = true};
|
||||
if (toLower _formatY find "a" != -1) then {_letterGrid = true};
|
||||
if (toLowerANSI _formatX find "a" != -1) then {_letterGrid = true};
|
||||
if (toLowerANSI _formatY find "a" != -1) then {_letterGrid = true};
|
||||
|
||||
if (_letterGrid) exitWith {
|
||||
WARNING_3("Map Grid Warning (%1) - Map uses letter grids [%2, %3]",worldName,_formatX,_formatY);
|
||||
|
@ -29,7 +29,7 @@ private _crew = [];
|
||||
};
|
||||
} else {
|
||||
// otherwise check if we search for that type. toLower, because fullCrew returns "driver" vs. "Turret".
|
||||
if (toLower (_x select 1) in _types) then {
|
||||
if (toLowerANSI (_x select 1) in _types) then {
|
||||
_crew pushBack (_x select 0);
|
||||
};
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ if (isNil "_cachedValue") then {
|
||||
private _vehicleIconValue = getText (configfile >> "CfgVehicleIcons" >> _vehicleValue);
|
||||
|
||||
if (_vehicleIconValue == "") then {
|
||||
if (_vehicleValue != "" && {((toLower _vehicleValue) find ".paa") > -1}) then {
|
||||
if (_vehicleValue != "" && {((toLowerANSI _vehicleValue) find ".paa") > -1}) then {
|
||||
_cachedValue = _vehicleValue;
|
||||
} else {
|
||||
_cachedValue = DEFAULT_TEXTURE;
|
||||
|
@ -35,7 +35,7 @@ ISNILS(_distance,_cfgDistance);
|
||||
_fileName = _fileName select [1];
|
||||
|
||||
// add file extension .wss as default
|
||||
if !(toLower (_fileName select [count _fileName - 4]) in [".wav", ".ogg", ".wss"]) then {
|
||||
if !(toLowerANSI (_fileName select [count _fileName - 4]) in [".wav", ".ogg", ".wss"]) then {
|
||||
ADD(_fileName,".wss");
|
||||
};
|
||||
TRACE_5("vars",_fileName,_posASL,_volume,_pitch,_distance);
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
params ["_conditionName"];
|
||||
|
||||
_conditionName = toLower _conditionName;
|
||||
_conditionName = toLowerANSI _conditionName;
|
||||
|
||||
private _conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]];
|
||||
|
||||
|
@ -30,7 +30,7 @@ private _bottomRightY = 1;
|
||||
|
||||
private _return = [];
|
||||
|
||||
switch (toLower _func) do {
|
||||
switch (toLowerANSI _func) do {
|
||||
case ("2d"): {
|
||||
_array params ["_pointX", "_z", "_pointY"];
|
||||
|
||||
|
@ -32,6 +32,6 @@ GVAR(statusEffect_sendJIP) pushBack _sendJIP;
|
||||
//We add reasons at any time, but more efficenet to add all common ones at one time during init
|
||||
if (isServer && {_commonReasonsArray isNotEqualTo []}) then {
|
||||
//Switch case to lower:
|
||||
_commonReasonsArray = _commonReasonsArray apply { toLower _x };
|
||||
_commonReasonsArray = _commonReasonsArray apply { toLowerANSI _x };
|
||||
missionNamespace setVariable [(format [QGVAR(statusEffects_%1), _name]), _commonReasonsArray, true];
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ if (isNull _object) exitWith {TRACE_1("null",_object);};
|
||||
[_object, true] call FUNC(statusEffect_resetVariables); //Check for mismatch, and set object ref
|
||||
|
||||
//check ID case and set globally if not already set:
|
||||
_ID = toLower _ID;
|
||||
_ID = toLowerANSI _ID;
|
||||
private _statusReasons = missionNamespace getVariable [(format [QGVAR(statusEffects_%1), _effectName]), []];
|
||||
private _statusIndex = _statusReasons find _ID;
|
||||
if (_statusIndex == -1) then {
|
||||
|
@ -5,7 +5,7 @@ private _aceWhitelist = missionNamespace getVariable ["ACE_Version_Whitelist", [
|
||||
private _files = CBA_common_addons select {
|
||||
(_x select [0,3] != "a3_") &&
|
||||
{_x select [0,4] != "ace_"} &&
|
||||
{!((toLower _x) in _aceWhitelist)}
|
||||
{!((toLowerANSI _x) in _aceWhitelist)}
|
||||
};
|
||||
|
||||
private _versions = [];
|
||||
|
@ -77,7 +77,7 @@ private _spawnProjectile = {
|
||||
};
|
||||
|
||||
private _speed = random (_speedOfAmmo / 10) max 1;
|
||||
_simType = toLower _simType;
|
||||
_simType = toLowerANSI _simType;
|
||||
switch (_simType) do {
|
||||
case ("shotbullet"): {
|
||||
[QGVAR(playCookoffSound), [_vehicle, _simType]] call CBA_fnc_globalEvent;
|
||||
|
@ -27,7 +27,7 @@ if (_vehicle getVariable [QGVAR(enable), GVAR(enable)] in [0, false]) exitWith {
|
||||
private _hitpoint = "#structural";
|
||||
|
||||
if (_hitIndex != -1) then {
|
||||
_hitpoint = toLower ((getAllHitPointsDamage _vehicle param [0, []]) select _hitIndex);
|
||||
_hitpoint = toLowerANSI ((getAllHitPointsDamage _vehicle param [0, []]) select _hitIndex);
|
||||
};
|
||||
|
||||
// get change in damage
|
||||
|
@ -38,14 +38,14 @@
|
||||
private _weaponDir = getDir _staticWeapon;
|
||||
|
||||
private _carryWeaponMag = "";
|
||||
private _carryWeaponMags = getArray (configFile >> "CfgWeapons" >> _carryWeaponClassname >> "magazines") apply {toLower _x};
|
||||
private _carryWeaponMags = getArray (configFile >> "CfgWeapons" >> _carryWeaponClassname >> "magazines") apply {toLowerANSI _x};
|
||||
LOG("remove ammo");
|
||||
{
|
||||
_x params ["_xMag", "", "_xAmmo"];
|
||||
if (_xAmmo == 0) then {continue};
|
||||
|
||||
private _carryMag = _xMag call FUNC(getCarryMagazine);
|
||||
if (_carryWeaponMag isEqualTo "" && {toLower _carryMag in _carryWeaponMags}) then {
|
||||
if (_carryWeaponMag isEqualTo "" && {toLowerANSI _carryMag in _carryWeaponMags}) then {
|
||||
TRACE_3("Adding mag to secondary weapon",_xMag,_xAmmo,_carryMag);
|
||||
_carryWeaponMag = _carryMag;
|
||||
DEC(_xAmmo);
|
||||
|
@ -74,7 +74,7 @@ GVAR(disarmTarget) = _target;
|
||||
private _rankPicture = _display displayCtrl 1203;
|
||||
|
||||
//Show rank and name (just like BIS's inventory)
|
||||
private _icon = format [DEFUALTPATH, toLower (rank _target)];
|
||||
private _icon = format [DEFUALTPATH, toLowerANSI (rank _target)];
|
||||
if (_icon isEqualTo DEFUALTPATH) then {_icon = ""};
|
||||
_rankPicture ctrlSetText _icon;
|
||||
_playerName ctrlSetText ([GVAR(disarmTarget), false, true] call EFUNC(common,getName));
|
||||
|
@ -48,10 +48,10 @@ private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurret
|
||||
} count _muzzles;
|
||||
|
||||
// Fix the `in` operator being case sensitive and BI fucking up the spelling of their own classnames
|
||||
private _weaponMagazinesCheck = _weaponMagazines apply {toLower _x};
|
||||
private _weaponMagazinesCheck = _weaponMagazines apply {toLowerANSI _x};
|
||||
|
||||
// Another BIS fix: ShotBullet simulation uses weapon initSpeed, others ignore it
|
||||
if (toLower _magazine in _weaponMagazinesCheck && {_bulletSimulation == "shotBullet"}) exitWith {
|
||||
if (toLowerANSI _magazine in _weaponMagazinesCheck && {_bulletSimulation == "shotBullet"}) exitWith {
|
||||
private _initSpeedCoef = getNumber(configFile >> "CfgWeapons" >> _weapon >> "initSpeed");
|
||||
|
||||
if (_initSpeedCoef < 0) then {
|
||||
|
@ -15,7 +15,7 @@ private _waterSourceOffsets = [
|
||||
// Fill water source arrays from CfgVehicles
|
||||
{
|
||||
private _split = (getText (_x >> "model")) splitString "\";
|
||||
private _string = toLower (_split param [((count _split) - 1), ""]);
|
||||
private _string = toLowerANSI (_split param [((count _split) - 1), ""]);
|
||||
|
||||
// Append extension if necessary
|
||||
if ((_string select [count _string - 4]) != ".p3d") then {
|
||||
|
@ -20,7 +20,7 @@ TRACE_1("handleChatCommand",_args);
|
||||
|
||||
_args = _args splitString " ";
|
||||
if (_args isEqualTo []) exitWith {ERROR("Bad command");};
|
||||
private _command = toLower (_args select 0);
|
||||
private _command = toLowerANSI (_args select 0);
|
||||
_args deleteAt 0;
|
||||
|
||||
switch (_command) do {
|
||||
|
@ -22,7 +22,7 @@ TRACE_1("parseSide",_side);
|
||||
|
||||
if (_side isEqualType sideUnknown) exitWith {_side};
|
||||
|
||||
private _char = toLower (_side select [0, 1]);
|
||||
private _char = toLowerANSI (_side select [0, 1]);
|
||||
|
||||
private _return = switch (_char) do {
|
||||
case ("b");
|
||||
|
@ -28,7 +28,7 @@ private _allMagsConfigs = configProperties [configFile >> "CfgMagazines", "isCla
|
||||
private _processedCfgAmmos = [];
|
||||
|
||||
{
|
||||
private _ammo = toLower getText (_x >> "ammo");
|
||||
private _ammo = toLowerANSI getText (_x >> "ammo");
|
||||
if (_ammo != "" && {!(_ammo in _processedCfgAmmos)}) then {
|
||||
_processedCfgAmmos pushBack _ammo;
|
||||
|
||||
|
@ -26,7 +26,7 @@ if (!alive _round) exitWith {
|
||||
if (_skip == 0) then {
|
||||
if ((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1}) then {
|
||||
// shotbullet, shotShell don't seem to explode when touching water, so don't create frags
|
||||
if ((surfaceIsWater _lastPos) && {(toLower getText (configFile >> "CfgAmmo" >> _shellType >> "simulation")) in ["shotbullet", "shotshell"]}) exitWith {};
|
||||
if ((surfaceIsWater _lastPos) && {(toLowerANSI getText (configFile >> "CfgAmmo" >> _shellType >> "simulation")) in ["shotbullet", "shotshell"]}) exitWith {};
|
||||
private _fuseDist = getNumber(configFile >> "CfgAmmo" >> _shellType >> "fuseDistance");
|
||||
private _isArmed = _firedPos vectorDistance _lastPos >= _fuseDist; // rounds explode at exactly fuseDistance, so check inclusive
|
||||
TRACE_2("",_fuseDist,_isArmed);
|
||||
|
@ -22,7 +22,7 @@ private _config = _weapon call CBA_fnc_getItemConfig;
|
||||
// definition of a machine gun by BIS_fnc_itemType
|
||||
private _cursor = getText (_config >> "cursor");
|
||||
|
||||
if (toLower _cursor in ["", "emptycursor"]) then {
|
||||
if (toLowerANSI _cursor in ["", "emptycursor"]) then {
|
||||
_cursor = getText (_config >> "cursorAim");
|
||||
};
|
||||
|
||||
|
@ -11,7 +11,7 @@ private _replaceTerrainClasses = QUOTE(
|
||||
|
||||
private _cacheReplaceTerrainModels = createHashMap;
|
||||
{
|
||||
private _model = toLower getText (_x >> "model");
|
||||
private _model = toLowerANSI getText (_x >> "model");
|
||||
if (_model select [0, 1] == "\") then {
|
||||
_model = _model select [1];
|
||||
};
|
||||
|
@ -17,7 +17,7 @@ DFUNC(replaceTerrainModelsAdd) = {
|
||||
if (_class isEqualTo "") then {
|
||||
private _configClasses = QUOTE(getNumber (_x >> 'scope') == 2 && {!(configName _x isKindOf 'AllVehicles')}) configClasses (configFile >> "CfgVehicles");
|
||||
{
|
||||
private _xmodel = toLower getText (_x >> "model");
|
||||
private _xmodel = toLowerANSI getText (_x >> "model");
|
||||
if (_xmodel select [0, 1] == "\") then {
|
||||
_xmodel = _xmodel select [1];
|
||||
};
|
||||
|
@ -33,7 +33,7 @@ if (typeOf _house == "") exitWith {[objNull, ""]};
|
||||
|
||||
_intersections = [_house, "GEOM"] intersect [_position0, _position1];
|
||||
|
||||
private _door = toLower (_intersections select 0 select 0);
|
||||
private _door = toLowerANSI (_intersections select 0 select 0);
|
||||
|
||||
if (isNil "_door") exitWith {[_house, ""]};
|
||||
|
||||
|
@ -26,8 +26,8 @@ private _lockedVariable = [];
|
||||
private _numberStrings = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
||||
|
||||
{
|
||||
private _animName = toLower _x;
|
||||
private _index = _animName find toLower _door;
|
||||
private _animName = toLowerANSI _x;
|
||||
private _index = _animName find toLowerANSI _door;
|
||||
|
||||
if (_index != -1 && {!(_animName select [_index + count _door, 1] in _numberStrings)}) then {
|
||||
if (((_animName find "disabled") != -1) || ((_animName find "locked") != -1)) then {
|
||||
|
@ -26,7 +26,7 @@ private _glassDoor = _door splitString "_";
|
||||
private _glassPos = (_house selectionPosition [(_glassDoor select 0) + "_" + (_glassDoor select 1) + "_effects", "Memory"]);
|
||||
// Calculate all animation names so we know what is there
|
||||
{
|
||||
private _animName = toLower _x;
|
||||
private _animName = toLowerANSI _x;
|
||||
if (((_animName find "door") != -1) && ((_animName find "locked") == -1) && ((_animName find "disabled") == -1) && ((_animName find "handle") == -1)) then {
|
||||
private _splitStr = _animName splitString "_";
|
||||
_doorParts pushBack ((_splitStr select 0) + "_" + (_splitStr select 1) + "_trigger");
|
||||
@ -64,4 +64,3 @@ private _lowestDistance = 0;
|
||||
if ((isNil "_door") || ((_door find "glass") != -1)) exitWith {};
|
||||
|
||||
_door
|
||||
|
||||
|
@ -71,7 +71,7 @@ if (_textMMB == "") then {
|
||||
// Only create extra key if both name and text are valid
|
||||
if (_keyName != "" && {_keyText != ""}) then {
|
||||
// Localize Ctrl, Shift, or Alt keys
|
||||
switch (toLower _keyName) do {
|
||||
switch (toLowerANSI _keyName) do {
|
||||
case "ctrl";
|
||||
case "control": {_keyName = format ["<%1>", toUpper localize "STR_dik_control"]};
|
||||
case "shift": {_keyName = format ["<%1>", toUpper localize "STR_dik_shift"]};
|
||||
|
@ -29,7 +29,7 @@ uiNamespace setVariable [QGVAR(backpackKeyCache), compileFinal createHashMapFrom
|
||||
};
|
||||
|
||||
// Listboxes store pictures as lowercase
|
||||
[format ["%1:%2", _displayName, toLower _picture], _x]
|
||||
[format ["%1:%2", _displayName, toLowerANSI _picture], _x]
|
||||
})];
|
||||
|
||||
// Generate list of grenades
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
params ["_fence"];
|
||||
|
||||
private _fenceModel = toLower ((getModelInfo _fence)#0);
|
||||
private _fenceModel = toLowerANSI ((getModelInfo _fence)#0);
|
||||
|
||||
// If fence cannot be replaced with destroyed model, just knock it over
|
||||
if !(_fenceModel in GVAR(replacements)) exitWith {
|
||||
|
@ -93,7 +93,7 @@ GVAR(vehicleLightColor) = [1,1,1,0];
|
||||
// Handle vehicles with toggleable interior lights:
|
||||
private _vehicleLightCondition = getText (_cfg >> QGVAR(vehicleLightCondition));
|
||||
if (_vehicleLightCondition == "") then {
|
||||
private _userAction = toLower getText (_cfg >> "UserActions" >> "ToggleLight" >> "statement");
|
||||
private _userAction = toLowerANSI getText (_cfg >> "UserActions" >> "ToggleLight" >> "statement");
|
||||
if (
|
||||
false // isClass (_cfg >> "compartmentsLights")
|
||||
|| {_userAction find "cabinlights_hide" > 0}
|
||||
|
@ -34,7 +34,7 @@ params [
|
||||
];
|
||||
TRACE_7("addDamageToUnit",_unit,_damageToAdd,_bodyPart,_typeOfDamage,_instigator,_damageSelectionArray,_overrideInvuln);
|
||||
|
||||
_bodyPart = toLower _bodyPart;
|
||||
_bodyPart = toLowerANSI _bodyPart;
|
||||
private _bodyPartIndex = ALL_BODY_PARTS find _bodyPart;
|
||||
if (_bodyPartIndex < 0) then { _bodyPartIndex = ALL_SELECTIONS find _bodyPart; }; // 2nd attempt with selection names ("hand_l", "hand_r", "leg_l", "leg_r")
|
||||
if (_bodyPartIndex < 0) exitWith {ERROR_1("addDamageToUnit - bad selection %1",_this); false};
|
||||
|
@ -41,7 +41,7 @@ private _bodyPartVisParams = [_unit, false, false, false, false]; // params arra
|
||||
// process wounds separately for each body part hit
|
||||
{ // forEach _allDamages
|
||||
_x params ["_damage", "_bodyPart"];
|
||||
_bodyPart = toLower _bodyPart;
|
||||
_bodyPart = toLowerANSI _bodyPart;
|
||||
|
||||
// silently ignore structural damage
|
||||
if (_bodyPart == "#structural") then {continue};
|
||||
|
@ -28,7 +28,7 @@ TRACE_3("damageBodyPart",_unit,_selection,_damage);
|
||||
|
||||
_damage = [0, DAMAGED_MIN_THRESHOLD] select _damage;
|
||||
|
||||
switch (toLower _selection) do {
|
||||
switch (toLowerANSI _selection) do {
|
||||
case ("head"): {
|
||||
_unit setHitPointDamage ["HitHead", _damage];
|
||||
};
|
||||
|
@ -102,7 +102,7 @@ GVAR(selfInteractionActions) = [];
|
||||
params ["_unit", "_allDamages", ""];
|
||||
if !(GVAR(peekMedicalOnHit) && {_unit == ACE_player}) exitWith {};
|
||||
|
||||
private _bodypart = toLower (_allDamages select 0 select 1);
|
||||
private _bodypart = toLowerANSI (_allDamages select 0 select 1);
|
||||
private _bodypartIndex = ALL_BODY_PARTS find _bodypart;
|
||||
|
||||
[ACE_player, _bodypartIndex] call FUNC(displayPatientInformation);
|
||||
|
@ -36,14 +36,14 @@ private _fnc_condition = {
|
||||
private _displayName = getText (_x >> "displayName");
|
||||
private _icon = getText (_x >> "icon");
|
||||
|
||||
private _allowedBodyParts = getArray (_x >> "allowedSelections") apply {toLower _x};
|
||||
private _allowedBodyParts = getArray (_x >> "allowedSelections") apply {toLowerANSI _x};
|
||||
if (_allowedBodyParts isEqualTo ["all"]) then {
|
||||
_allowedBodyParts = ALL_BODY_PARTS apply {toLower _x};
|
||||
_allowedBodyParts = ALL_BODY_PARTS apply {toLowerANSI _x};
|
||||
};
|
||||
|
||||
{
|
||||
private _bodyPart = _x;
|
||||
private _actionPath = _actionPaths select (ALL_BODY_PARTS find toLower _bodyPart);
|
||||
private _actionPath = _actionPaths select (ALL_BODY_PARTS find toLowerANSI _bodyPart);
|
||||
|
||||
private _action = [
|
||||
_actionName,
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
params ["_patient", "_bodyPart", "_bandage"];
|
||||
TRACE_3("bandageLocal",_patient,_bodyPart,_bandage);
|
||||
_bodyPart = toLower _bodyPart;
|
||||
_bodyPart = toLowerANSI _bodyPart;
|
||||
|
||||
private _openWounds = GET_OPEN_WOUNDS(_patient);
|
||||
private _woundsOnPart = _openWounds getOrDefault [_bodyPart, []];
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
params ["_medic", "_patient", "_bodyPart", "_bandage"];
|
||||
_bodyPart = toLower _bodyPart;
|
||||
_bodyPart = toLowerANSI _bodyPart;
|
||||
|
||||
// If patient is swimming, don't allow bandage actions.
|
||||
if (_patient call EFUNC(common,isSwimming)) exitWith {false};
|
||||
|
@ -19,6 +19,6 @@
|
||||
|
||||
params ["", "_patient", "_bodyPart"];
|
||||
|
||||
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
|
||||
private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart;
|
||||
|
||||
(GET_FRACTURES(_patient) select _partIndex) == 1
|
||||
|
@ -28,7 +28,7 @@ private _config = configFile >> QGVAR(actions) >> _classname;
|
||||
) && {
|
||||
_patient isKindOf "CAManBase"
|
||||
} && {
|
||||
private _selections = getArray (_config >> "allowedSelections") apply {toLower _x};
|
||||
private _selections = getArray (_config >> "allowedSelections") apply {toLowerANSI _x};
|
||||
"all" in _selections || {_bodyPart in _selections}
|
||||
} && {
|
||||
GET_FUNCTION(_condition,_config >> "condition");
|
||||
|
@ -27,7 +27,7 @@ params ["_medic", "_patient", "_bodyPart", "_classname"];
|
||||
if (vehicle _medic != _medic || {vehicle _patient != _patient}) exitWith {};
|
||||
|
||||
// Determine if treated body part is bleeding
|
||||
private _index = ALL_BODY_PARTS find toLower _bodyPart;
|
||||
private _index = ALL_BODY_PARTS find toLowerANSI _bodyPart;
|
||||
private _isBleeding = (GET_OPEN_WOUNDS(_patient) get _bodyPart) findIf {
|
||||
_x params ["", "_amountOf", "_bleeding"];
|
||||
_amountOf * _bleeding > 0
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
params ["_medic", "_patient", "_bodyPart", "_bandage"];
|
||||
|
||||
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
|
||||
private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart;
|
||||
if (_partIndex < 0) exitWith { ERROR_1("invalid partIndex - %1",_this); 0 };
|
||||
|
||||
private _targetWounds = [_patient, _bandage, _bodyPart] call FUNC(findMostEffectiveWounds);
|
||||
|
@ -18,6 +18,6 @@
|
||||
|
||||
params ["_unit", "_bodyPart"];
|
||||
|
||||
private _index = ALL_BODY_PARTS find toLower _bodyPart;
|
||||
private _index = ALL_BODY_PARTS find toLowerANSI _bodyPart;
|
||||
|
||||
_index >= 0 && {HAS_TOURNIQUET_APPLIED_ON(_unit,_index)}
|
||||
|
@ -23,7 +23,7 @@ params ["_patient", "_bodyPart", "_classname"];
|
||||
private _bloodVolume = GET_BLOOD_VOLUME(_patient);
|
||||
if (_bloodVolume >= DEFAULT_BLOOD_VOLUME) exitWith {};
|
||||
|
||||
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
|
||||
private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart;
|
||||
|
||||
// Get attributes for the used IV
|
||||
private _defaultConfig = configFile >> QUOTE(ADDON) >> "IV";
|
||||
|
@ -42,7 +42,7 @@ TRACE_1("Running treatmentMedicationLocal with Advanced configuration for",_pati
|
||||
|
||||
|
||||
// Handle tourniquet on body part blocking blood flow at injection site
|
||||
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
|
||||
private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart;
|
||||
|
||||
if (HAS_TOURNIQUET_APPLIED_ON(_patient,_partIndex)) exitWith {
|
||||
TRACE_1("unit has tourniquets blocking blood flow on injection site",_tourniquets);
|
||||
|
@ -20,7 +20,7 @@
|
||||
params ["_medic", "_patient", "_bodyPart"];
|
||||
TRACE_3("splintLocal",_medic,_patient,_bodyPart);
|
||||
|
||||
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
|
||||
private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart;
|
||||
|
||||
private _fractures = GET_FRACTURES(_patient);
|
||||
_fractures set [_partIndex, -1];
|
||||
|
@ -19,7 +19,7 @@
|
||||
params ["_patient", "_bodyPart"];
|
||||
TRACE_2("tourniquetLocal",_patient,_bodyPart);
|
||||
|
||||
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
|
||||
private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart;
|
||||
|
||||
private _tourniquets = GET_TOURNIQUETS(_patient);
|
||||
_tourniquets set [_partIndex, CBA_missionTime];
|
||||
|
@ -22,7 +22,7 @@ params ["_medic", "_patient", "_bodyPart"];
|
||||
TRACE_3("tourniquetRemove",_medic,_patient,_bodyPart);
|
||||
|
||||
// Remove tourniquet from body part, exit if no tourniquet applied
|
||||
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
|
||||
private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart;
|
||||
private _tourniquets = GET_TOURNIQUETS(_patient);
|
||||
|
||||
if (_tourniquets select _partIndex == 0) exitWith {
|
||||
|
@ -3,7 +3,7 @@ class EGVAR(arsenal,stats) {
|
||||
class GVAR(generation): statBase {
|
||||
scope = 2;
|
||||
priority = 1.6;
|
||||
condition = QUOTE('nvg' in (getArray ((_this select 1) >> 'visionMode') apply {toLower _x}));
|
||||
condition = QUOTE('nvg' in (getArray ((_this select 1) >> 'visionMode') apply {toLowerANSI _x}));
|
||||
displayName = CSTRING(NVGeneration);
|
||||
showText = 1;
|
||||
textStatement = QUOTE(call FUNC(statTextStatement_NVGeneration));
|
||||
|
@ -159,7 +159,7 @@ private _cargoNumber = -1;
|
||||
};
|
||||
} else {
|
||||
private ["_name", "_icon", "_statement", "_params"];
|
||||
switch (toLower _role) do {
|
||||
switch (toLowerANSI _role) do {
|
||||
case "driver": {
|
||||
if (
|
||||
lockedDriver _vehicle
|
||||
|
@ -69,7 +69,7 @@ if (!isNull _target &&
|
||||
{
|
||||
_x params ["_unit", "_role", "_cargoIndex", "_turretPath"];
|
||||
if ((isNull _unit) || {!alive _unit}) then {
|
||||
private _effectiveRole = toLower _role;
|
||||
private _effectiveRole = toLowerANSI _role;
|
||||
|
||||
if ((_effectiveRole in ["driver", "gunner"]) && {unitIsUAV _target}) exitWith {}; // Ignoring UAV Driver/Gunner
|
||||
if ((_effectiveRole == "driver") && {(getNumber (configOf _target >> "hasDriver")) == 0}) exitWith {}; // Ignoring Non Driver (static weapons)
|
||||
|
@ -24,7 +24,7 @@ TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_veh
|
||||
#define BASE_FREQ 13
|
||||
#define RECOIL_COEF 40
|
||||
|
||||
if (toLower _weapon in ["throw", "put"]) exitWith {};
|
||||
if (toLowerANSI _weapon in ["throw", "put"]) exitWith {};
|
||||
|
||||
private _powerMod = ([0, -0.1, -0.1, 0, -0.2] select (["STAND", "CROUCH", "PRONE", "UNDEFINED", ""] find stance _unit)) + ([0, -1, 0, -1] select (["INTERNAL", "EXTERNAL", "GUNNER", "GROUP"] find cameraView));
|
||||
|
||||
|
@ -20,7 +20,7 @@ addMissionEventHandler ["Draw3D", {
|
||||
private _hitpoint = _hitPoints select _forEachIndex;
|
||||
|
||||
if ((_selection != "") && {_hitPoint != ""}) then {
|
||||
if (((toLower _hitPoint) find "glass") != -1) exitWith {};
|
||||
if ("glass" in (toLowerANSI _hitPoint)) exitWith {};
|
||||
|
||||
private _info = "";
|
||||
private _color = [1,0,0,1];
|
||||
|
@ -52,7 +52,7 @@ private _turretPaths = ((fullCrew [_vehicle, "gunner", true]) + (fullCrew [_vehi
|
||||
|
||||
{
|
||||
private _selection = _x;
|
||||
private _hitpoint = toLower (_hitPoints select _forEachIndex);
|
||||
private _hitpoint = toLowerANSI (_hitPoints select _forEachIndex);
|
||||
|
||||
// Skip ignored selections
|
||||
if (_forEachIndex in _selectionsToIgnore) then {
|
||||
|
@ -40,7 +40,7 @@ private _text = LSTRING(Hit);
|
||||
if ((_hitpoint select [0, 1]) == "#") then { _hitPoint = _hitPoint select [1] };
|
||||
|
||||
// Remove "Hit" from hitpoint name if one exists
|
||||
private _toFind = if ((toLower _hitPoint) find "hit" == 0) then {
|
||||
private _toFind = if ((toLowerANSI _hitPoint) find "hit" == 0) then {
|
||||
[_hitPoint, 3] call CBA_fnc_substr
|
||||
} else {
|
||||
_hitPoint
|
||||
|
@ -35,7 +35,7 @@ private _processedSelections = [];
|
||||
|
||||
{
|
||||
private _selection = _x;
|
||||
private _hitpoint = toLower (_hitPoints select _forEachIndex);
|
||||
private _hitpoint = toLowerANSI (_hitPoints select _forEachIndex);
|
||||
private _isWheelOrTrack = _selection in _wheelHitSelections || {_hitpoint in _wheelHitPoints} || {_hitpoint in TRACK_HITPOINTS};
|
||||
|
||||
if (_hitpoint isEqualTo "") then { // skip empty hitpoint
|
||||
|
@ -68,7 +68,7 @@ private _wheelHitPointSelections = [];
|
||||
{
|
||||
if (_x != "") then {
|
||||
//Filter out things that definitly aren't wheeels (#3759)
|
||||
if ((toLower (_hitPoints select _forEachIndex)) in ["hitengine", "hitfuel", "hitbody"]) exitWith {TRACE_1("filter",_x)};
|
||||
if ((toLowerANSI (_hitPoints select _forEachIndex)) in ["hitengine", "hitfuel", "hitbody"]) exitWith {TRACE_1("filter",_x)};
|
||||
private _xPos = _vehicle selectionPosition _x;
|
||||
if (_xPos isEqualTo [0,0,0]) exitWith {};
|
||||
private _xDist = _wheelCenterPos distance _xPos;
|
||||
|
@ -172,7 +172,7 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then {
|
||||
} else {
|
||||
_caller setVariable [QGVAR(repairPrevAnimCaller), animationState _caller];
|
||||
};
|
||||
_caller setVariable [QGVAR(repairCurrentAnimCaller), toLower _callerAnim];
|
||||
_caller setVariable [QGVAR(repairCurrentAnimCaller), toLowerANSI _callerAnim];
|
||||
[_caller, _callerAnim] call EFUNC(common,doAnimation);
|
||||
};
|
||||
};
|
||||
|
@ -44,7 +44,7 @@ private _hitPointDamageRepaired = 0; //positive for repairs : newSum = (oldSum -
|
||||
if ((!isNil {_vehicle getHit _selectionName}) && {_x != ""}) then {
|
||||
_realHitpointCount = _realHitpointCount + 1;
|
||||
|
||||
if ((((toLower _x) find "glass") == -1) && {(getText (configOf _vehicle >> "HitPoints" >> _x >> "depends")) in ["", "0"]}) then {
|
||||
if (!("glass" in (toLowerANSI _x)) && {(getText (configOf _vehicle >> "HitPoints" >> _x >> "depends")) in ["", "0"]}) then {
|
||||
_hitPointDamageSumOld = _hitPointDamageSumOld + (_allHitPointDamages select _forEachIndex);
|
||||
if (_forEachIndex == _hitPointIndex) then {
|
||||
_hitPointDamageRepaired = (_allHitPointDamages select _forEachIndex) - _hitPointDamage;
|
||||
|
@ -34,7 +34,7 @@ if (_filename == "") exitWith {
|
||||
};
|
||||
|
||||
// add file extension .wss as default
|
||||
if !(toLower (_filename select [count _filename - 4]) in [".wav", ".ogg", ".wss"]) then {
|
||||
if !(toLowerANSI (_filename select [count _filename - 4]) in [".wav", ".ogg", ".wss"]) then {
|
||||
_filename = format ["%1.wss", _filename];
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
private _respawn = getMissionConfigValue ["respawn",0];
|
||||
if (_respawn isEqualType "") then { _respawn = ["","bird","","","group","side"] find (toLower _respawn); };
|
||||
if (_respawn isEqualType "") then { _respawn = ["","bird","","","group","side"] find (toLowerANSI _respawn); };
|
||||
if !(_respawn in [1,4,5]) exitWith {};
|
||||
|
||||
// Remember to check for side specific templates
|
||||
|
@ -12,7 +12,7 @@ private _vehicleClasses = "(configName _x) isKindOf 'Static'" configClasses (con
|
||||
private _model = getText (_x >> "model");
|
||||
if (_model != "") then {
|
||||
private _array = _model splitString "\";
|
||||
_cacheStaticModels pushBackUnique toLower (_array select ((count _array) - 1));
|
||||
_cacheStaticModels pushBackUnique toLowerANSI (_array select -1);
|
||||
};
|
||||
} forEach _vehicleClasses;
|
||||
|
||||
@ -24,7 +24,7 @@ private _cfgBase = configFile >> "CfgNonAIVehicles";
|
||||
private _model = getText (_x >> "model");
|
||||
if (_model != "") then {
|
||||
private _array = _model splitString "\";
|
||||
_cacheStaticModels pushBackUnique toLower (_array select ((count _array) - 1));
|
||||
_cacheStaticModels pushBackUnique toLowerANSI (_array select -1);
|
||||
};
|
||||
} forEach (_nonaivehicleClasses select {(configName _x) isKindOf ["Bridge_base_F", _cfgBase]});
|
||||
|
||||
|
@ -22,4 +22,4 @@ private _simulationType = getText ((configOf _target) >> "simulation");
|
||||
// TRACE_1("sim type",_simulationType);
|
||||
|
||||
// Biki lies, you can both tow and tow as either TankX or CarX
|
||||
(toLower _simulationType) in ["tankx", "carx", "shipx"]
|
||||
(toLowerANSI _simulationType) in ["tankx", "carx", "shipx"]
|
||||
|
@ -51,7 +51,7 @@ private _exitCondition = !(
|
||||
|| {getPosASLW _unit select 2 < -1.5} // walking-to-swimming animation in wetsuit lasts for 3 seconds
|
||||
} &&
|
||||
{ [_unit, objNull, [INTERACTION_EXCEPTIONS]] call EFUNC(common,canInteractWith) } &&
|
||||
{ "unconscious" isNotEqualTo toLower animationState _unit } &&
|
||||
{ "unconscious" isNotEqualTo toLowerANSI animationState _unit } &&
|
||||
{ !(_unit getVariable ["ACE_isUnconscious", false]) } &&
|
||||
{ ACE_player == _unit }
|
||||
);
|
||||
|
@ -40,7 +40,7 @@ GVAR(elementsSet) = call CBA_fnc_createNamespace;
|
||||
if (_name in ELEMENTS_BASIC) then {
|
||||
[true] call FUNC(setElements);
|
||||
} else {
|
||||
private _nameNoPrefix = toLower (_name select [7]);
|
||||
private _nameNoPrefix = toLowerANSI (_name select [7]);
|
||||
private _cachedElement = GVAR(configCache) getVariable _nameNoPrefix;
|
||||
if (!isNil "_cachedElement") then {
|
||||
[_nameNoPrefix, _value, true] call FUNC(setAdvancedElement);
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
{
|
||||
private _failure = false;
|
||||
private _class = toLower (configName _x);
|
||||
private _class = toLowerANSI (configName _x);
|
||||
|
||||
private _idd = getNumber (_x >> "idd");
|
||||
|
||||
|
@ -29,7 +29,7 @@ if (_source == "" || {_element == ""}) exitWith {
|
||||
WARNING("Source or Element may not be empty strings!");
|
||||
};
|
||||
|
||||
_element = toLower _element;
|
||||
_element = toLowerANSI _element;
|
||||
|
||||
// Verify element is bound
|
||||
private _cachedElement = GVAR(configCache) getVariable _element;
|
||||
|
@ -35,7 +35,7 @@ private _slatHitpoints = [_vehicleConfig >> QGVAR(slatHitpoints), "ARRAY", []] c
|
||||
{
|
||||
_x params ["_hitpoints", "_type"];
|
||||
{
|
||||
[_hitpointHash, toLower _x, [_type, _hitpointsConfig >> _x, _x]] call CBA_fnc_hashSet;
|
||||
[_hitpointHash, toLowerANSI _x, [_type, _hitpointsConfig >> _x, toLowerANSI _x]] call CBA_fnc_hashSet;
|
||||
} forEach _hitpoints;
|
||||
} forEach ALL_HITPOINTS;
|
||||
|
||||
@ -45,7 +45,7 @@ _vehicle setVariable [QGVAR(hitpointHash), _hitpointHash];
|
||||
private _iterateThroughConfig = {
|
||||
params ["_vehicle", "_config", "_iterateThroughConfig", "_hitpointAliases"];
|
||||
TRACE_1("checking config",_config);
|
||||
private _configName = configName _config;
|
||||
private _configName = toLowerANSI configName _config;
|
||||
private _isGun = ([_config >> "isGun", "NUMBER", 0] call CBA_fnc_getConfigEntry) == 1;
|
||||
private _isTurret = ([_config >> "isTurret", "NUMBER", 0] call CBA_fnc_getConfigEntry) == 1;
|
||||
private _isEra = _configName in _eraHitpoints;
|
||||
@ -53,18 +53,18 @@ private _iterateThroughConfig = {
|
||||
private _isMisc = false;
|
||||
|
||||
// prevent incompatibilites with old mods
|
||||
if ((toLower _configName) isEqualTo "hitturret") then {
|
||||
if (_configName isEqualTo "hitturret") then {
|
||||
_isTurret = true;
|
||||
};
|
||||
if ((toLower _configName) isEqualTo "hitgun") then {
|
||||
if (_configName isEqualTo "hitgun") then {
|
||||
_isGun = true;
|
||||
};
|
||||
|
||||
private _hash = _vehicle getVariable QGVAR(hitpointHash);
|
||||
{
|
||||
_x params ["_hitType", "_hitPoints"];
|
||||
if ((toLower _configName) in _hitPoints) then {
|
||||
[_hash, toLower _configName, [_hitType, _config, _configName]] call CBA_fnc_hashSet;
|
||||
if (_configName in _hitPoints) then {
|
||||
[_hash, _configName, [_hitType, _config, _configName]] call CBA_fnc_hashSet;
|
||||
_isMisc = true;
|
||||
};
|
||||
} forEach _hitpointAliases;
|
||||
@ -72,16 +72,16 @@ private _iterateThroughConfig = {
|
||||
if (_isGun || _isTurret || _isEra || _isSlat || _isMisc) then {
|
||||
TRACE_6("found gun/turret/era/slat/misc",_isGun,_isTurret,_isEra,_isSlat,_isMisc,_hash);
|
||||
if (_isGun) then {
|
||||
[_hash, toLower _configName, ["gun", _config, _configName]] call CBA_fnc_hashSet;
|
||||
[_hash, _configName, ["gun", _config, _configName]] call CBA_fnc_hashSet;
|
||||
};
|
||||
if (_isTurret) then {
|
||||
[_hash, toLower _configName, ["turret", _config, _configName]] call CBA_fnc_hashSet;
|
||||
[_hash, _configName, ["turret", _config, _configName]] call CBA_fnc_hashSet;
|
||||
};
|
||||
if (_isEra) then {
|
||||
[_hash, toLower _configName, ["era", _config, _configName]] call CBA_fnc_hashSet;
|
||||
[_hash, _configName, ["era", _config, _configName]] call CBA_fnc_hashSet;
|
||||
};
|
||||
if (_isSlat) then {
|
||||
[_hash, toLower _configName, ["slat", _config, _configName]] call CBA_fnc_hashSet;
|
||||
[_hash, _configName, ["slat", _config, _configName]] call CBA_fnc_hashSet;
|
||||
};
|
||||
_vehicle setVariable [QGVAR(hitpointHash), _hash];
|
||||
} else {
|
||||
|
@ -83,7 +83,7 @@ _projectileData params ["_projectileType", "_projectileConfig"];
|
||||
private _enabled = ([_hitpointConfig >> QGVAR(enabled), "NUMBER", 0] call CBA_fnc_getConfigEntry) == 1;
|
||||
#define MATERIAL_ARRAY ([[0, 0, 0, 0, 0, 0], "steel", [7850, 500, 1.104, 9874, 0.3598, -0.2342], "tungsten", [19300, 0, 0.994, 134.5, -0.148], "depleted_uranium", [18600, 0, 0.825, 90, -0.0849]])
|
||||
private _rodMaterialStr = [_projectileConfig >> QGVAR(material), "STRING", "tungsten"] call CBA_fnc_getConfigEntry;
|
||||
private _rodMaterialParams = MATERIAL_ARRAY select (1 + MATERIAL_ARRAY find toLower _rodMaterial);
|
||||
private _rodMaterialParams = MATERIAL_ARRAY select (1 + MATERIAL_ARRAY find toLowerANSI _rodMaterial);
|
||||
|
||||
if !(_enabled) exitWith { [false, 0, 0, 0, 0] };
|
||||
if (_rodMaterialParams isEqualTo [0, 0, 0, 0, 0, 0]) exitWith { [] };
|
||||
|
@ -40,7 +40,7 @@ if (!_alreadyCookingOff && { _chanceOfFire >= random 1 }) exitWith {
|
||||
private _detonateAfterCookoff = (_fireDetonateChance / 4) > random 1;
|
||||
|
||||
private _source = "";
|
||||
if (toLower _hitPart isEqualTo "engine") then {
|
||||
if (_hitPart == "engine") then {
|
||||
_source = ["hit_engine_point", "HitPoints"];
|
||||
};
|
||||
|
||||
|
@ -34,7 +34,7 @@ if !(alive _vehicle) exitWith {
|
||||
true
|
||||
};
|
||||
|
||||
_hitPoint = toLower _hitPoint;
|
||||
_hitPoint = toLowerANSI _hitPoint;
|
||||
private _hitpointHash = _vehicle getVariable [QGVAR(hitpointHash), []];
|
||||
private _type = if (_hitpointHash isEqualTo []) then {
|
||||
"exit"
|
||||
|
@ -36,7 +36,7 @@ if (cba_events_control) then {
|
||||
_shownIndex = -1;
|
||||
};
|
||||
|
||||
([_player] call FUNC(getSeatInfo)) params ["_role", "", "", "_comparment"];
|
||||
([_player] call FUNC(getSeatInfo)) params ["_role", "", "", "_compartment"];
|
||||
|
||||
private _newIndexAngle = 45; // Controls the max angle
|
||||
private _eyesPosASL = AGLtoASL (positionCameraToWorld [0, 0, 0]);
|
||||
@ -52,8 +52,8 @@ if (cba_events_control) then {
|
||||
#endif
|
||||
if (
|
||||
(_viewAngle < _newIndexAngle)
|
||||
&& {(_compartments isEqualTo []) || {(toLower _comparment) in _compartments}}
|
||||
&& {(_roles isEqualTo []) || {(toLower _role) in _roles}}
|
||||
&& {(_compartments isEqualTo []) || {(toLowerANSI _compartment) in _compartments}}
|
||||
&& {(_roles isEqualTo []) || {(toLowerANSI _role) in _roles}}
|
||||
&& {(vectorMagnitude _viewDiff) < _maxDistance}
|
||||
) then {
|
||||
_newIndex = _forEachIndex;
|
||||
|
@ -61,9 +61,9 @@ if (isNil "_viewports") then {
|
||||
_maxDistance = 0.8;
|
||||
};
|
||||
// compartments [ARRAY] - Optional
|
||||
private _compartments = (getArray (_x >> "compartments")) apply {toLower _x};
|
||||
private _compartments = (getArray (_x >> "compartments")) apply {toLowerANSI _x};
|
||||
// roles [ARRAY] - Optional
|
||||
private _roles = (getArray (_x >> "roles")) apply {toLower _x};
|
||||
private _roles = (getArray (_x >> "roles")) apply {toLowerANSI _x};
|
||||
|
||||
[_name, _type, _camLocation, _camAttach, _screenLocation, _maxDistance, _compartments, _roles]
|
||||
};
|
||||
|
@ -30,7 +30,7 @@ _sound params ["_filename", ["_volume", 1], ["_soundPitch", 1], ["_distance", 0]
|
||||
if (_filename == "") exitWith {};
|
||||
|
||||
// add file extension .wss as default
|
||||
if !(toLower (_filename select [count _filename - 4]) in [".wav", ".ogg", ".wss"]) then {
|
||||
if !(toLowerANSI (_filename select [count _filename - 4]) in [".wav", ".ogg", ".wss"]) then {
|
||||
_filename = format ["%1.wss", _filename];
|
||||
};
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
private _worldName = toLower worldName;
|
||||
private _worldName = toLowerANSI worldName;
|
||||
TRACE_1("getting map data",_worldName);
|
||||
|
||||
// Set default values
|
||||
|
@ -42,7 +42,7 @@ if (_activated) then {
|
||||
_posAmmo = +_pos;
|
||||
_posAmmo set [2,0];
|
||||
_dir = direction _logic;
|
||||
_simulation = tolower gettext (configfile >> "cfgammo" >> _ammo >> "simulation");
|
||||
_simulation = toLowerANSI gettext (configfile >> "cfgammo" >> _ammo >> "simulation");
|
||||
_altitude = 0;
|
||||
_velocity = [];
|
||||
_attach = false;
|
||||
|
Loading…
Reference in New Issue
Block a user