summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2020-05-13 01:15:05 +0200
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2020-05-13 01:15:05 +0200
commitc2ea3337f40a3a0248b6f0fe089990304a9d1e55 (patch)
tree794c2d99ec8946738c1f10be1da9289f5c4adebc
parentdfa5c06cec0e95f47c74fd00951244a1aefe5c17 (diff)
downloadsmartshop-c2ea3337f40a3a0248b6f0fe089990304a9d1e55.tar.gz
smartshop-c2ea3337f40a3a0248b6f0fe089990304a9d1e55.tar.bz2
smartshop-c2ea3337f40a3a0248b6f0fe089990304a9d1e55.zip
refresh entities on rightclick
-rw-r--r--init.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 746a28a..b2abcd5 100644
--- a/init.lua
+++ b/init.lua
@@ -446,6 +446,7 @@ on_construct = function(pos)
meta:set_int("ghost", 1)
end,
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
+ smartshop.update(pos, "update")
smartshop.showform(pos,player)
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
@@ -614,6 +615,7 @@ if false then -- This lbm is used to add pre-update smartshops to the price data
})
end
+
-- load itemstats
local file = io.open(minetest.get_worldpath().."/smartshop_itemcounts.txt", "r")
if file then