From f019f4ae4591071c78f6b13e3f34b519c72f2cc7 Mon Sep 17 00:00:00 2001 From: PrairieWind Date: Wed, 10 May 2023 15:05:11 -0600 Subject: [PATCH] Lightning rod param2 is now saved upon being struck --- mods/ITEMS/mcl_lightning_rods/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_lightning_rods/init.lua b/mods/ITEMS/mcl_lightning_rods/init.lua index 82e04db0cb..3cd2dc1dc9 100644 --- a/mods/ITEMS/mcl_lightning_rods/init.lua +++ b/mods/ITEMS/mcl_lightning_rods/init.lua @@ -82,7 +82,7 @@ rod_def_a.on_timer = function(pos, elapsed) local node = minetest.get_node(pos) if node.name == "mcl_lightning_rods:rod_powered" then --has not been dug - minetest.set_node(pos, { name = "mcl_lightning_rods:rod" }) + minetest.set_node(pos, { name = "mcl_lightning_rods:rod", param2 = node.param2 }) mesecon.receptor_off(pos, mesecon.rules.alldirs) end @@ -99,7 +99,7 @@ lightning.register_on_strike(function(pos, pos2, objects) local node = minetest.get_node(lr) if node.name == "mcl_lightning_rods:rod" then - minetest.set_node(lr, { name = "mcl_lightning_rods:rod_powered" }) + minetest.set_node(lr, { name = "mcl_lightning_rods:rod_powered", param2 = node.param2 }) mesecon.receptor_on(lr, mesecon.rules.alldirs) minetest.get_node_timer(lr):start(0.4) end