News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Simuconf dupes

Started by Sirius, May 02, 2021, 03:04:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sirius

I just threw a quick and dirty dupe searching script at simuconf.tab and found the following redefinition/overrides of parameters:
      3 intro_month[106][1]
      2 intro_month[107][1]
      2 intro_month[109][2]
      2 intro_month[26][0]
      2 intro_month[55][1]
      2 intro_month[82][4]
      3 intro_year[106][1]
      2 intro_year[107][1]
      2 intro_year[109][2]
      2 intro_year[26][0]
      2 intro_year[55][1]
      3 livery[106][1]
      2 livery[107][1]
      2 livery[109][2]
      2 livery[26][0]
      2 livery[55][1]
      2 livery_scheme[26]
      2 retire_month[26]
      2 retire_year[26]
      2 use_timeline

I don't know the livery system quite well so I am not sure which values are intended and which are not, but reassigning the same variable in simuconf like a potential bug to me.

For reference: The command pipeline I used is cat ./simuconf.tab | perl -n -e '/^ *([^#].*) *=/ && print $1."\n"' | sort | uniq -cd
Which basically means we like cats, ignore comments and lines without any equals and print out the part left from the equals.
Then pick dupes and count the number of occourences.

jamespetts

Thank you for this. I should note that simuconf.tab is intended to work in a way that allows for duplication, i.e., pakset settings overriding base settings; can I check that these duplicates are outside this category?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Sirius

Of course this relates to dupes within the exact same file only.

jamespetts

Quote from: Freahk on May 29, 2021, 11:37:54 PM
Of course this relates to dupes within the exact same file only.

That is helpful - thank you. I have now addressed these.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.