Vehicles - Configurable speed limiter step (#7601)

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>
Co-Authored-By: Elgin675 <elgin675@hotmail.com>
This commit is contained in:
Filip Maciejewski 2020-04-20 02:17:42 +02:00 committed by GitHub
parent 142fc1e3de
commit eb8856e7c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 2 deletions

View File

@ -33,7 +33,7 @@ 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
};
@ -41,7 +41,7 @@ GVAR(isSpeedLimiter) = false;
["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
};

View File

@ -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;

View File

@ -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>
<French>Pas du limiteur de vitesse</French>
</Key>
</Package>
</Project>