The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Flemmbrav on May 24, 2018, 10:12:21 AM

Title: Bug in shortened .dats
Post by: Flemmbrav on May 24, 2018, 10:12:21 AM
weird thing, this is the bug:

The following code DOES work:

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:

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.
Title: Re: Bug in shortened .dats
Post by: Dwachs 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.
Title: Re: Bug in shortened .dats
Post by: Flemmbrav on May 25, 2018, 08:21:26 AM
Thanks a lot!
Would you mind sending me a windows version of that one?
Title: Re: Bug in shortened .dats
Post by: Dwachs 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.
Title: Re: Bug in shortened .dats
Post by: Flemmbrav on May 27, 2018, 02:33:36 PM
Does work, thank you very much for your effort!
Title: Re: Bug in shortened .dats
Post by: Dwachs on May 27, 2018, 02:49:53 PM
thanks for reporting back :)