summaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/loaditems.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/itemsystem/loaditems.lua')
-rw-r--r--gamemode/itemsystem/loaditems.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/gamemode/itemsystem/loaditems.lua b/gamemode/itemsystem/loaditems.lua
new file mode 100644
index 0000000..8f8313b
--- /dev/null
+++ b/gamemode/itemsystem/loaditems.lua
@@ -0,0 +1,14 @@
+GMS.Resources = {}
+function GMS.RegisterResource( tbl )
+ local sname = string.Replace(tbl.Name, " ", "_")
+ print("Registering " .. sname)
+ GMS.Resources[sname] = tbl
+end
+
+function GMS.GetItemByName(name)
+ if(GMS.Resources[name]) then
+ return GMS.Resources[name]
+ else
+ print("Resource " .. name .. " does not exist! This might be a bug!")
+ end
+end