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

[Bug] Some sort of update skipping weirdness #642

Open
VorTechnix opened this issue May 29, 2023 · 2 comments
Open

[Bug] Some sort of update skipping weirdness #642

VorTechnix opened this issue May 29, 2023 · 2 comments
Labels

Comments

@VorTechnix
Copy link

image
Those lights should not be powered.

image
To replicate the issue just build this setup and flip the switch on and off.

When the piston connects the wire to the diode in the same tick that the diode turns off light blocks in the circuit get set to on until the circuit is updated again. (Note: the Mese lines aren't powered though)

@Desour
Copy link
Contributor

Desour commented May 29, 2023

Can reproduce.

I've measured (with https://github.com/Desour/meseconometer) the signals (number is in server-steps, C is input (switch), B is output (lamps)):

[93.0,"C","on"],
[126.0,"C","off"],
[127.0,"B","on"],
[128.0,"B","off"],

As you can see, there's a 1-step pulse when the switch is turned off.

The issue doesn't happen when you place a diode gate between the lamp and the lamp signal.

My guess at what happens is that the wire is already off when the lightstones' action_on is called. So, when the wire goes off, the lightstone is still off and won't receive the event.

Maybe this could be fixed if we didn't differentiate between off and on effectors.

@numberZero
Copy link
Contributor

numberZero commented Jun 15, 2023

As you can see, there's a 1-step pulse when the switch is turned off.

Apparently 1-tick pulses were always problematic... see my note in #536 2.5 years ago: “<...> outputs a pulse 2 Mesecon ticks long. Sharper (1-tick) pulse is possible but while e.g. gates and movestones work well with that, lamps and pistons don’t”.

@numberZero numberZero added the bug label Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants