From e47a2d5fa16d0e425f9b83fbb4fe0fb900402083 Mon Sep 17 00:00:00 2001 From: rnd Date: Sun, 3 May 2015 23:31:36 +0200 Subject: [PATCH] .. --- mover.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mover.lua b/mover.lua index 79b1c03..7c28d8c 100644 --- a/mover.lua +++ b/mover.lua @@ -272,8 +272,9 @@ minetest.register_node("basic_machines:keypad", { local function use_keypad(pos,name) + + local meta = minetest.get_meta(pos); if minetest.is_protected(pos, name) then meta:set_string("infotext", "Protection fail. reset."); meta:set_int("count",0) end - local meta = minetest.get_meta(pos); local count = meta:get_int("count") or 0; if count<=0 then return end; count = count - 1; meta:set_int("count",count);