mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-29 22:33:21 -07:00
Add back LogicRules as an invisible option, to not break old yamls
This commit is contained in:
@@ -9,7 +9,7 @@ from .regions import tunic_regions
|
||||
from .er_scripts import create_er_regions
|
||||
from .er_data import portal_mapping
|
||||
from .options import (TunicOptions, EntranceRando, tunic_option_groups, tunic_option_presets, TunicPlandoConnections,
|
||||
LaurelsLocation)
|
||||
LaurelsLocation, LogicRules, LaurelsZips, IceGrappling, LadderStorage)
|
||||
from worlds.AutoWorld import WebWorld, World
|
||||
from Options import PlandoConnection
|
||||
from decimal import Decimal, ROUND_HALF_UP
|
||||
@@ -83,6 +83,12 @@ class TunicWorld(World):
|
||||
shop_num: int = 1 # need to make it so that you can walk out of shops, but also that they aren't all connected
|
||||
|
||||
def generate_early(self) -> None:
|
||||
if self.options.logic_rules >= LogicRules.option_no_major_glitches:
|
||||
self.options.laurels_zips.value = LaurelsZips.option_true
|
||||
self.options.ice_grappling.value = IceGrappling.option_medium
|
||||
if self.options.logic_rules.value == LogicRules.option_unrestricted:
|
||||
self.options.ladder_storage.value = LadderStorage.option_medium
|
||||
|
||||
if self.options.plando_connections:
|
||||
for index, cxn in enumerate(self.options.plando_connections):
|
||||
# making shops second to simplify other things later
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import Dict, Any
|
||||
from Options import (DefaultOnToggle, Toggle, StartInventoryPool, Choice, Range, TextChoice, PlandoConnections,
|
||||
PerGameCommonOptions, OptionGroup, Removed)
|
||||
PerGameCommonOptions, OptionGroup, Visibility)
|
||||
from .er_data import portal_mapping
|
||||
|
||||
|
||||
@@ -240,6 +240,24 @@ class LadderStorageWithoutItems(Toggle):
|
||||
display_name = "Ladder Storage without Items"
|
||||
|
||||
|
||||
class LogicRules(Choice):
|
||||
"""
|
||||
This option has been superseded by the individual trick options.
|
||||
If set to nmg, it will set Ice Grappling to medium and Laurels Zips on.
|
||||
If set to ur, it will do nmg as well as set Ladder Storage to medium.
|
||||
It is here to avoid breaking old yamls, and will be removed at a later date.
|
||||
"""
|
||||
visibility = Visibility.none
|
||||
internal_name = "logic_rules"
|
||||
display_name = "Logic Rules"
|
||||
option_restricted = 0
|
||||
option_no_major_glitches = 1
|
||||
alias_nmg = 1
|
||||
option_unrestricted = 2
|
||||
alias_ur = 2
|
||||
default = 0
|
||||
|
||||
|
||||
@dataclass
|
||||
class TunicOptions(PerGameCommonOptions):
|
||||
start_inventory_from_pool: StartInventoryPool
|
||||
@@ -264,7 +282,7 @@ class TunicOptions(PerGameCommonOptions):
|
||||
ladder_storage_without_items: LadderStorageWithoutItems
|
||||
plando_connections: TunicPlandoConnections
|
||||
|
||||
logic_rules: Removed
|
||||
logic_rules: LogicRules
|
||||
|
||||
|
||||
tunic_option_groups = [
|
||||
|
||||
Reference in New Issue
Block a user