Japanese Simutrans Forum

日本語simutransフォーラム => バグレポート => 解決されたバグ => トピック開設者: z9999+ さんの発言 2011/09/09 02:16

トピック名: [r4809] 駐機場のレベルがゼロになる
投稿者: z9999+ さんの発言 2011/09/09 02:16
Level of aircraft stop and boat lamp are zero.
Their price and capacities are also zero.
トピック名: Re:[r4809] 駐機場のレベルがゼロになる
投稿者: z9999+ さんの発言 2011/09/14 04:02
Still having 2 problems.

https://github.com/aburch/simutrans/commit/4d8353542ba8279a63d0778d0f22f5bbf64a659f
引用
FIX: some buildings had level 65535 instead the probably intended zero
コード: [選択]
// correct old station buildings ...
if (besch->level > 32767 && (besch->utype >= haus_besch_t::bahnhof || besch->utype == haus_besch_t::fabrik)) {
DBG_DEBUG("building_reader_t::read_node()","old station building -> set level to 4");
besch->level = 4;
}

if (besch->level == 65535) {
besch->level = 0; // apparently wrong level
dbg->warning("building_reader_t::read_node()","level was 65535, intended was probably 0 => changed." );
}

If so, besch->level = 4 is strange. Why do you set it to 4 ? Any reason ?

Plus...

https://github.com/aburch/simutrans/commit/9f94f66fc43c9b090b7328046e7296bc77c2780d
引用
FIX: makeobj did not adjust level correctly for stations which did not enable anything
コード: [選択]
// some station thing ...
  if(  utyp==haus_besch_t::generic_extension  ||  utype==haus_besch_t::generic_stop  ||  utyp==haus_besch_t::hafen  ) {
    // since elevel was reduced by one beforehand ...
      ++level;
    }

Well, level of stops was wrong. Then, how about depots ?
Depots are also level-1. So, maintenance cost of all level 1 depots are zero.
It should be a bug, and need to be fixed, too.
トピック名: Re:[r4809] 駐機場のレベルがゼロになる
投稿者: prissi さんの発言 2011/09/18 03:22
level 4, since all stops before this system (which had zero house level) had level 4.

The depots are indeed a bug.
トピック名: Re:[r4809] 駐機場のレベルがゼロになる
投稿者: z9999+ さんの発言 2011/09/19 11:52
level 4, since all stops before this system (which had zero house level) had level 4.

I know that the capacity of old stop was 128, and that is the reason I asked you.

if (besch->level <= 0 && (besch->utype >= haus_besch_t::bahnhof || besch->utype == haus_besch_t::fabrik)) {

This old code replaced level-0-stops to level-4-stops. (But it also changed level-0-depots to level-4-depots. This was a bug.)

But you changed this code to new one. As a result, it doesn't work as you described, anymore.

if (besch->level > 32767 && (besch->utype >= haus_besch_t::bahnhof || besch->utype == haus_besch_t::fabrik)) {

This new code you wrote doesn't catch level-0-stops. And also there is no reason to change 'level > 32767' to 4.

And also, I must say.

level 4, since all stops before this system (which had zero house level) had level 4.

This is partly correct. But only stops from 88.0 to 88.02 can be level 0. Before 88.0, all stops are level 1. Of course, the capacity of both stops were the same, 128.


I attached bus stop of 88.0 and 87.02. I changed their name by using hex editor for test, but they are from original pak set.
トピック名: Re:[r4809] 駐機場のレベルがゼロになる
投稿者: prissi さんの発言 2011/09/23 04:14
Since all offending stops are version three, I moved the check to the test. Is this what you suggest?
トピック名: Re:[r4809] 駐機場のレベルがゼロになる
投稿者: z9999+ さんの発言 2011/09/24 14:59
No.