Author Topic: All info in signal window  (Read 6307 times)

0 Members and 1 Guest are viewing this topic.

Offline fam621

Re: All info in signal window
« Reply #105 on: April 10, 2017, 06:43:27 PM »
I simply thought it was incorporated into the pakset (pak128.Britain-Ex) its self.

Offline Ves

Re: All info in signal window
« Reply #106 on: April 21, 2017, 05:45:23 PM »
I realized that in some cases the signal state would show as "unknown" instead of the actual state. I investigated a bit and found that a normal permissive three aspect signal would not only use the states "clear=1" and "caution=2" but also "clear_no_choose=5" (and maybe even "caution_no_choose=6"). I just accidentally saw it and it appears to randomly use the .._no_choose state. Is there a reason for this or is it just 'randomnes' in the code? Im not saying it is a problem, I am just curios :)

Here is a correction to it anyway:
https://github.com/VictorErik/Simutrans-Experimental-Ves/commits/signal-in-infowindow-2
« Last Edit: April 21, 2017, 05:57:41 PM by Ves »

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15016
  • Total likes: 338
  • Helpful: 149
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: All info in signal window
« Reply #107 on: April 22, 2017, 12:15:57 AM »
Splendid, thank you. Now incorporated.
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.

Offline Ves

Re: All info in signal window
« Reply #108 on: April 29, 2017, 05:53:17 PM »
Given the resent discussion about wether the signal protects a junction, I thought that would be a nice thing to display in the info window. Partly as a piece of information and also to note to people that it is a thing wether there are any junctions ahead or not.
But I have have a question:
When I specify "if (get_no_junctions_to_next_signal() == false)" and show a text if thats true, the text comes and dissapears occasionally when some trains are reserving the signal. It seems very inconsistent and unreliable, so if there is nothing more I can do, I cannot use the parameter to show the text.

How do that parameter work?

edit:
It seem to depend on wether the head of the train has reserved any junction tiles or is in fact on a junction tile.

Do you think it is possible to find out only wether there actually is a junction ahead?

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15016
  • Total likes: 338
  • Helpful: 149
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: All info in signal window
« Reply #109 on: April 29, 2017, 07:26:29 PM »
One should be careful about adding UI elements for all internal variables like this: the system was designed to work so that the variable is correct at the moment that it needs to be used, not necessarily at other times. One should be able to tell whether a signal protects a junction without looking in its information window in any event.
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.

Offline Ves

Re: All info in signal window
« Reply #110 on: April 29, 2017, 11:33:37 PM »
Ok, I see!