The International Simutrans Forum

 

Author Topic: Bug in shortened .dats  (Read 304 times)

0 Members and 1 Guest are viewing this topic.

Offline Flemmbrav

  • *
  • Posts: 111
  • Languages: DE, EN
Bug in shortened .dats
« on: May 24, 2018, 10:12:21 AM »
weird thing, this is the bug:

The following code DOES work:
Code: [Select]
FreightImage[0][E,S,NW,SW,W,N,SE,NE]=./image/Kohlewagen6.1.<$0>
FreightImage[1][E,S,NW,SW,W,N,SE,NE]=./image/Kohlewagen6.2.<$0>
FreightImage[2][E,S,NW,SW,W,N,SE,NE]=./image/Kohlewagen6.3.<$0>
FreightImage[3][E,S,NW,SW,W,N,SE,NE]=./image/Kohlewagen6.4.<$0>
FreightImage[4][E,S,NW,SW,W,N,SE,NE]=./image/Kohlewagen6.5.<$0>

But this one does NOT work:
Code: [Select]
FreightImage[0-4][E,S,NW,SW,W,N,SE,NE]=./image/Kohlewagen6.<$0+1>.<$1>
I don't really see what the difference between both expressions is. Is it possible it that there is no implementation of the dat shortening for freight images? Or am I just too dumb to write a dat? ^^

So what happens is that the vehicle will get pak-ed, but the freight images will not appear ingame, the vehicle will look like it is not loaded all the time, even tho it carries freight.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4454
  • Languages: EN, DE, AT
Re: Bug in shortened .dats
« Reply #1 on: May 24, 2018, 07:58:00 PM »
Parameter expansion of ribis only worked in the first parameter position. With r8459 this should work also for all other positions.

Offline Flemmbrav

  • *
  • Posts: 111
  • Languages: DE, EN
Re: Bug in shortened .dats
« Reply #2 on: May 25, 2018, 08:21:26 AM »
Thanks a lot!
Would you mind sending me a windows version of that one?

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4454
  • Languages: EN, DE, AT
Re: Bug in shortened .dats
« Reply #3 on: May 25, 2018, 08:55:28 AM »
Here is a makeobje exe: https://ufile.io/ajwrv

Compiled on linux, so I could not test it.

Offline Flemmbrav

  • *
  • Posts: 111
  • Languages: DE, EN
Re: Bug in shortened .dats
« Reply #4 on: May 27, 2018, 02:33:36 PM »
Does work, thank you very much for your effort!

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4454
  • Languages: EN, DE, AT
Re: Bug in shortened .dats
« Reply #5 on: May 27, 2018, 02:49:53 PM »
thanks for reporting back :)