The International Simutrans Forum

 

Author Topic: [r6656] Capacity of station is not correct  (Read 1672 times)

0 Members and 1 Guest are viewing this topic.

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
[r6656] Capacity of station is not correct
« on: August 26, 2013, 10:17:49 AM »
Station capacity is still hardcoded in haltestelle_t::add_to_station_typ.

Code: [Select]
if(besch) {
// enabled the matching types
enables |= besch->get_enabled();
if (welt->get_settings().is_separate_halt_capacities()) {
if(besch->get_enabled()&1) {
capacity[0] += besch->get_level()*32;
}
if(besch->get_enabled()&2) {
capacity[1] += besch->get_level()*32;
}
if(besch->get_enabled()&4) {
capacity[2] += besch->get_level()*32;
}
}
else {
// no sperate capacities: sum up all
capacity[0] += besch->get_level()*32;
capacity[2] = capacity[1] = capacity[0];
}
}

Additionally, cost of removal station and cost of upgrade station may still refer to building level.

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: [r6656] Capacity of station is not correct
« Reply #1 on: August 26, 2013, 10:30:55 AM »
Will look into capacity later. Removal cost has always been fixed not dependent on level let alone price/capacity.

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: [r6656] Capacity of station is not correct
« Reply #2 on: August 26, 2013, 07:45:44 PM »
BTW, do you think station level is still meaningfull ?

Currently, tool menu order is sorted by level. (See compare_station_besch())
Additionary, upgrade/downgrade station is depend on level. (See wkz_station_aux())

But now, capacity is not related to level.
Should these level above replaced by capacity, or should not ?
How should pak developers treat station level ?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9586
  • Languages: De,EN,JP
Re: [r6656] Capacity of station is not correct
« Reply #3 on: August 26, 2013, 08:47:35 PM »
I think this code still is another construction area due to an "aparently easy patch". Thank you very much fpr spotting this out.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5560
  • Languages: EN, NO
Re: [r6656] Capacity of station is not correct
« Reply #4 on: August 27, 2013, 04:42:14 AM »
Upgrade/downgrade had capacity in mind when it was implemented, so that one should use capacity. For arrangement in toolbar, I would prefer something that kept related buildings together. Internal names is an easy and flexible way to do this, but requires that all pak sets adapt, and that is not a small thing to ask for.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: [r6656] Capacity of station is not correct
« Reply #5 on: August 30, 2013, 09:23:50 PM »
there could be a few sorting options, selectable via menuconf.tab

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9586
  • Languages: De,EN,JP
Re: [r6656] Capacity of station is not correct
« Reply #6 on: September 07, 2013, 10:01:45 PM »
Sorting is now hopefully also fixed.