News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Behaviour of zero capacity stations.

Started by Leartin, December 07, 2017, 05:34:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Leartin

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 >
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.

Isaac Eiland-Hall


Dwachs

The suggestion sounds sensible.

At most 7 bits needs to be changed ...
Parsley, sage, rosemary, and maggikraut.