added description to item

This commit is contained in:
GHOST11111100
2025-07-26 16:49:39 +03:00
parent b4b49ccd83
commit 21364af7a3
4 changed files with 41 additions and 7 deletions
+22
View File
@@ -128,6 +128,28 @@ function inventory.decrement(invid, slot, count)
end
end
function inventory.set_caption(invid, slot, caption)
local itemid, itemcount = inventory.get(invid, slot)
if itemid == 0 then
return
end
if caption == nil or type(caption) ~= "string" then
caption = ""
end
inventory.set_data(invid, slot, "caption", caption)
end
function inventory.set_description(invid, slot, description)
local itemid, itemcount = inventory.get(invid, slot)
if itemid == 0 then
return
end
if description == nil or type(description) ~= "string" then
description = ""
end
inventory.set_data(invid, slot, "description", description)
end
------------------------------------------------
------------------- Events ---------------------
------------------------------------------------