Skip to content

Commit

Permalink
Added "Toggle engine" bind
Browse files Browse the repository at this point in the history
  • Loading branch information
StyledStrike committed Dec 30, 2024
1 parent e55f19f commit 49f118e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/entities/base_glide_car/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,13 @@ function ENT:OnSeatInput( seatIndex, action, pressed )
immediate = true
} )

elseif action == "toggle_engine" then
if self:GetEngineState() == 0 then
self:TurnOn()
else
self:TurnOff()
end

elseif action == "accelerate" and self:GetEngineState() == 0 then
self:TurnOn()
end
Expand Down
2 changes: 2 additions & 0 deletions lua/glide/client/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,8 @@ function Config:OpenFrame()
CreateBinderButton( panelKeyboard, L"input.horn", "horn", landBinds.horn, OnChangeLandBind )
CreateBinderButton( panelKeyboard, L"input.headlights", "headlights", landBinds.headlights, OnChangeLandBind )
CreateBinderButton( panelKeyboard, L"input.reduce_throttle", "reduce_throttle", landBinds.reduce_throttle, OnChangeLandBind )
CreateBinderButton( panelKeyboard, L"input.toggle_engine", "toggle_engine", landBinds.toggle_engine, OnChangeLandBind )

CreateBinderButton( panelKeyboard, L"input.lean_forward", "lean_forward", landBinds.lean_forward, OnChangeLandBind )
CreateBinderButton( panelKeyboard, L"input.lean_back", "lean_back", landBinds.lean_back, OnChangeLandBind )

Expand Down
2 changes: 2 additions & 0 deletions lua/glide/sh_input.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ InputCategories["land_controls"] = {
["horn"] = KEY_R,
["headlights"] = KEY_H,
["reduce_throttle"] = KEY_LSHIFT,
["toggle_engine"] = KEY_I,

["lean_forward"] = KEY_UP,
["lean_back"] = KEY_DOWN,

Expand Down
1 change: 1 addition & 0 deletions resource/localization/en/glide_vehicles.properties
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ glide.input.handbrake=Handbrake
glide.input.horn=Horn/siren
glide.input.headlights=Toggle headlights
glide.input.reduce_throttle=Toggle reduced throttle
glide.input.toggle_engine=Toggle engine

glide.input.manual_shift=Manual gear shifting
glide.input.shift_up=Shift gear up
Expand Down
1 change: 1 addition & 0 deletions resource/localization/pt-br/glide_vehicles.properties
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ glide.input.handbrake=Freio de mão
glide.input.horn=Buzina/sirene
glide.input.headlights=Alternar faróis
glide.input.reduce_throttle=Alternar aceleração reduzida
glide.input.toggle_engine=Ligar/desligar motor

glide.input.manual_shift=Mudança de marchas manual
glide.input.shift_up=Marcha para cima
Expand Down
1 change: 1 addition & 0 deletions resource/localization/ru/glide_vehicles.properties
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ glide.input.handbrake=Ручной тормоз
glide.input.horn=Гудок/Сирена
glide.input.headlights=Фары
glide.input.reduce_throttle=Сдержанное ускорение
glide.input.toggle_engine=Переключить двигатель

glide.input.manual_shift=Ручное переключение передач
glide.input.shift_up=Следующая передача
Expand Down
1 change: 1 addition & 0 deletions resource/localization/tr/glide_vehicles.properties
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ glide.input.handbrake=El Freni
glide.input.horn=Korna/siren
glide.input.headlights=Farları aç/kapat
glide.input.reduce_throttle=Azaltılmış gaz kelebeğini aç/kapat
glide.input.toggle_engine=Motoru değiştir

glide.input.manual_shift=Manuel vites değiştirme
glide.input.shift_up=İleri vites
Expand Down

0 comments on commit 49f118e

Please sign in to comment.