The International Simutrans Forum

 

Author Topic: ST r.2038/Pak128r153: wrong pictures for waytype icons (e.g. in line management)  (Read 2555 times)

0 Members and 1 Guest are viewing this topic.

Offline whoami

  • Devotees (Inactive)
  • *
  • Posts: 693
This problem appeared somewhere between Pak128 r.122 and r.150 (I don't have the ones in between on this PC), tested with r.2038-Win-SDL on W2KP.

Edit: this seems to rather be a program bug, because there are two objects with the same name, but different type, and the wrong type is used:

This defines the image that is incorrectly displayed for the trains tab:
Code: (PAK128\!base\rail_stations\dat\RailStations.dat) [Select]
Obj=building
Name=TrainStop
copyright=Jan Polacek
type=stop
waytype=track
(...)
cursor=../images/player-station_1-128.1.4

This defines the correct image:
Code: (PAK128\!base\misc_GUI_64\dat64\symbols-64.dat) [Select]
Obj=symbol
name=TrainStop
Image[0]=> ../images64/ls-symbols.1.1

Work-around would be to rename the station (but that would break existing savegames and translations) - same for the second one, the "ShipStop".
« Last Edit: September 29, 2008, 12:24:09 AM by whoami »

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Strange. Seems to work just fine here with 2038/r158 - and there were no changes in the symbols part as far as I can tell (other than a copyright entry in r154) ...

Offline whoami

  • Devotees (Inactive)
  • *
  • Posts: 693
I guess that the effect depends on the loading sequence of objects, and that depends on pak creation and on the order of files in the pak directory. Another idea would have been a .dat error (e.g. upper-/lowercase), but the dat file hasn't changed in that regard, however, there were numerous changes to many files in Pak128, and some changes to the pak-set creation process.
« Last Edit: September 29, 2008, 12:27:57 AM by whoami »

Offline VS

  • Senior Plumber (Devotee)
  • Devotees (Inactive)
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
****. This is bad, and I wouldn't really blame program for this. Or should I? There is probably just one hash for all objects, so having objects with the same name in the first place is a mistake.

Or if objects are categorized, then it's a bug. I'll hope the situation is the latter.

Whoami: One of you can see it and the other not. I know Dirk uses the .bat from svn, how about you? If the problem can be cured in short-term by changes to how are the objects pakked, the way out should be easy.



Ah, tried it nevertheless. Rename GUI.64.pak or something like that to have underscore _ at beginning, that changes loading order and menu is fixed ;)
« Last Edit: September 29, 2008, 06:34:36 AM by VS »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10819
  • Languages: De,EN,JP
Objects have a type: Thus this should not happen as stations are buildings with name ="xyz" and anhd these are symbols with this name.

EDIT: change source, that cursor objects not at root level are ignored
« Last Edit: September 29, 2008, 11:42:24 AM by prissi »

Offline whoami

  • Devotees (Inactive)
  • *
  • Posts: 693
Fixed in ST rev.2041 (actually tested: rev.2044) (Pak128 rev.159 provided a work-around).

@VS: I use Pak128 nightly builds.