Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix 1-tick pulses causing delayers to get stuck in the on state #663

Merged
merged 2 commits into from
Jan 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions mesecons_delayer/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ local def = {
sounds = mesecon.node_sound.stone,
on_blast = mesecon.on_blastnode,
drop = "mesecons_delayer:delayer_off_1",
delayer_onstate = "mesecons_delayer:delayer_on_"..tostring(i),
delayer_offstate = "mesecons_delayer:delayer_off_"..tostring(i),
}

-- Deactivated delayer definition defaults
Expand Down Expand Up @@ -93,7 +95,6 @@ local off_state = {
param2 = node.param2
})
end,
delayer_onstate = "mesecons_delayer:delayer_on_"..tostring(i),
mesecons = {
receptor =
{
Expand All @@ -103,6 +104,7 @@ local off_state = {
effector =
{
rules = delayer_get_input_rules,
action_off = delayer_deactivate,
action_on = delayer_activate
}
},
Expand Down Expand Up @@ -134,7 +136,6 @@ local on_state = {
param2 = node.param2
})
end,
delayer_offstate = "mesecons_delayer:delayer_off_"..tostring(i),
mesecons = {
receptor =
{
Expand All @@ -144,7 +145,8 @@ local on_state = {
effector =
{
rules = delayer_get_input_rules,
action_off = delayer_deactivate
action_off = delayer_deactivate,
action_on = delayer_activate
}
},
}
Expand Down