News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

[BUG] one_train_staff triggering twice on stations

Started by Mariculous, January 18, 2020, 07:51:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mariculous

What happened?
When the exit of a one_train_staff block is at a platform, the cabinet will be triggered twice.

How to reproduce?
1. Load the reproduction save, I have already set up both cases using absolute block there, but it works exactly the same with at least tcb.
2. Observe the trains

Observations (first case):
- The train enter one_train_staff at the cabinet, when it departs the platform.
- The train will properly move towards the dead-end, reverse and move towards the first platform in the loop.
- The train will switch to drive_by_sight, as soon as entering the cabinet controlled tile, creating a reservation for the whole next block
- At departure, the train will switch to one_train_staff working method again.

I would not expect the train creating the reservation when switching to drive_by_sight nor would I expect it to trigger the cabinet on departure in this case.

jamespetts

This is a very singular reproduction case: it will only work where there is a station of exactly one tile in length exactly on the exit point of a one train staff section. This is quite difficult to solve, as many state data are lost when a train stops at a station, so it is very difficult in this case for the train to detect whether it is entering or exiting a one train staff section.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Mariculous

Might be not that singular. See the attached save.

What about considering the staffs direction? In drive direction it will pickup, in the other it will return. That's how most ppl on stephenson-siemens use it.

jamespetts

Quote from: Freahk on January 18, 2020, 09:05:46 PM
Might be not that singular. See the attached save.

What about considering the staffs direction? In drive direction it will pickup, in the other it will return. That's how most ppl on stephenson-siemens use it.

I wonderd about the direction - but the trouble is this: players would generally expect a signal/sign/cabinet to interact with a train only if it is facing in the direction in which the train is travelling. In this case, it would be facing forwards both for picking up and setting down. Expecting players to know that they should place the cabinet backwards is so subtle as to be almost impossible for anyone to understand without having been explicitly told, and even then it is likely to be hard to remember.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Mariculous

In that case maybe an adjacent end of signaling sign or any signal should be the way to leave one train staff?
I could not find much about it in the web but I would not expect there had beeen a pickup cab and a seperate return cab was there?

Given this assumption, automatically returning the token once the train entered a tile adjacent to it would be the preferred way to go, but I fear that would be a near rewrite of one train staff, so what about the end of signalling sign?

jamespetts

Any change of this sort would require a very major rewrite.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.