48 lines
2 KiB
Lua
48 lines
2 KiB
Lua
|
|
local function PopulateSBXToolMenu(pnl)
|
||
|
|
pnl:CheckBox("Enabled", "fedhoria_enabled")
|
||
|
|
pnl:ControlHelp("Enable or disable the addon.")
|
||
|
|
|
||
|
|
pnl:CheckBox("Players", "fedhoria_players")
|
||
|
|
pnl:ControlHelp("Enable or disable effect for players.")
|
||
|
|
|
||
|
|
pnl:CheckBox("NPCs", "fedhoria_npcs")
|
||
|
|
pnl:ControlHelp("Enable or disable effect for NPCs.")
|
||
|
|
|
||
|
|
pnl:Help(" ")
|
||
|
|
|
||
|
|
pnl:NumSlider("Stumble time", "fedhoria_stumble_time", 0, 10, 3)
|
||
|
|
pnl:ControlHelp("How long the ragdoll should stumble for.")
|
||
|
|
|
||
|
|
pnl:NumSlider("Die time", "fedhoria_dietime", 0, 10, 3)
|
||
|
|
pnl:ControlHelp("How long before the ragdoll dies after drowning/being still for too long.")
|
||
|
|
|
||
|
|
pnl:NumSlider("Die time variation", "fedhoria_dietime_variation", 0, 10, 2)
|
||
|
|
pnl:ControlHelp("A random number between 0 and the value you choose here will be added to the die timer.")
|
||
|
|
|
||
|
|
pnl:NumSlider("Wound grab chance", "fedhoria_woundgrab_chance", 0, 1, 3)
|
||
|
|
pnl:ControlHelp("The chance the ragdoll will grab it's wound when shot.")
|
||
|
|
|
||
|
|
pnl:NumSlider("Wound grab time", "fedhoria_woundgrab_time", 0, 10, 3)
|
||
|
|
pnl:ControlHelp("How long the ragdoll should hold its wound.")
|
||
|
|
|
||
|
|
pnl:Help(" ")
|
||
|
|
|
||
|
|
pnl:NumSlider("Activation range", "fedhoria_active_range", 0, 5000, 0)
|
||
|
|
pnl:ControlHelp("How close the ragdoll has to be to a player to have euphoria physics")
|
||
|
|
|
||
|
|
pnl:CheckBox("Always activate on player kill", "fedhoria_always_active_on_player_kill")
|
||
|
|
pnl:ControlHelp("If on, all player-killed ragdolls will be activated regardless of other factors.")
|
||
|
|
end
|
||
|
|
|
||
|
|
if engine.ActiveGamemode() == "sandbox" then
|
||
|
|
hook.Add("AddToolMenuCategories", "FedhoriaCategory", function()
|
||
|
|
spawnmenu.AddToolCategory("Utilities", "Fedhoria", "Fedhoria")
|
||
|
|
end)
|
||
|
|
|
||
|
|
hook.Add("PopulateToolMenu", "FedhoriaMenuSettings", function()
|
||
|
|
spawnmenu.AddToolMenuOption("Utilities", "Fedhoria", "FedhoriaSettings", "Settings", "", "", function(pnl)
|
||
|
|
pnl:ClearControls()
|
||
|
|
PopulateSBXToolMenu(pnl)
|
||
|
|
end)
|
||
|
|
end)
|
||
|
|
end
|