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
def __init__(self) -> None: self.Options = [] self.ArtifactOptionMap = {} self.FlashNameOptionMap = {} for manu in ALL_MANUFACTURERS: canBeShown = (IS_BL2 and manu.InBL2) or (not IS_BL2 and manu.InTPS) option = OptionsWrapper.Boolean( Caption=manu.Name, Description=f"Should you be able to equip {manu.Name} items.", StartingValue=True, IsHidden=not canBeShown, Choices=self.AllowChoices) self.Options.append(option) # Just to prevent bandit and scav from overwriting each other if canBeShown: if manu.Artifact is not None: self.ArtifactOptionMap[manu.Artifact] = option self.FlashNameOptionMap[manu.FlashLabelName] = option self.AllegianceRelicsOption = OptionsWrapper.Boolean( Caption="Allegiance Relics", Description= ("Should you be able to equip allegiance relics. You will only be able to equip ones" " that boost manufacturers you're already allowed to equip."), StartingValue=False, IsHidden=not IS_BL2, Choices=self.AllowChoices) self.ItemsOption = OptionsWrapper.Boolean( Caption="Always Allow Items", Description="Let items be equipped regardless of manufacturer.", StartingValue=False) self.Options.append(self.AllegianceRelicsOption) self.Options.append(self.ItemsOption)
def __init__(self) -> None: self.Options = [] self.RarityOptionMap = {} for rarity in ALL_RARITIES: canBeShown = (IS_BL2 and rarity.InBL2) or (not IS_BL2 and rarity.InTPS) option = OptionsWrapper.Boolean( Caption=rarity.Name, Description=f"Should you be able to equip {rarity.Name} items.", StartingValue=True, IsHidden=not canBeShown, Choices=self.AllowChoices) self.Options.append(option) # Just to prevent seraph/glitch from overwriting each other if canBeShown: self.RarityOptionMap[rarity.Value] = option
def __init__(self) -> None: self.Options = [] self.WeaponOptionMap = {} self.ItemOptionMap = {} for type in ALL_WEAPON_TYPES + ALL_ITEM_TYPES: canBeShown = (IS_BL2 and type.InBL2) or (not IS_BL2 and type.InTPS) option = OptionsWrapper.Boolean( Caption=type.Name, Description=f"Should you be able to equip {type.Name}.", StartingValue=True, IsHidden=not canBeShown, Choices=self.AllowChoices) self.Options.append(option) # Just to prevent relics/oz kits from overwriting each other if canBeShown: if isinstance(type, WeaponType): self.WeaponOptionMap[type.Value] = option else: self.ItemOptionMap[type.Class] = option