The International Simutrans Forum

 

Author Topic: Simuconf dupes  (Read 246 times)

0 Members and 1 Guest are viewing this topic.

Offline Freahk

  • Devotee
  • *
  • Posts: 1504
  • Languages: DE, EN
Simuconf dupes
« 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
Code: [Select]
cat ./simuconf.tab | perl -n -e '/^ *([^#].*) *=/ && print $1."\n"' | sort | uniq -cdWhich 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.
« Last Edit: May 02, 2021, 03:21:24 PM by Freahk »

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20774
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simuconf dupes
« Reply #1 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?

Offline Freahk

  • Devotee
  • *
  • Posts: 1504
  • Languages: DE, EN
Re: Simuconf dupes
« Reply #2 on: May 29, 2021, 11:37:54 PM »
Of course this relates to dupes within the exact same file only.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20774
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simuconf dupes
« Reply #3 on: May 30, 2021, 09:45:45 AM »
Of course this relates to dupes within the exact same file only.

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