The International Simutrans Forum

Simutrans Extended => Pak128.Britain-Ex Bug Reports => Pak128.Britain-Ex => Simutrans-Extended paksets => Pak128.Britain-Ex closed bug reports => Topic started by: Mariculous on May 02, 2021, 03:04:51 PM

Title: Simuconf dupes
Post by: Mariculous on May 02, 2021, 03:04:51 PM
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.
Title: Re: Simuconf dupes
Post by: jamespetts on May 29, 2021, 10:57:14 AM
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?
Title: Re: Simuconf dupes
Post by: Mariculous on May 29, 2021, 11:37:54 PM
Of course this relates to dupes within the exact same file only.
Title: Re: Simuconf dupes
Post by: jamespetts on May 30, 2021, 09:45:45 AM
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.