Skip to content

Commit

Permalink
Add Ragdoll Disabler tool
Browse files Browse the repository at this point in the history
  • Loading branch information
StyledStrike committed Jan 5, 2025
1 parent b3e00f3 commit 3c15507
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 2 deletions.
47 changes: 47 additions & 0 deletions lua/weapons/gmod_tool/stools/glide_ragdoll_disabler.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
TOOL.Category = "Glide"
TOOL.Name = "#tool.glide_ragdoll_disabler.name"

TOOL.Information = {
{ name = "left" },
{ name = "right" }
}

local function IsGlideVehicle( ent )
return IsValid( ent ) and ent.IsGlideVehicle
end

local function GetGlideVehicle( trace )
local ent = trace.Entity

if IsGlideVehicle( ent ) then
return ent
end

return false
end

function TOOL:LeftClick( trace )
local veh = GetGlideVehicle( trace )
if not veh then return false end

if SERVER then
veh.FallOnCollision = false
end

return true
end

function TOOL:RightClick( trace )
local veh = GetGlideVehicle( trace )
if not veh then return false end

if SERVER then
veh.FallOnCollision = true
end

return true
end

function TOOL.BuildCPanel( panel )
panel:Help( "#tool.glide_ragdoll_disabler.desc" )
end
5 changes: 5 additions & 0 deletions resource/localization/en/glide_vehicles.properties
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ tool.glide_wheel_model.rear_scale=Rear model scale
tool.glide_wheel_model.rear_model=Rear model
tool.glide_wheel_model.vehicle_model=This vehicle has wheels that are part of the vehicle model itself, they cannot be changed.

tool.glide_ragdoll_disabler.name=Ragdoll Disabler
tool.glide_ragdoll_disabler.desc=Don't let players fall from motorcycles
tool.glide_ragdoll_disabler.left=Make players stay on the vehicle
tool.glide_ragdoll_disabler.right=Allow players to fall from the vehicle

SBoxLimit_glide_vehicles=You've hit the Glide vehicle limit!
SBoxLimit_glide_turret=You've hit the Glide Turret limit!
SBoxLimit_glide_missile_launcher=You've hit the Glide Missile Launcher limit!
Expand Down
5 changes: 5 additions & 0 deletions resource/localization/pt-br/glide_vehicles.properties
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ tool.glide_wheel_model.rear_scale=Tamanho do modelo traseiro
tool.glide_wheel_model.rear_model=Modelo traseiro
tool.glide_wheel_model.vehicle_model=Este veículo tem rodas que fazem parte do modelo do veículo em si, elas não podem ser mudadas.

tool.glide_ragdoll_disabler.name=Desabilitar Boneco de Pano
tool.glide_ragdoll_disabler.desc=Não deixa os jogadores caírem das motocicletas
tool.glide_ragdoll_disabler.left=Faça os jogadores ficarem no veículo
tool.glide_ragdoll_disabler.right=Permita que os jogadores caiam do veículo

SBoxLimit_glide_vehicles=Você atingiu o limite do veículos Glide!
SBoxLimit_glide_turret=Você atingiu o limite do Armas do Glide!
SBoxLimit_glide_missile_launcher=Você atingiu o limite de Lança-mísseis do Glide!
Expand Down
5 changes: 5 additions & 0 deletions resource/localization/ru/glide_vehicles.properties
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ tool.glide_wheel_model.rear_scale=Размер задних колёс
tool.glide_wheel_model.rear_model=Модель задних колёс
tool.glide_wheel_model.vehicle_model=У этого транспорта колёса являются частью его самого, поэтому не могут быть изменены.

tool.glide_ragdoll_disabler.name=Отключить падение
tool.glide_ragdoll_disabler.desc=Не давать игрокам падать с мотоциклов
tool.glide_ragdoll_disabler.left=Заставить игроков оставаться на транспортном средстве
tool.glide_ragdoll_disabler.right=Разрешить игрокам падать с транспортного средства

SBoxLimit_glide_vehicles=Вы достигли предела Транспорта Glide!
SBoxLimit_glide_turret=Вы достигли предела Турелей Glide!
SBoxLimit_glide_missile_launcher=Вы достигли предела Ракетных установок Glide!
Expand Down
9 changes: 7 additions & 2 deletions resource/localization/sp-es/glide_vehicles.properties
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ glide.misc.tips=Mostrar consejos en pantalla
glide.misc.reset_binds=Restablecer controles a los predeterminados
glide.misc.reset_settings=Restablecer ajustes a los predeterminados

glide.misc.reset_binds_query=Are you sure you want to reset all keybinds to default?
glide.misc.reset_settings_query=Are you sure you want to reset all settings (excluding keybinds) to default?
glide.misc.reset_binds_query=¿Estás seguro de que quieres restablecer todos los controles a los predeterminados?
glide.misc.reset_settings_query=¿Está seguro de que quieres restablecer todos los ajustes (excluyendo los controles) a los valores predeterminados?

# Weapons
glide.weapons.mgs=Ametralladoras
Expand Down Expand Up @@ -252,6 +252,11 @@ tool.glide_wheel_model.rear_scale=Escala del modelo trasero
tool.glide_wheel_model.rear_model=Modelo trasero
tool.glide_wheel_model.vehicle_model=Este vehículo tiene ruedas que son parte del modelo del vehículo, no se pueden cambiar.

tool.glide_ragdoll_disabler.name=Deshabilitar caída
tool.glide_ragdoll_disabler.desc=No dejar que los jugadores se caigan de las motocicletas
tool.glide_ragdoll_disabler.left=Hacer que los jugadores permanezcan en el vehículo
tool.glide_ragdoll_disabler.right=Permitir que los jugadores se caigan del vehículo

SBoxLimit_glide_vehicles=¡Has alcanzado el límite de vehículos Glide!
SBoxLimit_glide_turret=¡Has alcanzado el límite de torretas Glide!
SBoxLimit_glide_missile_launcher=¡Has alcanzado el límite de lanzadores de misiles Glide!
Expand Down
5 changes: 5 additions & 0 deletions resource/localization/tr/glide_vehicles.properties
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ tool.glide_wheel_model.rear_scale=Arka tampon model ölçeği
tool.glide_wheel_model.rear_model=Arka tampon model
tool.glide_wheel_model.vehicle_model=Bu aracın, araç modelinin bir parçası olan tekerlekleri vardır, değiştirilemezler.

tool.glide_ragdoll_disabler.name=Düşmeyi Devre Dışı Bırak
tool.glide_ragdoll_disabler.desc=Oyuncuların motosikletlerden düşmesine izin verme
tool.glide_ragdoll_disabler.left=Oyuncuların araçta kalmasını sağla
tool.glide_ragdoll_disabler.right=Oyuncuların araçtan düşmesine izin ver

SBoxLimit_glide_vehicles=Glide araç sınırına ulaştın!
SBoxLimit_glide_turret=Glide Tareti sınırına ulaştın!
SBoxLimit_glide_missile_launcher=Glide Füze Fırlatıcı sınırına ulaştın!
Expand Down

0 comments on commit 3c15507

Please sign in to comment.