The International Simutrans Forum

 

Author Topic: Function to know if the transformer is electrified  (Read 750 times)

0 Members and 1 Guest are viewing this topic.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1822
    • Simutrans-BLOG
  • Languages: ES
Function to know if the transformer is electrified
« 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 !.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 11055
  • Languages: De,EN,JP
Re: Function to know if the transformer is electrified
« Reply #1 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.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1822
    • Simutrans-BLOG
  • Languages: ES
Re: Function to know if the transformer is electrified
« Reply #2 on: March 09, 2020, 03:11:07 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.  :(