In-Development TradeDangerous: power-user trade optimizer

Nothing should ever uncheck solo or skipvend, except for the user. Checking solo and skipvend should uncheck and disable (that is, gray out in the UI) only what it overrides: 'solo' turns off 'listings' and turns on 'skipvend', meaning with '-O all,solo' everything is turned on, except for 'listings', 'shipvend', 'upvend'.

Checking listings should check and gray out item,system,station.
This is the code that determines which options are auto-enabled/disabled in the plugin:
Code:
        if self.getOption("clean"):
. . .
            self.options["all"] = True
            self.options['force'] = True
. . .
        #Select which options will be updated
        if self.getOption("listings"):
            self.options["item"] = True
            self.options["station"] = True

        if self.getOption("shipvend"):
            self.options["ship"] = True
            self.options["station"] = True

        if self.getOption("upvend"):
            self.options["upgrade"] = True
            self.options["station"] = True

        if self.getOption("station"):
            self.options["system"] = True

        if self.getOption("all"):
            self.options["item"] = True
            self.options["ship"] = True
            self.options["shipvend"] = True
            self.options["station"] = True
            self.options["system"] = True
            self.options["upgrade"] = True
            self.options["upvend"] = True
            self.options["listings"] = True

        if self.getOption("solo"):
            self.options["listings"] = False
            self.options["skipvend"] = True
        
        if self.getOption("skipvend"):
            self.options["shipvend"] = False
            self.options["upvend"] = False

Keep in mind, TDH2 doesn't need to actually pass the additional options, the suggestion was to provide visual assistance to the end-user as to what checking this option does without needing to actually explain it. (Which is why auto-enabled/disabled options would be both checked-if-enabled-by-other-option/unchecked-if-disabled-by-other-option and grayed out.)
 
Last edited:
Unless it's terribly inconvenient for you Mark, I will write a post into the "released" section sometime on Friday evening, up and going for the weekend. Hopefully the last of the (important) tool listing sites will be updated by then.
 
Unless it's terribly inconvenient for you Mark, I will write a post into the "released" section sometime on Friday evening, up and going for the weekend. Hopefully the last of the (important) tool listing sites will be updated by then.
No inconvenience for me although I'll be with the jousting group at Lincoln Castle from today (Friday) until late Sunday evening. Anything that comes up during that time I'll deal with on Monday.

Nothing should ever uncheck solo or skipvend, except for the user. Checking solo and skipvend should uncheck and disable (that is, gray out in the UI) only what it overrides: 'solo' turns off 'listings' and turns on 'skipvend', meaning with '-O all,solo' everything is turned on, except for 'listings', 'shipvend', 'upvend'.

Checking listings should check and gray out item,system,station.
This is the code that determines which options are auto-enabled/disabled in the plugin:
Code:
        if self.getOption("clean"):
. . .
            self.options["all"] = True
            self.options['force'] = True
. . .
        #Select which options will be updated
        if self.getOption("listings"):
            self.options["item"] = True
            self.options["station"] = True

        if self.getOption("shipvend"):
            self.options["ship"] = True
            self.options["station"] = True

        if self.getOption("upvend"):
            self.options["upgrade"] = True
            self.options["station"] = True

        if self.getOption("station"):
            self.options["system"] = True

        if self.getOption("all"):
            self.options["item"] = True
            self.options["ship"] = True
            self.options["shipvend"] = True
            self.options["station"] = True
            self.options["system"] = True
            self.options["upgrade"] = True
            self.options["upvend"] = True
            self.options["listings"] = True

        if self.getOption("solo"):
            self.options["listings"] = False
            self.options["skipvend"] = True
        
        if self.getOption("skipvend"):
            self.options["shipvend"] = False
            self.options["upvend"] = False

Keep in mind, TDH2 doesn't need to actually pass the additional options, the suggestion was to provide visual assistance to the end-user as to what checking this option does without needing to actually explain it. (Which is why auto-enabled/disabled options would be both checked-if-enabled-by-other-option/unchecked-if-disabled-by-other-option and grayed out.)
Thanks for the code for this, it does save me having to work out what the permutations are.
 
Thanks for the code for this, it does save me having to work out what the permutations are.
Forgot this bit:
Code:
        # Run 'listings' by default:
        # If no options, or if only 'progbar', 'force', 'skipvend', and/or 'fallback', 
        # have been passed, enable 'listings'.
        default = True
        for option in self.options:
            if not ((option == 'force') or (option == 'fallback') or (option == 'skipvend') or (option == 'progbar')):
                default = False
        if default:
            self.options["listings"] = True
 
Would you find it helpful for me to include TDH in my release announcement or do you prefer to have your own thread?

I can see the advantage of the combined thread, as it's been working well for us here in development, but equally TDH is your project so only right that you make the call on this one.
 
Would you find it helpful for me to include TDH in my release announcement or do you prefer to have your own thread?

I can see the advantage of the combined thread, as it's been working well for us here in development, but equally TDH is your project so only right that you make the call on this one.
Combined is fine.
 
Top Bottom