mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-11-14 14:20:33 +01:00
swap if/else statement
This commit is contained in:
parent
322128acfc
commit
f163d441ad
|
@ -283,12 +283,12 @@ local function get_interrupt(pos, itbl, send_warning)
|
|||
local msg_ser = minetest.serialize(iid)
|
||||
if #msg_ser <= mesecon.setting("luacontroller_interruptid_maxlen", 256) then
|
||||
if mesecon.setting("luacontroller_nodetimer", false) then
|
||||
-- use global action queue
|
||||
mesecon.queue:add_action(pos, "lc_interrupt", {luac_id, iid}, time, iid, 1)
|
||||
else
|
||||
-- use node timer
|
||||
minetest.get_meta(pos):set_string("iid", iid)
|
||||
minetest.get_node_timer(pos):start(time)
|
||||
else
|
||||
-- use global action queue
|
||||
mesecon.queue:add_action(pos, "lc_interrupt", {luac_id, iid}, time, iid, 1)
|
||||
end
|
||||
else
|
||||
send_warning("An interrupt ID was too large!")
|
||||
|
|
Loading…
Reference in New Issue
Block a user