The International Simutrans Forum

Development => Scripting Scenarios and AI => Topic started by: Yona-TYT on March 08, 2020, 12:43:40 AM

Title: Function to know if the transformer is electrified
Post by: Yona-TYT on March 08, 2020, 12:43:40 AM


Hello how are you doing?.
Some time ago, in the tutorial script I found this problem difficult to solve. -> https://forum.simutrans.com/index.php/topic,19272.0.html
Because of that, I suppose it is easier to determine if a transformer is electrified and thus fix this inconvenience.

Regards !.
Title: Re: Function to know if the transformer is electrified
Post by: prissi on March 08, 2020, 03:17:51 AM
Unless current is flowing, there is no sure way to know, if a transformer is electrified. (You could check all the lines and find of a source is connected to the grid.) But currently the grid does not know if it is made up entirely of transformers and no power stations or not.
Title: Re: Function to know if the transformer is electrified
Post by: Yona-TYT on March 09, 2020, 03:11:07 AM
Quote from: prissi on March 08, 2020, 03:17:51 AM
Unless current is flowing, there is no sure way to know, if a transformer is electrified. (You could check all the lines and find of a source is connected to the grid.) But currently the grid does not know if it is made up entirely of transformers and no power stations or not.
I see, although it is strange that a transformer does not show the available energy.


The only option I have is to use the consumption values in the factories, but this is not working well I fear.  :(