Fix sequencer bugs
This commit is contained in:
parent
46aa567ef4
commit
c1542a48d1
@ -102,7 +102,7 @@ for _, size in ipairs(SIZES) do
|
|||||||
physical = false,
|
physical = false,
|
||||||
collide_with_objects = false,
|
collide_with_objects = false,
|
||||||
pointable = false,
|
pointable = false,
|
||||||
static_save = true,
|
static_save = false,
|
||||||
visual_size = {x = size, y = 0.05, z = 0.05},
|
visual_size = {x = size, y = 0.05, z = 0.05},
|
||||||
glow = 14,
|
glow = 14,
|
||||||
shaded = true,
|
shaded = true,
|
||||||
|
@ -86,8 +86,8 @@ local function on_timer(pos,elapsed)
|
|||||||
|
|
||||||
if nvm.idx > #nvm.poll_numbers then
|
if nvm.idx > #nvm.poll_numbers then
|
||||||
nvm.idx = 1
|
nvm.idx = 1
|
||||||
send_event(nvm, meta)
|
|
||||||
if nvm.stored_state ~= nvm.common_state then
|
if nvm.stored_state ~= nvm.common_state then
|
||||||
|
send_event(nvm, meta)
|
||||||
local own_number = meta:get_string("own_number")
|
local own_number = meta:get_string("own_number")
|
||||||
meta:set_string("infotext", S("TA4 State Collector").." "..own_number..': "'..lStates[nvm.common_state]..'"')
|
meta:set_string("infotext", S("TA4 State Collector").." "..own_number..': "'..lStates[nvm.common_state]..'"')
|
||||||
nvm.stored_state = nvm.common_state
|
nvm.stored_state = nvm.common_state
|
||||||
|
@ -114,6 +114,9 @@ local function check_rules(pos, elapsed)
|
|||||||
nvm.index = get_next_slot(nvm.index, nvm.rules, nvm.endless)
|
nvm.index = get_next_slot(nvm.index, nvm.rules, nvm.endless)
|
||||||
if nvm.index ~= nil and offs ~= nil and nvm.running then
|
if nvm.index ~= nil and offs ~= nil and nvm.running then
|
||||||
-- after the last rule a pause with 1 or more sec is required
|
-- after the last rule a pause with 1 or more sec is required
|
||||||
|
if nvm.index == 1 and offs < 1 then
|
||||||
|
offs = 1
|
||||||
|
end
|
||||||
if offs > 0 then
|
if offs > 0 then
|
||||||
-- we can't restart the timer within the function om_timer
|
-- we can't restart the timer within the function om_timer
|
||||||
minetest.after(0, restart_timer, pos, offs)
|
minetest.after(0, restart_timer, pos, offs)
|
||||||
|
@ -270,7 +270,7 @@ minetest.register_craft({
|
|||||||
output = "techage:ta4_sequencer",
|
output = "techage:ta4_sequencer",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"default:steel_ingot", "dye:blue", "default:steel_ingot"},
|
{"default:steel_ingot", "dye:blue", "default:steel_ingot"},
|
||||||
{"techage:ta4_ramchip", "default:mese_crystal", "techage:wlanchip"},
|
{"techage:ta4_ramchip", "default:mese_crystal", "techage:ta4_wlanchip"},
|
||||||
{"techage:aluminum", "group:wood", "techage:aluminum"},
|
{"techage:aluminum", "group:wood", "techage:aluminum"},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user