From 5d9c09f3f517de3f29b1736ca17de3246b796efe Mon Sep 17 00:00:00 2001 From: Fesiug Date: Fri, 8 Dec 2023 00:29:09 -0500 Subject: [PATCH] DebugInv on F2 --- gamemodes/benny/gamemode/modules/gui/cl_debuginv.lua | 7 +++++-- gamemodes/benny/gamemode/modules/player/sh_basic.lua | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gamemodes/benny/gamemode/modules/gui/cl_debuginv.lua b/gamemodes/benny/gamemode/modules/gui/cl_debuginv.lua index 451f21b..a3e427e 100644 --- a/gamemodes/benny/gamemode/modules/gui/cl_debuginv.lua +++ b/gamemodes/benny/gamemode/modules/gui/cl_debuginv.lua @@ -222,7 +222,10 @@ local function regen_items( itemlist ) end end concommand.Add("benny_debug_inv", function() - if IsValid( base ) then base:Remove() end + OpenDebugInv() +end) +function OpenDebugInv() + if IsValid( base ) then base:Remove() return end base = vgui.Create("BFrame") base:SetSize( ss(400), ss(400) ) base:SetTitle("Developer Inventory") @@ -234,4 +237,4 @@ concommand.Add("benny_debug_inv", function() itemlist:Dock( FILL ) regen_items( itemlist ) -end) \ No newline at end of file +end \ No newline at end of file diff --git a/gamemodes/benny/gamemode/modules/player/sh_basic.lua b/gamemodes/benny/gamemode/modules/player/sh_basic.lua index d8feca4..5192fa9 100644 --- a/gamemodes/benny/gamemode/modules/player/sh_basic.lua +++ b/gamemodes/benny/gamemode/modules/player/sh_basic.lua @@ -175,7 +175,7 @@ hook.Add( "PlayerButtonDown", "Benny_PlayerButtonDown_Dev", function( ply, butto if button == KEY_F1 then OpenSettingsMenu() elseif button == KEY_F2 then - OpenScorePanel() + OpenDebugInv() elseif button == KEY_F3 then OpenSMenu() elseif button == KEY_F4 then