aboutsummaryrefslogtreecommitdiff
path: root/gamemode/shared/inventory_common.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/shared/inventory_common.lua')
-rw-r--r--gamemode/shared/inventory_common.lua17
1 files changed, 2 insertions, 15 deletions
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