add lbm to add smartshops to stats
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>
Thu, 10 May 2018 20:13:44 +0000 (22:13 +0200)
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>
Thu, 10 May 2018 20:13:44 +0000 (22:13 +0200)
init.lua

index 72264e5..62f9250 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -534,6 +534,14 @@ minetest.register_chatcommand("smstats", {
        end,\r
 })\r
 \r
+minetest.register_lbm({\r
+      name = "smartshop:update",\r
+      nodenames = {"smartshop:shop"}\r
+      action = function(pos, node)\r
+        smartshop.update_info(pos)        \r
+      end,\r
+})\r
+\r
 \r
 -- load itemstats\r
 local file = io.open(minetest.get_worldpath().."/smartshop_itemcounts.txt", "r")\r