From 883db077977ae42d0171b462a50e9b2730f60f82 Mon Sep 17 00:00:00 2001 From: Valmo Trindade Date: Wed, 19 Feb 2025 22:04:34 -0300 Subject: [PATCH] added handler for unsupported maps and handled all world names to lowercase --- addons/main/functions/map/fn_convert_location.sqf | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/addons/main/functions/map/fn_convert_location.sqf b/addons/main/functions/map/fn_convert_location.sqf index e96e804..e5e2a8a 100644 --- a/addons/main/functions/map/fn_convert_location.sqf +++ b/addons/main/functions/map/fn_convert_location.sqf @@ -4,26 +4,29 @@ _position = [_latitude, _longitude, _altitude]; _realLocation = null; -switch (worldName) do { - case "Altis": { +switch (toLower worldName) do { + case "altis": { _realLocation = _position call armatak_fnc_convert_to_altis; }; - case "Stratis": { + case "stratis": { _realLocation = _position call armatak_fnc_convert_to_stratis; }; - case "Malden": { + case "malden": { _realLocation = _position call armatak_fnc_convert_to_malden; }; - case "VR": { + case "vr": { _realLocation = _position call armatak_fnc_convert_to_vr; }; case "cucui": { _realLocation = _position call armatak_fnc_convert_to_cucui; }; - case "Mountains_ACR": { + case "mountains_acr": { _realLocation = _position call armatak_fnc_convert_to_takistan_montains; }; default { + _warning = format ["ARMATAK
%1", "Unsupported Map"]; + [[_warning, 1.5]] call CBA_fnc_notify; + _realLocation = [0, 0, 0]; }; };