You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd support that idea. Honestly, it sounds like a lot of fun!
Hm, I think it'd be required to first implement multiple trains being able to exist on the same rail network (I've never really tested that with this project). Then there would need to be some sort of concept of "blocks" of track, and the ability to determine if there's a train within a block. Then signals could probably be added to have effects 🤔
Then there would need to be some sort of concept of "blocks" of track, and the ability to determine if there's a train within a block.
Each track object already is a block, only when 2 "simple" tracks are linked without a switch would it mean you need to handle some special "joining" the two (or more) paths into a single block. Each switch would separate (at least) two blocks.
Iterate Tracks
Call method Track.add_to_block(None)
If track has block: return
Create new block if argument was None
Add current track to array inside of block
Check if head has track or switch
if a switch, skip
if track call `Track.add_to_block(self.block)
same for tail connection
As for finding if a train is inside a block:
From switch -> head/left_track/right_track -> block -> loop tracks -> track.get_children() (like you do in _has_bogies_on))
Any chance we could get a native implementation of signals/chain signals?
The text was updated successfully, but these errors were encountered: