mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
Merge pull request 'Lightning rod param2 is now saved upon being struck' (#3712) from lightning_rod_param_strike into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3712 Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
This commit is contained in:
commit
47e26bbfe6
1 changed files with 2 additions and 2 deletions
|
@ -82,7 +82,7 @@ rod_def_a.on_timer = function(pos, elapsed)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
|
|
||||||
if node.name == "mcl_lightning_rods:rod_powered" then --has not been dug
|
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)
|
mesecon.receptor_off(pos, mesecon.rules.alldirs)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ lightning.register_on_strike(function(pos, pos2, objects)
|
||||||
local node = minetest.get_node(lr)
|
local node = minetest.get_node(lr)
|
||||||
|
|
||||||
if node.name == "mcl_lightning_rods:rod" then
|
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)
|
mesecon.receptor_on(lr, mesecon.rules.alldirs)
|
||||||
minetest.get_node_timer(lr):start(0.4)
|
minetest.get_node_timer(lr):start(0.4)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue