mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-07-03 16:10:26 +02:00
Merge two conditions into one
This commit is contained in:
@ -383,8 +383,7 @@ local function find_light_update_conductors()
|
|||||||
local checked = {}
|
local checked = {}
|
||||||
for name, def in pairs(minetest.registered_nodes) do
|
for name, def in pairs(minetest.registered_nodes) do
|
||||||
local conductor = mesecon.get_conductor(name)
|
local conductor = mesecon.get_conductor(name)
|
||||||
if conductor then
|
if conductor and not checked[name] then
|
||||||
if not checked[name] then
|
|
||||||
-- Find the other states of the conductor besides the current one.
|
-- Find the other states of the conductor besides the current one.
|
||||||
local other_states
|
local other_states
|
||||||
if conductor.onstate then
|
if conductor.onstate then
|
||||||
@ -415,7 +414,6 @@ local function find_light_update_conductors()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
-- This is the callback for swap_node_force in turnon and turnoff. It determines
|
-- This is the callback for swap_node_force in turnon and turnoff. It determines
|
||||||
-- whether a conductor node necessitates a lighting update.
|
-- whether a conductor node necessitates a lighting update.
|
||||||
|
Reference in New Issue
Block a user