summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/init.lua b/init.lua
index 0969ead..8eb1348 100644
--- a/init.lua
+++ b/init.lua
@@ -176,9 +176,13 @@ smartshop.update_info=function(pos)
--if string.find(stuff["name" ..i],":")~=nil then
-- stuff["name" ..i]=stuff["name" ..i].split(stuff["name" ..i],":")[2]
--end
- stuff["name"..i] = core.registered_items[stuff["name"..i]].description
- stuff["buy" ..i]="(" ..stuff["buy" ..i] ..") "
- stuff["name" ..i]=stuff["name" ..i] .."\n"
+ if core.registered_items[stuff["name"..i]] then
+ stuff["name"..i] = core.registered_items[stuff["name"..i]].description
+ else
+ stuff["name"..i] = "Unknown Object"
+ end
+ stuff["buy" ..i]="(" ..stuff["buy" ..i] ..") "
+ stuff["name" ..i]=stuff["name" ..i] .."\n"
end
end
meta:set_string("infotext",