Uh oh!
There was an error while loading. Please reload this page.
Make detector tube use globalstep instead of core.after - #175
Conversation
SwissalpS
commented
Nov 16, 2025
See #65 |
S-S-X
commented
Nov 16, 2025
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. |
Watilin
commented
Nov 17, 2025
Given that
I took inspiration from default's furnace, using |
SwissalpS
commented
Nov 17, 2025
+1 for clean code layout |
S-S-X
commented
Nov 17, 2025
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,
|
Watilin
commented
Nov 18, 2025
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 |
Watilin
commented
Nov 23, 2025
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? |
Watilin
commented
Nov 28, 2025
Since nobody replied to my previous comment, i went for the fastest route and copy-pasted mesecons code, with minor modification. |
Uh oh!
There was an error while loading. Please reload this page.
SwissalpS
commented
Nov 29, 2025
I'd have used modstorage instead of file. Saves quite some LOC and saving on time is handled by core. |
Watilin
commented
Nov 29, 2025
Ok so there is a preferred way to do this. I wonder why mesecons chose another way. |
SwissalpS
commented
Nov 30, 2025
Most probably because [mesecons] predates modstorage ;) |
d77d079 to
a30a46eCompareWatilin
commented
Dec 1, 2025
This is all done, tested and ready for review. Be aware though that this PR depends on #179 being merged beforehand. |
Detector tubes sometimes fail to turn off when the server is restarted (and possibly other circumstances). This PR changes them to use
a node timerglobalstepinstead ofcore.after, to make them more reliable.