diff --git a/addons/quickmount/ACE_Settings.hpp b/addons/quickmount/ACE_Settings.hpp index b4e07be4b4..e494789d92 100644 --- a/addons/quickmount/ACE_Settings.hpp +++ b/addons/quickmount/ACE_Settings.hpp @@ -1,41 +1,14 @@ class ACE_Settings { class GVAR(enabled) { - value = 0; - typeName = "BOOL"; - category = CSTRING(Category); - displayName = ECSTRING(common,Enabled); - description = CSTRING(KeybindDescription); - isClientSettable = 1; - force = 0; + movedToSQF = 1; }; class GVAR(distance) { - value = DEFAULT_DISTANCE; - typeName = "SCALAR"; - category = CSTRING(Category); - displayName = CSTRING(Distance); - description = CSTRING(DistanceDescription); - isClientSettable = 0; - force = 0; - values[] = {"0m", "1m", "2m", "3m", "4m", "5m", "6m", "7m", "8m", "9m", "10m"}; + movedToSQF = 1; }; class GVAR(speed) { - value = DEFAULT_SPEED; - typeName = "SCALAR"; - category = CSTRING(Category); - displayName = CSTRING(Speed); - description = CSTRING(SpeedDescription); - isClientSettable = 0; - force = 0; - values[] = {"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"}; + movedToSQF = 1; }; class GVAR(priority) { - value = DEFAULT_PRIORITY; - typeName = "SCALAR"; - category = CSTRING(Category); - displayName = CSTRING(Priority); - description = CSTRING(PriorityDescription); - isClientSettable = 1; - force = 0; - values[] = {"$str_getin_pos_driver", "$str_getin_pos_gunn", "$str_getin_pos_comm", "$STR_GETIN_POS_PASSENGER"}; + movedToSQF = 1; }; }; diff --git a/addons/quickmount/XEH_preInit.sqf b/addons/quickmount/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/quickmount/XEH_preInit.sqf +++ b/addons/quickmount/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/quickmount/functions/fnc_getInNearest.sqf b/addons/quickmount/functions/fnc_getInNearest.sqf index e068d2c0e6..f74e2838b1 100644 --- a/addons/quickmount/functions/fnc_getInNearest.sqf +++ b/addons/quickmount/functions/fnc_getInNearest.sqf @@ -93,7 +93,7 @@ if (!isNull _target && { if ((_x select 2) == _cargoIndex) exitWith {_cargoActionIndex = _forEachIndex}; } forEach (fullCrew [_target, "cargo", true]); - + ACE_player action ["GetInCargo", _target, _cargoActionIndex]; TRACE_4("Geting In Cargo",_x,_role,_cargoActionIndex,_cargoIndex); } else { diff --git a/addons/quickmount/initSettings.sqf b/addons/quickmount/initSettings.sqf new file mode 100644 index 0000000000..e8049aafc2 --- /dev/null +++ b/addons/quickmount/initSettings.sqf @@ -0,0 +1,36 @@ +[ + QGVAR(enabled), + "CHECKBOX", + localize ELSTRING(common,Enabled), + format ["ACE %1", localize LSTRING(Category)], + true, + true +] call CBA_settings_fnc_init; + +[ + QGVAR(distance), + "SLIDER", + [localize LSTRING(Distance), localize LSTRING(DistanceDescription)], + format ["ACE %1", localize LSTRING(Category)], + [0, 10, DEFAULT_DISTANCE, 0], + true +] call CBA_settings_fnc_init; + +[ + QGVAR(speed), + "SLIDER", + [localize LSTRING(Speed), localize LSTRING(SpeedDescription)], + format ["ACE %1", localize LSTRING(Category)], + [0, 30, DEFAULT_SPEED, 0], + true +] call CBA_settings_fnc_init; + +[ + QGVAR(priority), + "LIST", + [localize LSTRING(Priority), localize LSTRING(PriorityDescription)], + format ["ACE %1", localize LSTRING(Category)], + [[0, 1, 2, 3], [localize "str_getin_pos_driver", localize "str_getin_pos_gunn", localize "str_getin_pos_comm", localize "str_getin_pos_passenger"], DEFAULT_PRIORITY], + false +] call CBA_settings_fnc_init; +