From d4f197a35c207c9891d3f4dc5e9708af48c935de Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Tue, 9 Aug 2016 17:53:52 -0400 Subject: Added some weapons --- gamemode/shared/inventory_common.lua | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'gamemode/shared/inventory_common.lua') diff --git a/gamemode/shared/inventory_common.lua b/gamemode/shared/inventory_common.lua index e86d0a6..aaf6afb 100644 --- a/gamemode/shared/inventory_common.lua +++ b/gamemode/shared/inventory_common.lua @@ -1,6 +1,7 @@ --[[ Some functions that are needed multiple places in the code, to deal with player inventories. ]] +print("Hello from inventory_common.lua") local invfuncs = {} --Forcibly put an item in a backpack, you should check to make sure there's room first @@ -97,20 +98,6 @@ invfuncs.CreateBackpack = function(name,width,height) return backpack end ---Displays a dropdown of options under the players mouse, if the option is clicked, does the function ---Requires a table of strings to functions, or strings to tables of strings to functions. ---Be careful not to make this a recursive table. -local function createMenuFor(menu, tbl) - for k,v in pairs(tbl) do - if(isfunction(v)) then --This is a dead-end, add the menu - local thisoption = menu:AddOption(k,v) - else --Otherwise it should be a table, recursively call to create - local submenu = menu:AddSubMenu(k) - createMenuFor(submenu,v) - end - end -end - --Draws a backpack on the dpanel, client side only invfuncs.DrawBackpackOnDPanel = function(dp, backpack, backpacknum, tent) local width = ScrW() @@ -201,5 +188,5 @@ invfuncs.DrawBackpackOnDPanel = function(dp, backpack, backpacknum, tent) end end end - +ART.invfuncs = invfuncs return invfuncs -- cgit v1.2.3-70-g09d2