Use mcl_redstone.swap_node in daylight detector

This commit is contained in:
Elias Åström 2024-10-26 11:39:18 +02:00 committed by cora
parent ab1ed3036a
commit 1c8a001c1c

View File

@ -7,7 +7,7 @@ local toggle_inverted = {
} }
local function update_detector(pos) local function update_detector(pos)
minetest.set_node(pos, { mcl_redstone.swap_node(pos, {
name = minetest.get_node(pos).name, name = minetest.get_node(pos).name,
param2 = minetest.get_natural_light(pos), param2 = minetest.get_natural_light(pos),
}) })
@ -37,7 +37,7 @@ local commdef = {
minetest.record_protection_violation(pos, protname) minetest.record_protection_violation(pos, protname)
return return
end end
mcl_redstone.swap_node(1, pos, {name = toggle_inverted[node.name], param2 = node.param2}) mcl_redstone.swap_node(pos, {name = toggle_inverted[node.name], param2 = node.param2})
end, end,
_mcl_blast_resistance = 0.2, _mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2, _mcl_hardness = 0.2,