The International Simutrans Forum

 

Author Topic: Behaviour of zero capacity stations.  (Read 1461 times)

0 Members and 1 Guest are viewing this topic.

Online Leartin

  • Devotee
  • *
  • Posts: 1042
  • PAK-DEV P192C
  • Languages: DE, EN
Behaviour of zero capacity stations.
« on: December 07, 2017, 05:34:43 PM »
I created a station that enabled goods, but had no capacity. Using that station with a coal-mine and powerplant, it was still possible for the train to load (if it waited for 100%), even though it took longer than normal. At the powerplant, the train unloaded all at once. The load was never seen in the station.

So now I connected another coal-mine to the first one. If no_routing_over_overcrowded is not active, everything from the second coal mine is dumped at the first one. Station capacity completely ignored. However, if no_routing_over_overcrowded is active, it would not move as long as the first coal-mine was still active. Only if a train took out all of the first mines production and wanted more, the station would not be overcrowded for a moment and a train from the second mine started.

I think it would make sense if a zero-capacity station would always count as overcrowded. I think it could be done by changing line 2836 in simhalt.cc by using >= instead of >
Code: [Select]
if(ware_sum>=max_ware) {
status_bits |= ware_sum > max_ware + 32 /*|| enables & CROWDED*/ ? 2 : 1; // for now report only serious overcrowding on transfer stops
overcrowded[wtyp->get_index()/8] |= 1<<(wtyp->get_index()%8);
}

Essentially, a station would be overcrowded once its full, not once it's overfilled. Which makes more sense anyway, since if you wouldn't enter an overcrowded elevatory, you wouldn't enter a full elevator either, since you already know you would overcrowd it...

As for gameplay impact - as paks are now, none. However, if would allow to utilize zero-capacity-stations as pure unloading stations, which automatically disable cross-connections (coal-mine using powerplant to reach another coal mine connected to another power plant) - for the price of one extra character in the code.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3575
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Behaviour of zero capacity stations.
« Reply #1 on: December 07, 2017, 07:57:20 PM »
And that price is too much to pay! ;-)

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4460
  • Languages: EN, DE, AT
Re: Behaviour of zero capacity stations.
« Reply #2 on: December 07, 2017, 09:53:54 PM »
The suggestion sounds sensible.

At most 7 bits needs to be changed ...