Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vehicles - Configurable speed limiter step #7601

Merged
merged 7 commits into from
Apr 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addons/vehicles/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ GVAR(isSpeedLimiter) = false;

["ACE3 Vehicles", QGVAR(scrollUp), localize LSTRING(IncreaseSpeedLimit), {
if (GVAR(isSpeedLimiter)) then {
GVAR(speedLimit) = round (GVAR(speedLimit) + 1) max 5;
GVAR(speedLimit) = round (GVAR(speedLimit) + GVAR(speedLimiterStep)) max (5 max GVAR(speedLimiterStep));
[["%1: %2", LSTRING(SpeedLimit), GVAR(speedLimit)]] call EFUNC(common,displayTextStructured);
true
};
}, {false}, [MOUSE_SCROLL_UP, [false, true, false]], false] call CBA_fnc_addKeybind; // Ctrl + Mouse Wheel Scroll Up

["ACE3 Vehicles", QGVAR(scrollDown), localize LSTRING(DecreaseSpeedLimit), {
if (GVAR(isSpeedLimiter)) then {
GVAR(speedLimit) = round (GVAR(speedLimit) - 1) max 5;
GVAR(speedLimit) = round (GVAR(speedLimit) - GVAR(speedLimiterStep)) max (5 max GVAR(speedLimiterStep));
[["%1: %2", LSTRING(SpeedLimit), GVAR(speedLimit)]] call EFUNC(common,displayTextStructured);
true
};
Expand Down
8 changes: 8 additions & 0 deletions addons/vehicles/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@
},
true // needs restart
] call CBA_fnc_addSetting;

[
QGVAR(speedLimiterStep),
"SLIDER",
LSTRING(SpeedLimiterStep),
ELSTRING(common,ACEKeybindCategoryVehicles),
[1, 10, 5, 0]
] call CBA_fnc_addSetting;
6 changes: 6 additions & 0 deletions addons/vehicles/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,11 @@
<Italian>Nasconde la voce Espelli dal menu azione. Richiede il riavvio del gioco.</Italian>
<Czech>Schová akci vyskošení z vozidla z akčního menu. Vyžaduje restart hry.</Czech>
</Key>
<Key ID="STR_ACE_Vehicles_SpeedLimiterStep">
<English>Speed Limiter Step</English>
<German>Schrittgröße des Geschwindigkeitsbegrenzers</German>
<Polish>Przeskok limitera prędkości</Polish>
veteran29 marked this conversation as resolved.
Show resolved Hide resolved
<French>Pas du limiteur de vitesse</French>
</Key>
</Package>
</Project>