def __init__(self) -> None: # Hopefully I can remove this in a future SDK update self.Author += "\nVersion: " + str(self.Version) # type: ignore self.MultiplierSlider = OptionsWrapper.Slider( Caption="Multiplier", Description="The amount to multiply spawns by.", StartingValue=1, MinValue=1, MaxValue=25, Increment=1) self.SpawnLimitSpinner = OptionsWrapper.Spinner( Caption="Spawn Limit", Description=("How to handle the spawn limit." " Standard: Don't change it;" " Linear: Increase linearly with the multiplier;" " Unlimited: Remove it."), StartingChoice="Linear", Choices=("Standard", "Linear", "Unlimited"), ) self.OldMultiplier = self.MultiplierSlider.CurrentValue self.Options = [self.MultiplierSlider, self.SpawnLimitSpinner] self.CurrentPopMaster = None self.OriginalLimit = None
def SetDefaultOptions(self) -> None: self.Options = [] self.OptionsDict = {} for boolOption in self.BOOL_OPTIONS: name = boolOption[0] boolValue = boolOption[2] descrip = boolOption[1] self.Options.append( OptionsWrapper.Boolean(Caption=name, Description=descrip, StartingValue=boolValue)) self.OptionsDict[boolOption[0]] = boolOption[2] for optionCategory in self.ALL_OPTIONS: relics = optionCategory[0] == "Relic Parts" ozKits = optionCategory[0] == "Oz Kit Parts" hidden = (relics and not self.IS_BL2) or (ozKits and self.IS_BL2) self.Options.append( OptionsWrapper.Slider(Caption=optionCategory[0], Description="Category Header", StartingValue=0, MinValue=0, MaxValue=0, Increment=1, IsHidden=hidden)) for option in optionCategory[1]: name = option[0] value = int(option[2]) if ozKits: name = self.translateTPS(name, True) # Check if we have a description override descrip = "Should the part be shown in the description or not." if len(option) == 4: descrip = cast(Tuple[str, str, int, str], option)[3] self.Options.append( OptionsWrapper.Spinner(Caption=name, Description=descrip, StartingChoice=["Hidden", "Shown"][value], Choices=["Hidden", "Shown"], IsHidden=hidden)) self.OptionsDict[name] = value