-
Notifications
You must be signed in to change notification settings - Fork 27
Make detector tube use a node timer instead of core.after #175
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
base: master
Are you sure you want to change the base?
Conversation
|
See #65 |
|
Following comment is based on just a quick glance, didn't test or read change set that carefully. Considering actual game play, how this would affect behavior when node timer is paused? (when block deactivates) Of course there would be other smaller details like corner case node timer / metadata bugs, some of these would be irrelevant here while some would change behavior a bit when(if) supporting things break. Personally for me it would however be fine to ignore anything where cause would be another bug. |
Given that
I took inspiration from default's furnace, using |
|
+1 for clean code layout |
Unloaded block is different from loaded but deactivated block. Basically there's 3 states for mapblocks:
Nodetimers work when block is both loaded and activated but not when it is just loaded but not yet activated, nodetimer will get paused when block gets deactivated and continues immediately when block gets activated again. How blocks get activated and deactivated depends on player position,
|
Thanks for the explanation. That's a limitation of node timers i was unaware of. I've been able to test a situation where the detector tube is in a loaded but inactive block. One item traverses the tube and triggers its I'm gonna go back to |
|
So, Arguing that the node detector is a mesecon component, it could add its own action type in the action queue via Another solution would be to create a separate mod with the purpose of providing persistency, on which both mesecons and pipeworks would depend. I don't know if the mesecons team would be happy with that. What do you think? |
Detector tubes sometimes fail to turn off when the server is restarted (and possibly other circumstances). This PR changes them to use a node timer instead of
core.after, to make them more reliable.