Fix sequencer bugs

This commit is contained in:
Joachim Stolberg 2021-10-26 21:58:28 +02:00
parent 46aa567ef4
commit c1542a48d1
4 changed files with 7 additions and 4 deletions

View File

@ -102,7 +102,7 @@ for _, size in ipairs(SIZES) do
physical = false,
collide_with_objects = false,
pointable = false,
static_save = true,
static_save = false,
visual_size = {x = size, y = 0.05, z = 0.05},
glow = 14,
shaded = true,

View File

@ -86,8 +86,8 @@ local function on_timer(pos,elapsed)
if nvm.idx > #nvm.poll_numbers then
nvm.idx = 1
send_event(nvm, meta)
if nvm.stored_state ~= nvm.common_state then
send_event(nvm, meta)
local own_number = meta:get_string("own_number")
meta:set_string("infotext", S("TA4 State Collector").." "..own_number..': "'..lStates[nvm.common_state]..'"')
nvm.stored_state = nvm.common_state

View File

@ -114,6 +114,9 @@ local function check_rules(pos, elapsed)
nvm.index = get_next_slot(nvm.index, nvm.rules, nvm.endless)
if nvm.index ~= nil and offs ~= nil and nvm.running then
-- 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
-- we can't restart the timer within the function om_timer
minetest.after(0, restart_timer, pos, offs)

View File

@ -270,8 +270,8 @@ minetest.register_craft({
output = "techage:ta4_sequencer",
recipe = {
{"default:steel_ingot", "dye:blue", "default:steel_ingot"},
{"techage:ta4_ramchip", "default:mese_crystal", "techage:wlanchip"},
{"techage:aluminum", "group:wood","techage:aluminum"},
{"techage:ta4_ramchip", "default:mese_crystal", "techage:ta4_wlanchip"},
{"techage:aluminum", "group:wood", "techage:aluminum"},
},
})