From dd985c9a808f9c832ff215a1d316e186f242cd19 Mon Sep 17 00:00:00 2001 From: Alexander Weber Date: Mon, 23 Apr 2018 20:27:03 +0200 Subject: [PATCH] use swap_node instead of add_node --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 2d24113..5c0f149 100644 --- a/init.lua +++ b/init.lua @@ -21,7 +21,7 @@ local trampoline_punch = function(pos, node) local id = string.sub(node.name, #node.name) if id < "6" then id = id + 1 - minetest.add_node(pos, {name = string.sub(node.name, 1, #node.name - 1)..id}) + minetest.swap_node(pos, {name = string.sub(node.name, 1, #node.name - 1)..id}) minetest.get_meta(pos):set_string("infotext", "Bouncy Level: "..id) end end @@ -30,7 +30,7 @@ local power_decrease = function(pos, node) local id = string.sub(node.name, #node.name) if id > "1" then id = id - 1 - minetest.add_node(pos, {name = string.sub(node.name, 1, #node.name - 1)..id}) + minetest.swap_node(pos, {name = string.sub(node.name, 1, #node.name - 1)..id}) minetest.get_meta(pos):set_string("infotext", "Bouncy Level: "..id) end end