aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core/inventory/item.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/core/inventory/item.lua')
-rw-r--r--gamemode/core/inventory/item.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/gamemode/core/inventory/item.lua b/gamemode/core/inventory/item.lua
index a598fc2..80e2a88 100644
--- a/gamemode/core/inventory/item.lua
+++ b/gamemode/core/inventory/item.lua
@@ -18,6 +18,7 @@
Items may also have methods from one or more interfaces registered with RegisterInterface
]]
+local log = nrequire("log.lua")
local itm = {}
local required_fields = {
"Name","Serialize","DeSerialize"
@@ -30,9 +31,9 @@ function itm.RegisterItem(tbl)
end
--assert(items[tbl.Name] == nil, string.format("Attempted to register 2 items with the same name %q",tbl.Name))
if items[tbl.Name] ~= nil then
- MsgC(Color(255,255,0),"WARNING: attemtpted to register 2 items with the same name " .. tbl.Name .. "\n")
+ log.warn(string.format("Attempted to register 2 items with the same name: %q, overwriteing previous",tbl.Name))
else
- MsgC(Color(0,255,0),"Registered Item " .. tbl.Name .. "\n")
+ log.info(string.format("Registered item %s",tbl.Name))
end
items[tbl.Name] = tbl
--print("Registered item: " .. tbl.Name)