isort
This commit is contained in:
+3
-2
@@ -1,13 +1,14 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
import textwrap
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import textwrap
|
||||||
|
|
||||||
from AdjusterMain import adjust
|
from AdjusterMain import adjust
|
||||||
from Rom import get_sprite_from_name
|
from Rom import get_sprite_from_name
|
||||||
|
|
||||||
|
|
||||||
class ArgumentDefaultsHelpFormatter(argparse.RawTextHelpFormatter):
|
class ArgumentDefaultsHelpFormatter(argparse.RawTextHelpFormatter):
|
||||||
|
|
||||||
def _get_help_string(self, action):
|
def _get_help_string(self, action):
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import logging
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import bps.apply
|
import bps.apply
|
||||||
@@ -8,9 +8,9 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
raise Exception('Could not load BPS module')
|
raise Exception('Could not load BPS module')
|
||||||
|
|
||||||
from Utils import output_path
|
|
||||||
from Rom import LocalRom, apply_rom_settings
|
from Rom import LocalRom, apply_rom_settings
|
||||||
from source.tools.BPS import bps_read_vlv
|
from source.tools.BPS import bps_read_vlv
|
||||||
|
from Utils import output_path
|
||||||
|
|
||||||
|
|
||||||
def adjust(args):
|
def adjust(args):
|
||||||
|
|||||||
+11
-7
@@ -2,7 +2,7 @@ import base64
|
|||||||
import copy
|
import copy
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
from collections import OrderedDict, Counter, deque, defaultdict
|
from collections import Counter, OrderedDict, defaultdict, deque
|
||||||
from enum import Enum, IntEnum, unique
|
from enum import Enum, IntEnum, unique
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -10,14 +10,18 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
from enum import IntFlag as FastEnum
|
from enum import IntFlag as FastEnum
|
||||||
|
|
||||||
from source.classes.BabelFish import BabelFish
|
|
||||||
from Utils import int16_as_bytes
|
|
||||||
from Tables import normal_offset_table, spiral_offset_table, multiply_lookup, divisor_lookup
|
|
||||||
from RoomData import Room
|
from RoomData import Room
|
||||||
|
from source.classes.BabelFish import BabelFish
|
||||||
from source.dungeon.RoomObject import RoomObject
|
from source.dungeon.RoomObject import RoomObject
|
||||||
from source.overworld.EntranceData import door_addresses
|
from source.overworld.EntranceData import door_addresses
|
||||||
|
from Tables import (
|
||||||
from Versions import ORVersion, DRVersion, GKVersion
|
divisor_lookup,
|
||||||
|
multiply_lookup,
|
||||||
|
normal_offset_table,
|
||||||
|
spiral_offset_table,
|
||||||
|
)
|
||||||
|
from Utils import int16_as_bytes
|
||||||
|
from Versions import DRVersion, GKVersion, ORVersion
|
||||||
|
|
||||||
|
|
||||||
class World(object):
|
class World(object):
|
||||||
@@ -1672,8 +1676,8 @@ class Region(object):
|
|||||||
self.crystal_switch = False
|
self.crystal_switch = False
|
||||||
|
|
||||||
def can_reach(self, state):
|
def can_reach(self, state):
|
||||||
from Utils import stack_size3a
|
|
||||||
from DungeonGenerator import GenerationException
|
from DungeonGenerator import GenerationException
|
||||||
|
from Utils import stack_size3a
|
||||||
if stack_size3a() > self.world.players * 1000:
|
if stack_size3a() > self.world.players * 1000:
|
||||||
raise GenerationException(f'Infinite loop detected for "{self.name}" located at \'Region.can_reach\'')
|
raise GenerationException(f'Infinite loop detected for "{self.name}" located at \'Region.can_reach\'')
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import logging
|
import logging
|
||||||
import RaceRandom as random
|
|
||||||
|
|
||||||
|
import RaceRandom as random
|
||||||
from BaseClasses import Boss, FillError
|
from BaseClasses import Boss, FillError
|
||||||
from source.enemizer.Bossmizer import boss_adjust
|
from source.enemizer.Bossmizer import boss_adjust
|
||||||
|
|
||||||
|
|||||||
@@ -2,14 +2,13 @@ import argparse
|
|||||||
import copy
|
import copy
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import textwrap
|
|
||||||
import shlex
|
import shlex
|
||||||
import sys
|
import sys
|
||||||
|
import textwrap
|
||||||
|
|
||||||
from source.classes.BabelFish import BabelFish
|
from source.classes.BabelFish import BabelFish
|
||||||
|
|
||||||
from Utils import update_deprecated_args
|
|
||||||
from source.classes.CustomSettings import CustomSettings
|
from source.classes.CustomSettings import CustomSettings
|
||||||
|
from Utils import update_deprecated_args
|
||||||
|
|
||||||
|
|
||||||
class ArgumentDefaultsHelpFormatter(argparse.RawTextHelpFormatter):
|
class ArgumentDefaultsHelpFormatter(argparse.RawTextHelpFormatter):
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ from typing import List
|
|||||||
|
|
||||||
import RaceRandom as random
|
import RaceRandom as random
|
||||||
|
|
||||||
|
|
||||||
def _load_entries():
|
def _load_entries():
|
||||||
entries = []
|
entries = []
|
||||||
with open("data/damage_table.bin", 'rb') as stream:
|
with open("data/damage_table.bin", 'rb') as stream:
|
||||||
|
|||||||
+51
-16
@@ -1,27 +1,62 @@
|
|||||||
import RaceRandom as random
|
|
||||||
from collections import defaultdict, deque
|
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
from enum import unique, Flag
|
from collections import defaultdict, deque
|
||||||
from typing import DefaultDict, Dict, List
|
from enum import Flag, unique
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
|
from typing import DefaultDict, Dict, List
|
||||||
|
|
||||||
from BaseClasses import RegionType, Region, Door, DoorType, Sector, CrystalBarrier, DungeonInfo, dungeon_keys
|
import RaceRandom as random
|
||||||
from BaseClasses import PotFlags, LocationType, Direction, KeyRuleType
|
from BaseClasses import (
|
||||||
|
CrystalBarrier,
|
||||||
|
Direction,
|
||||||
|
Door,
|
||||||
|
DoorType,
|
||||||
|
DungeonInfo,
|
||||||
|
KeyRuleType,
|
||||||
|
LocationType,
|
||||||
|
PotFlags,
|
||||||
|
Region,
|
||||||
|
RegionType,
|
||||||
|
Sector,
|
||||||
|
dungeon_keys,
|
||||||
|
)
|
||||||
from Doors import reset_portals
|
from Doors import reset_portals
|
||||||
from Dungeons import dungeon_regions, region_starts, standard_starts, split_region_starts
|
from DungeonGenerator import (
|
||||||
from Dungeons import dungeon_bigs, dungeon_hints
|
ExplorationState,
|
||||||
|
connect_doors,
|
||||||
|
convert_regions,
|
||||||
|
count_reserved_locations,
|
||||||
|
create_dungeon_builders,
|
||||||
|
default_dungeon_entrances,
|
||||||
|
determine_required_paths,
|
||||||
|
drop_entrances,
|
||||||
|
dungeon_drops,
|
||||||
|
dungeon_portals,
|
||||||
|
simple_dungeon_builder,
|
||||||
|
split_dungeon_builder,
|
||||||
|
valid_region_to_explore,
|
||||||
|
)
|
||||||
|
from Dungeons import (
|
||||||
|
dungeon_bigs,
|
||||||
|
dungeon_hints,
|
||||||
|
dungeon_regions,
|
||||||
|
region_starts,
|
||||||
|
split_region_starts,
|
||||||
|
standard_starts,
|
||||||
|
)
|
||||||
from Items import ItemFactory
|
from Items import ItemFactory
|
||||||
|
from KeyDoorShuffle import (
|
||||||
|
DoorRules,
|
||||||
|
analyze_dungeon,
|
||||||
|
build_key_layout,
|
||||||
|
determine_prize_lock,
|
||||||
|
validate_bk_layout,
|
||||||
|
validate_key_layout,
|
||||||
|
)
|
||||||
from RoomData import DoorKind, PairedDoor, reset_rooms
|
from RoomData import DoorKind, PairedDoor, reset_rooms
|
||||||
from source.dungeon.DungeonStitcher import GenerationException, generate_dungeon
|
|
||||||
from source.dungeon.DungeonStitcher import ExplorationState as ExplorationState2
|
from source.dungeon.DungeonStitcher import ExplorationState as ExplorationState2
|
||||||
from DungeonGenerator import ExplorationState, convert_regions, determine_required_paths, drop_entrances
|
from source.dungeon.DungeonStitcher import GenerationException, generate_dungeon
|
||||||
from DungeonGenerator import create_dungeon_builders, split_dungeon_builder, simple_dungeon_builder, default_dungeon_entrances
|
from Utils import kth_combination, ncr
|
||||||
from DungeonGenerator import dungeon_portals, dungeon_drops, connect_doors, count_reserved_locations
|
|
||||||
from DungeonGenerator import valid_region_to_explore
|
|
||||||
from KeyDoorShuffle import analyze_dungeon, build_key_layout, validate_key_layout, determine_prize_lock
|
|
||||||
from KeyDoorShuffle import validate_bk_layout, DoorRules
|
|
||||||
from Utils import ncr, kth_combination
|
|
||||||
|
|
||||||
|
|
||||||
def link_doors(world, player):
|
def link_doors(world, player):
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
from BaseClasses import Door, DoorType, Direction, CrystalBarrier, Portal
|
from BaseClasses import CrystalBarrier, Direction, Door, DoorType, Portal
|
||||||
from RoomData import PairedDoor
|
from RoomData import PairedDoor
|
||||||
|
|
||||||
# constants
|
# constants
|
||||||
|
|||||||
+18
-8
@@ -1,22 +1,32 @@
|
|||||||
import RaceRandom as random
|
|
||||||
import collections
|
import collections
|
||||||
import itertools
|
import itertools
|
||||||
from collections import defaultdict, deque
|
|
||||||
from functools import reduce
|
|
||||||
import logging
|
import logging
|
||||||
import math
|
import math
|
||||||
import operator as op
|
import operator as op
|
||||||
import time
|
import time
|
||||||
|
from collections import defaultdict, deque
|
||||||
|
from functools import reduce
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from BaseClasses import DoorType, Direction, CrystalBarrier, RegionType, Polarity, PolSlot, flooded_keys, Sector
|
import RaceRandom as random
|
||||||
from BaseClasses import Hook, hook_from_door, Door
|
from BaseClasses import (
|
||||||
from Regions import location_events, flooded_keys_reverse
|
CrystalBarrier,
|
||||||
|
Direction,
|
||||||
|
Door,
|
||||||
|
DoorType,
|
||||||
|
Hook,
|
||||||
|
Polarity,
|
||||||
|
PolSlot,
|
||||||
|
RegionType,
|
||||||
|
Sector,
|
||||||
|
flooded_keys,
|
||||||
|
hook_from_door,
|
||||||
|
)
|
||||||
from Dungeons import split_region_starts
|
from Dungeons import split_region_starts
|
||||||
|
from Regions import flooded_keys_reverse, location_events
|
||||||
from RoomData import DoorKind
|
from RoomData import DoorKind
|
||||||
|
|
||||||
from source.dungeon.DungeonStitcher import generate_dungeon_find_proposal
|
|
||||||
from source.dungeon.DungeonStitcher import GenerationException as OtherGenException
|
from source.dungeon.DungeonStitcher import GenerationException as OtherGenException
|
||||||
|
from source.dungeon.DungeonStitcher import generate_dungeon_find_proposal
|
||||||
|
|
||||||
|
|
||||||
class GraphPiece:
|
class GraphPiece:
|
||||||
|
|||||||
@@ -3,19 +3,19 @@ if __name__ == '__main__':
|
|||||||
from source.meta.check_requirements import check_requirements
|
from source.meta.check_requirements import check_requirements
|
||||||
check_requirements(console=True)
|
check_requirements(console=True)
|
||||||
|
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
import RaceRandom as random
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from source.classes.BabelFish import BabelFish
|
import RaceRandom as random
|
||||||
import source.classes.diags as diagnostics
|
import source.classes.diags as diagnostics
|
||||||
|
from CLI import get_args_priority, parse_cli
|
||||||
from CLI import parse_cli, get_args_priority
|
|
||||||
from Main import main, EnemizerError
|
|
||||||
from Rom import get_sprite_from_name
|
|
||||||
from Utils import is_bundled, close_console
|
|
||||||
from Fill import FillError
|
from Fill import FillError
|
||||||
|
from Main import EnemizerError, main
|
||||||
|
from Rom import get_sprite_from_name
|
||||||
|
from source.classes.BabelFish import BabelFish
|
||||||
|
from Utils import close_console, is_bundled
|
||||||
|
|
||||||
|
|
||||||
def start():
|
def start():
|
||||||
args = parse_cli(None)
|
args = parse_cli(None)
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import RaceRandom as random
|
|
||||||
import collections
|
import collections
|
||||||
import itertools
|
import itertools
|
||||||
import logging
|
import logging
|
||||||
@@ -6,11 +5,18 @@ import math
|
|||||||
from collections import Counter
|
from collections import Counter
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
|
|
||||||
|
import RaceRandom as random
|
||||||
from BaseClasses import CollectionState, FillError, LocationType
|
from BaseClasses import CollectionState, FillError, LocationType
|
||||||
from Items import ItemFactory
|
from Items import ItemFactory
|
||||||
from Regions import shop_to_location_table, retro_shops
|
from Regions import retro_shops, shop_to_location_table
|
||||||
from source.item.FillUtil import filter_locations, classify_major_items, replace_trash_item, vanilla_fallback
|
from source.item.FillUtil import (
|
||||||
from source.item.FillUtil import filter_special_locations, valid_pot_items
|
classify_major_items,
|
||||||
|
filter_locations,
|
||||||
|
filter_special_locations,
|
||||||
|
replace_trash_item,
|
||||||
|
valid_pot_items,
|
||||||
|
vanilla_fallback,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_dungeon_item_pool(world):
|
def get_dungeon_item_pool(world):
|
||||||
|
|||||||
@@ -5,28 +5,40 @@ if __name__ == '__main__':
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from tkinter import Tk, Button, BOTTOM, TOP, StringVar, BooleanVar, X, BOTH, RIGHT, ttk, messagebox
|
from tkinter import (
|
||||||
|
BOTH,
|
||||||
|
BOTTOM,
|
||||||
|
RIGHT,
|
||||||
|
TOP,
|
||||||
|
BooleanVar,
|
||||||
|
Button,
|
||||||
|
StringVar,
|
||||||
|
Tk,
|
||||||
|
X,
|
||||||
|
messagebox,
|
||||||
|
ttk,
|
||||||
|
)
|
||||||
|
|
||||||
from CLI import get_args_priority
|
from CLI import get_args_priority
|
||||||
from DungeonRandomizer import parse_cli
|
from DungeonRandomizer import parse_cli
|
||||||
|
from GuiUtils import set_icon
|
||||||
|
from source.classes.BabelFish import BabelFish
|
||||||
|
from source.classes.Empty import Empty
|
||||||
from source.gui.adjust.overview import adjust_page
|
from source.gui.adjust.overview import adjust_page
|
||||||
from source.gui.startinventory.overview import startinventory_page
|
from source.gui.bottom import bottom_frame, create_guiargs
|
||||||
from source.gui.custom.overview import custom_page
|
from source.gui.custom.overview import custom_page
|
||||||
from source.gui.loadcliargs import loadcliargs, loadadjustargs
|
from source.gui.loadcliargs import loadadjustargs, loadcliargs
|
||||||
from source.gui.randomize.item import item_page
|
|
||||||
from source.gui.randomize.overworld import overworld_page
|
|
||||||
from source.gui.randomize.entrando import entrando_page
|
|
||||||
from source.gui.randomize.enemizer import enemizer_page
|
|
||||||
from source.gui.randomize.dungeon import dungeon_page
|
from source.gui.randomize.dungeon import dungeon_page
|
||||||
|
from source.gui.randomize.enemizer import enemizer_page
|
||||||
|
from source.gui.randomize.entrando import entrando_page
|
||||||
|
|
||||||
#from source.gui.randomize.multiworld import multiworld_page
|
#from source.gui.randomize.multiworld import multiworld_page
|
||||||
from source.gui.randomize.gameoptions import gameoptions_page
|
from source.gui.randomize.gameoptions import gameoptions_page
|
||||||
from source.gui.randomize.generation import generation_page
|
from source.gui.randomize.generation import generation_page
|
||||||
from source.gui.bottom import bottom_frame, create_guiargs
|
from source.gui.randomize.item import item_page
|
||||||
from GuiUtils import set_icon
|
from source.gui.randomize.overworld import overworld_page
|
||||||
from Versions import DRVersion, ORVersion, GKVersion
|
from source.gui.startinventory.overview import startinventory_page
|
||||||
|
from Versions import DRVersion, GKVersion, ORVersion
|
||||||
from source.classes.BabelFish import BabelFish
|
|
||||||
from source.classes.Empty import Empty
|
|
||||||
|
|
||||||
|
|
||||||
def check_python_version(fish):
|
def check_python_version(fish):
|
||||||
|
|||||||
+2
-1
@@ -1,10 +1,11 @@
|
|||||||
import queue
|
|
||||||
import os
|
import os
|
||||||
|
import queue
|
||||||
import threading
|
import threading
|
||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
|
|
||||||
from Utils import local_path
|
from Utils import local_path
|
||||||
|
|
||||||
|
|
||||||
def set_icon(window):
|
def set_icon(window):
|
||||||
er16 = tk.PhotoImage(file=local_path(os.path.join("data","ER16.gif")))
|
er16 = tk.PhotoImage(file=local_path(os.path.join("data","ER16.gif")))
|
||||||
er32 = tk.PhotoImage(file=local_path(os.path.join("data","ER32.gif")))
|
er32 = tk.PhotoImage(file=local_path(os.path.join("data","ER32.gif")))
|
||||||
|
|||||||
+33
-15
@@ -1,21 +1,39 @@
|
|||||||
from collections import namedtuple, defaultdict
|
|
||||||
import logging
|
import logging
|
||||||
import math
|
import math
|
||||||
|
from collections import defaultdict, namedtuple
|
||||||
|
|
||||||
import RaceRandom as random
|
import RaceRandom as random
|
||||||
|
|
||||||
from BaseClasses import LocationType, Region, RegionType, Shop, ShopType, Location, CollectionState, PotItem
|
|
||||||
from Regions import location_events, shop_to_location_table, retro_shops, shop_table_by_location, valid_pot_location
|
|
||||||
from Fill import FillError, fill_restrictive, get_dungeon_item_pool, track_dungeon_items, track_outside_keys
|
|
||||||
from PotShuffle import vanilla_pots
|
|
||||||
from Tables import bonk_prize_lookup
|
|
||||||
from Items import ItemFactory
|
|
||||||
|
|
||||||
from source.dungeon.EnemyList import add_drop_contents
|
|
||||||
from source.overworld.EntranceShuffle2 import exit_ids, door_addresses
|
|
||||||
from source.item.FillUtil import trash_items, pot_items
|
|
||||||
|
|
||||||
import source.classes.constants as CONST
|
import source.classes.constants as CONST
|
||||||
|
from BaseClasses import (
|
||||||
|
CollectionState,
|
||||||
|
Location,
|
||||||
|
LocationType,
|
||||||
|
PotItem,
|
||||||
|
Region,
|
||||||
|
RegionType,
|
||||||
|
Shop,
|
||||||
|
ShopType,
|
||||||
|
)
|
||||||
|
from Fill import (
|
||||||
|
FillError,
|
||||||
|
fill_restrictive,
|
||||||
|
get_dungeon_item_pool,
|
||||||
|
track_dungeon_items,
|
||||||
|
track_outside_keys,
|
||||||
|
)
|
||||||
|
from Items import ItemFactory
|
||||||
|
from PotShuffle import vanilla_pots
|
||||||
|
from Regions import (
|
||||||
|
location_events,
|
||||||
|
retro_shops,
|
||||||
|
shop_table_by_location,
|
||||||
|
shop_to_location_table,
|
||||||
|
valid_pot_location,
|
||||||
|
)
|
||||||
|
from source.dungeon.EnemyList import add_drop_contents
|
||||||
|
from source.item.FillUtil import pot_items, trash_items
|
||||||
|
from source.overworld.EntranceShuffle2 import door_addresses, exit_ids
|
||||||
|
from Tables import bonk_prize_lookup
|
||||||
|
|
||||||
#This file sets the item pools for various modes. Timed modes and triforce hunt are enforced first, and then extra items are specified per mode to fill in the remaining space.
|
#This file sets the item pools for various modes. Timed modes and triforce hunt are enforced first, and then extra items are specified per mode to fill in the remaining space.
|
||||||
#Some basic items that various modes require are placed here, including pendants and crystals. Medallion requirements for the two relevant entrances are also decided.
|
#Some basic items that various modes require are placed here, including pendants and crystals. Medallion requirements for the two relevant entrances are also decided.
|
||||||
@@ -693,7 +711,7 @@ def create_farm_locations(world, player):
|
|||||||
world.dynamic_locations.append(loc)
|
world.dynamic_locations.append(loc)
|
||||||
return loc
|
return loc
|
||||||
|
|
||||||
from Rules import set_rule, add_rule, add_bunny_rule
|
from Rules import add_bunny_rule, add_rule, set_rule
|
||||||
for region in bush_bombs:
|
for region in bush_bombs:
|
||||||
loc = create_and_fill_location(region, 'Bush Drop', 'Farmable Bombs')
|
loc = create_and_fill_location(region, 'Bush Drop', 'Farmable Bombs')
|
||||||
add_bunny_rule(loc, player)
|
add_bunny_rule(loc, player)
|
||||||
|
|||||||
+10
-4
@@ -2,11 +2,17 @@ import itertools
|
|||||||
import logging
|
import logging
|
||||||
from collections import defaultdict, deque
|
from collections import defaultdict, deque
|
||||||
|
|
||||||
from BaseClasses import DoorType, dungeon_keys, KeyRuleType, RegionType
|
from BaseClasses import DoorType, KeyRuleType, RegionType, dungeon_keys
|
||||||
|
from DungeonGenerator import (
|
||||||
|
ExplorationState,
|
||||||
|
blind_boss_unavail,
|
||||||
|
count_locations_exclude_big_chest,
|
||||||
|
get_special_big_key_doors,
|
||||||
|
prize_or_event,
|
||||||
|
reserved_location,
|
||||||
|
)
|
||||||
|
from Dungeons import dungeon_bigs, dungeon_keys, dungeon_table
|
||||||
from Regions import location_events
|
from Regions import location_events
|
||||||
from Dungeons import dungeon_keys, dungeon_bigs, dungeon_table
|
|
||||||
from DungeonGenerator import ExplorationState, get_special_big_key_doors, count_locations_exclude_big_chest, prize_or_event
|
|
||||||
from DungeonGenerator import reserved_location, blind_boss_unavail
|
|
||||||
|
|
||||||
|
|
||||||
class KeyLayout(object):
|
class KeyLayout(object):
|
||||||
|
|||||||
@@ -1,47 +1,99 @@
|
|||||||
|
import base64
|
||||||
import copy
|
import copy
|
||||||
from itertools import zip_longest
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import RaceRandom as random
|
|
||||||
import string
|
import string
|
||||||
import time
|
import time
|
||||||
import zlib
|
import zlib
|
||||||
import base64
|
from itertools import zip_longest
|
||||||
|
|
||||||
from BaseClasses import World, CollectionState, Item, Region, Location, Shop, Entrance, Settings
|
import RaceRandom as random
|
||||||
|
from BaseClasses import (
|
||||||
|
CollectionState,
|
||||||
|
Entrance,
|
||||||
|
Item,
|
||||||
|
Location,
|
||||||
|
Region,
|
||||||
|
Settings,
|
||||||
|
Shop,
|
||||||
|
World,
|
||||||
|
)
|
||||||
from Bosses import place_bosses
|
from Bosses import place_bosses
|
||||||
|
from Doors import create_doors
|
||||||
|
from DoorShuffle import connect_portal, link_doors, link_doors_prep
|
||||||
|
from Dungeons import create_dungeons
|
||||||
|
from Fill import (
|
||||||
|
balance_money_progression,
|
||||||
|
balance_multiworld_progression,
|
||||||
|
distribute_items_restrictive,
|
||||||
|
dungeon_tracking,
|
||||||
|
ensure_good_items,
|
||||||
|
fill_dungeons_restrictive,
|
||||||
|
lock_shop_locations,
|
||||||
|
promote_dungeon_items,
|
||||||
|
sell_keys,
|
||||||
|
sell_potions,
|
||||||
|
set_prize_drops,
|
||||||
|
)
|
||||||
|
from ItemList import (
|
||||||
|
create_farm_locations,
|
||||||
|
customize_shops,
|
||||||
|
difficulties,
|
||||||
|
fill_prizes,
|
||||||
|
fill_specific_items,
|
||||||
|
follower_pickups,
|
||||||
|
generate_itempool,
|
||||||
|
shuffle_event_items,
|
||||||
|
)
|
||||||
from Items import ItemFactory
|
from Items import ItemFactory
|
||||||
from KeyDoorShuffle import validate_key_placement
|
from KeyDoorShuffle import validate_key_placement
|
||||||
from OverworldGlitchRules import create_owg_connections
|
from OverworldGlitchRules import create_owg_connections
|
||||||
from PotShuffle import shuffle_pots, shuffle_pot_switches
|
from OverworldShuffle import (
|
||||||
from Regions import create_regions, create_shops, mark_light_dark_world_regions, create_dungeon_regions, adjust_locations
|
create_dynamic_flute_exits,
|
||||||
|
create_dynamic_mirror_exits,
|
||||||
|
link_overworld,
|
||||||
|
update_world_regions,
|
||||||
|
)
|
||||||
from OWEdges import create_owedges
|
from OWEdges import create_owedges
|
||||||
from OverworldShuffle import link_overworld, update_world_regions, create_dynamic_flute_exits, create_dynamic_mirror_exits
|
from PotShuffle import shuffle_pot_switches, shuffle_pots
|
||||||
from Rom import patch_rom, patch_race_rom, apply_rom_settings, LocalRom, JsonRom, get_hash_string
|
from Regions import (
|
||||||
from Doors import create_doors
|
adjust_locations,
|
||||||
from DoorShuffle import link_doors, connect_portal, link_doors_prep
|
create_dungeon_regions,
|
||||||
|
create_regions,
|
||||||
|
create_shops,
|
||||||
|
mark_light_dark_world_regions,
|
||||||
|
)
|
||||||
|
from Rom import (
|
||||||
|
JsonRom,
|
||||||
|
LocalRom,
|
||||||
|
apply_rom_settings,
|
||||||
|
get_hash_string,
|
||||||
|
patch_race_rom,
|
||||||
|
patch_rom,
|
||||||
|
)
|
||||||
from RoomData import create_rooms
|
from RoomData import create_rooms
|
||||||
from Rules import set_rules
|
from Rules import set_rules
|
||||||
from Dungeons import create_dungeons
|
from source.classes.BabelFish import BabelFish
|
||||||
from Fill import distribute_items_restrictive, promote_dungeon_items, fill_dungeons_restrictive, ensure_good_items
|
|
||||||
from Fill import dungeon_tracking
|
|
||||||
from Fill import sell_potions, sell_keys, balance_multiworld_progression, balance_money_progression, lock_shop_locations, set_prize_drops
|
|
||||||
from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops, fill_specific_items, create_farm_locations, shuffle_event_items, follower_pickups
|
|
||||||
from UnderworldGlitchRules import connect_hmg_entrances_regions, create_hmg_entrances_regions
|
|
||||||
from Utils import output_path, parse_player_names
|
|
||||||
|
|
||||||
from source.item.District import init_districts
|
|
||||||
from source.item.FillUtil import create_item_pool_config, massage_item_pool, district_item_pool_config, verify_item_pool_config
|
|
||||||
from source.overworld.EntranceShuffle2 import link_entrances_new
|
|
||||||
from source.tools.BPS import create_bps_from_data
|
|
||||||
from source.classes.CustomSettings import CustomSettings
|
from source.classes.CustomSettings import CustomSettings
|
||||||
from source.enemizer.DamageTables import DamageTable
|
from source.enemizer.DamageTables import DamageTable
|
||||||
from source.enemizer.Enemizer import randomize_enemies
|
from source.enemizer.Enemizer import randomize_enemies
|
||||||
|
from source.item.District import init_districts
|
||||||
|
from source.item.FillUtil import (
|
||||||
|
create_item_pool_config,
|
||||||
|
district_item_pool_config,
|
||||||
|
massage_item_pool,
|
||||||
|
verify_item_pool_config,
|
||||||
|
)
|
||||||
|
from source.overworld.EntranceShuffle2 import link_entrances_new
|
||||||
from source.rom.DataTables import init_data_tables
|
from source.rom.DataTables import init_data_tables
|
||||||
|
from source.tools.BPS import create_bps_from_data
|
||||||
from Versions import ORVersion, DRVersion, GKVersion
|
from UnderworldGlitchRules import (
|
||||||
from source.classes.BabelFish import BabelFish
|
connect_hmg_entrances_regions,
|
||||||
|
create_hmg_entrances_regions,
|
||||||
|
)
|
||||||
|
from Utils import output_path, parse_player_names
|
||||||
|
from Versions import DRVersion, GKVersion, ORVersion
|
||||||
|
|
||||||
|
|
||||||
class EnemizerError(RuntimeError):
|
class EnemizerError(RuntimeError):
|
||||||
|
|||||||
+6
-5
@@ -1,19 +1,20 @@
|
|||||||
import aioconsole
|
|
||||||
import argparse
|
import argparse
|
||||||
import asyncio
|
import asyncio
|
||||||
import colorama
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import shlex
|
import shlex
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
|
|
||||||
|
import aioconsole
|
||||||
|
import colorama
|
||||||
import websockets
|
import websockets
|
||||||
|
|
||||||
from BaseClasses import PotItem, PotFlags, LocationType
|
|
||||||
import Items
|
import Items
|
||||||
import Regions
|
|
||||||
import PotShuffle
|
import PotShuffle
|
||||||
|
import Regions
|
||||||
import source.dungeon.EnemyList as EnemyList
|
import source.dungeon.EnemyList as EnemyList
|
||||||
import source.rom.DataTables as DataTables
|
import source.rom.DataTables as DataTables
|
||||||
|
from BaseClasses import LocationType, PotFlags, PotItem
|
||||||
|
|
||||||
|
|
||||||
class ReceivedItem:
|
class ReceivedItem:
|
||||||
@@ -975,8 +976,8 @@ async def track_locations(ctx : Context, roomid, roomdata):
|
|||||||
ow_unchecked[location] = (screenid, 0x40)
|
ow_unchecked[location] = (screenid, 0x40)
|
||||||
ow_begin = min(ow_begin, screenid)
|
ow_begin = min(ow_begin, screenid)
|
||||||
ow_end = max(ow_end, screenid + 1)
|
ow_end = max(ow_end, screenid + 1)
|
||||||
from Regions import bonk_prize_table
|
|
||||||
from OWEdges import OWTileRegions
|
from OWEdges import OWTileRegions
|
||||||
|
from Regions import bonk_prize_table
|
||||||
for location, (_, flag, _, _, region_name, _) in bonk_prize_table.items():
|
for location, (_, flag, _, _, region_name, _) in bonk_prize_table.items():
|
||||||
if location not in ctx.locations_checked:
|
if location not in ctx.locations_checked:
|
||||||
if region_name in OWTileRegions:
|
if region_name in OWTileRegions:
|
||||||
|
|||||||
+11
-5
@@ -1,4 +1,3 @@
|
|||||||
import aioconsole
|
|
||||||
import argparse
|
import argparse
|
||||||
import asyncio
|
import asyncio
|
||||||
import functools
|
import functools
|
||||||
@@ -8,16 +7,23 @@ import re
|
|||||||
import shlex
|
import shlex
|
||||||
import ssl
|
import ssl
|
||||||
import urllib.request
|
import urllib.request
|
||||||
import websockets
|
|
||||||
import zlib
|
import zlib
|
||||||
|
|
||||||
from BaseClasses import PotItem, PotFlags
|
import aioconsole
|
||||||
|
import websockets
|
||||||
|
|
||||||
import Items
|
import Items
|
||||||
import Regions
|
|
||||||
import PotShuffle
|
import PotShuffle
|
||||||
from MultiClient import ReceivedItem, get_item_name_from_id, get_location_name_from_address
|
import Regions
|
||||||
import source.dungeon.EnemyList as EnemyList
|
import source.dungeon.EnemyList as EnemyList
|
||||||
import source.rom.DataTables as DataTables
|
import source.rom.DataTables as DataTables
|
||||||
|
from BaseClasses import PotFlags, PotItem
|
||||||
|
from MultiClient import (
|
||||||
|
ReceivedItem,
|
||||||
|
get_item_name_from_id,
|
||||||
|
get_location_name_from_address,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class Client:
|
class Client:
|
||||||
def __init__(self, socket):
|
def __init__(self, socket):
|
||||||
|
|||||||
+4
-4
@@ -1,13 +1,13 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import logging
|
import logging
|
||||||
import RaceRandom as random
|
|
||||||
|
|
||||||
|
from yaml.constructor import SafeConstructor
|
||||||
|
|
||||||
|
import RaceRandom as random
|
||||||
from DungeonRandomizer import parse_cli
|
from DungeonRandomizer import parse_cli
|
||||||
from Main import main as DRMain
|
from Main import main as DRMain
|
||||||
from source.classes.BabelFish import BabelFish
|
from source.classes.BabelFish import BabelFish
|
||||||
from yaml.constructor import SafeConstructor
|
from source.tools.MysteryUtils import get_weights, roll_settings
|
||||||
|
|
||||||
from source.tools.MysteryUtils import roll_settings, get_weights
|
|
||||||
|
|
||||||
|
|
||||||
def add_bool(self, node):
|
def add_bool(self, node):
|
||||||
|
|||||||
+3
-1
@@ -1,8 +1,10 @@
|
|||||||
|
|
||||||
from BaseClasses import OWEdge, Direction, Terrain, WorldType, PolSlot
|
|
||||||
from enum import Enum, unique
|
from enum import Enum, unique
|
||||||
|
|
||||||
|
from BaseClasses import Direction, OWEdge, PolSlot, Terrain, WorldType
|
||||||
from Utils import bidict
|
from Utils import bidict
|
||||||
|
|
||||||
|
|
||||||
@unique
|
@unique
|
||||||
class OpenStd(Enum):
|
class OpenStd(Enum):
|
||||||
Open = 0
|
Open = 0
|
||||||
|
|||||||
+33
-7
@@ -1,11 +1,30 @@
|
|||||||
import RaceRandom as random, logging, copy
|
import copy
|
||||||
|
import logging
|
||||||
from collections import OrderedDict, defaultdict
|
from collections import OrderedDict, defaultdict
|
||||||
|
|
||||||
|
import RaceRandom as random
|
||||||
|
from BaseClasses import (
|
||||||
|
Direction,
|
||||||
|
Entrance,
|
||||||
|
OWEdge,
|
||||||
|
PolSlot,
|
||||||
|
RegionType,
|
||||||
|
Terrain,
|
||||||
|
WorldType,
|
||||||
|
)
|
||||||
from DungeonGenerator import GenerationException
|
from DungeonGenerator import GenerationException
|
||||||
from BaseClasses import OWEdge, WorldType, RegionType, Direction, Terrain, PolSlot, Entrance
|
from OverworldGlitchRules import create_owg_connections
|
||||||
|
from OWEdges import (
|
||||||
|
IsParallel,
|
||||||
|
OpenStd,
|
||||||
|
OWEdgeGroups,
|
||||||
|
OWEdgeGroupsTerrain,
|
||||||
|
OWExitTypes,
|
||||||
|
OWTileRegions,
|
||||||
|
parallel_links,
|
||||||
|
)
|
||||||
from Regions import mark_light_dark_world_regions
|
from Regions import mark_light_dark_world_regions
|
||||||
from source.overworld.EntranceShuffle2 import connect_simple
|
from source.overworld.EntranceShuffle2 import connect_simple
|
||||||
from OWEdges import OWTileRegions, OWEdgeGroups, OWEdgeGroupsTerrain, OWExitTypes, OpenStd, parallel_links, IsParallel
|
|
||||||
from OverworldGlitchRules import create_owg_connections
|
|
||||||
from Utils import bidict
|
from Utils import bidict
|
||||||
|
|
||||||
parallel_links_new = None # needs to be globally available, reset every new generation/player
|
parallel_links_new = None # needs to be globally available, reset every new generation/player
|
||||||
@@ -1364,8 +1383,8 @@ def update_world_regions(world, player):
|
|||||||
world.get_region(name, player).type = RegionType.LightWorld
|
world.get_region(name, player).type = RegionType.LightWorld
|
||||||
|
|
||||||
def can_reach_smith(world, player):
|
def can_reach_smith(world, player):
|
||||||
from Items import ItemFactory
|
|
||||||
from BaseClasses import CollectionState
|
from BaseClasses import CollectionState
|
||||||
|
from Items import ItemFactory
|
||||||
|
|
||||||
def explore_region(region_name, region=None):
|
def explore_region(region_name, region=None):
|
||||||
nonlocal found
|
nonlocal found
|
||||||
@@ -1472,8 +1491,8 @@ def build_sectors(world, player):
|
|||||||
|
|
||||||
def build_accessible_region_list(world, start_region, player, build_copy_world=False, cross_world=False, region_rules=True, ignore_ledges=False, restrictive_follower=False):
|
def build_accessible_region_list(world, start_region, player, build_copy_world=False, cross_world=False, region_rules=True, ignore_ledges=False, restrictive_follower=False):
|
||||||
from BaseClasses import CollectionState
|
from BaseClasses import CollectionState
|
||||||
from Main import copy_world_premature
|
|
||||||
from Items import ItemFactory
|
from Items import ItemFactory
|
||||||
|
from Main import copy_world_premature
|
||||||
from Utils import stack_size3a
|
from Utils import stack_size3a
|
||||||
|
|
||||||
def explore_region(region_name, region=None):
|
def explore_region(region_name, region=None):
|
||||||
@@ -1546,7 +1565,14 @@ def validate_layout(world, player):
|
|||||||
}
|
}
|
||||||
|
|
||||||
# TODO: Find a better source for the below lists, original sourced was deprecated
|
# TODO: Find a better source for the below lists, original sourced was deprecated
|
||||||
from source.overworld.EntranceData import default_dungeon_connections, default_connector_connections, default_item_connections, default_shop_connections, default_drop_connections, default_dropexit_connections
|
from source.overworld.EntranceData import (
|
||||||
|
default_connector_connections,
|
||||||
|
default_drop_connections,
|
||||||
|
default_dropexit_connections,
|
||||||
|
default_dungeon_connections,
|
||||||
|
default_item_connections,
|
||||||
|
default_shop_connections,
|
||||||
|
)
|
||||||
|
|
||||||
dungeon_entrances = list(zip(*default_dungeon_connections + [('Ganons Tower', '')]))[0]
|
dungeon_entrances = list(zip(*default_dungeon_connections + [('Ganons Tower', '')]))[0]
|
||||||
connector_entrances = list(zip(*default_connector_connections))[0]
|
connector_entrances = list(zip(*default_connector_connections))[0]
|
||||||
|
|||||||
@@ -3,20 +3,31 @@ import argparse
|
|||||||
import hashlib
|
import hashlib
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import RaceRandom as random
|
|
||||||
import time
|
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
|
import RaceRandom as random
|
||||||
from BaseClasses import World
|
from BaseClasses import World
|
||||||
from Regions import create_regions
|
|
||||||
from OverworldShuffle import link_overworld
|
|
||||||
from source.overworld.EntranceShuffle2 import link_entrances_new, connect_entrance, connect_two_way, connect_exit
|
|
||||||
from Rom import patch_rom, LocalRom, write_string_to_rom, apply_rom_settings, get_sprite_from_name
|
|
||||||
from Rules import set_rules
|
|
||||||
from Dungeons import create_dungeons
|
from Dungeons import create_dungeons
|
||||||
from Items import ItemFactory
|
|
||||||
from ItemList import difficulties
|
from ItemList import difficulties
|
||||||
|
from Items import ItemFactory
|
||||||
from Main import create_playthrough
|
from Main import create_playthrough
|
||||||
|
from OverworldShuffle import link_overworld
|
||||||
|
from Regions import create_regions
|
||||||
|
from Rom import (
|
||||||
|
LocalRom,
|
||||||
|
apply_rom_settings,
|
||||||
|
get_sprite_from_name,
|
||||||
|
patch_rom,
|
||||||
|
write_string_to_rom,
|
||||||
|
)
|
||||||
|
from Rules import set_rules
|
||||||
|
from source.overworld.EntranceShuffle2 import (
|
||||||
|
connect_entrance,
|
||||||
|
connect_exit,
|
||||||
|
connect_two_way,
|
||||||
|
link_entrances_new,
|
||||||
|
)
|
||||||
|
|
||||||
PlandoVersion = '0.2-dev'
|
PlandoVersion = '0.2-dev'
|
||||||
|
|
||||||
|
|||||||
+3
-5
@@ -1,11 +1,9 @@
|
|||||||
import RaceRandom as random
|
|
||||||
|
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
from BaseClasses import PotItem, Pot, PotFlags, CrystalBarrier, LocationType, RegionType
|
import RaceRandom as random
|
||||||
from Utils import int16_as_bytes, pc_to_snes, snes_to_pc
|
from BaseClasses import CrystalBarrier, LocationType, Pot, PotFlags, PotItem, RegionType
|
||||||
|
|
||||||
from source.dungeon.RoomObject import RoomObject, Shuffled_Pot
|
from source.dungeon.RoomObject import RoomObject, Shuffled_Pot
|
||||||
|
from Utils import int16_as_bytes, pc_to_snes, snes_to_pc
|
||||||
|
|
||||||
movable_switch_rooms = defaultdict(lambda: [],
|
movable_switch_rooms = defaultdict(lambda: [],
|
||||||
{'PoD Stalfos Basement': ['PoD Basement Ledge'],
|
{'PoD Stalfos Basement': ['PoD Basement Ledge'],
|
||||||
|
|||||||
+15
-4
@@ -1,9 +1,20 @@
|
|||||||
import collections
|
import collections
|
||||||
from Items import ItemFactory
|
|
||||||
from BaseClasses import Region, Location, Entrance, RegionType, Terrain, Shop, ShopType, LocationType, PotItem, PotFlags
|
|
||||||
from PotShuffle import key_drop_data, vanilla_pots, choose_pots, PotSecretTable
|
|
||||||
|
|
||||||
from source.dungeon.EnemyList import setup_enemy_locations, enemy_names
|
from BaseClasses import (
|
||||||
|
Entrance,
|
||||||
|
Location,
|
||||||
|
LocationType,
|
||||||
|
PotFlags,
|
||||||
|
PotItem,
|
||||||
|
Region,
|
||||||
|
RegionType,
|
||||||
|
Shop,
|
||||||
|
ShopType,
|
||||||
|
Terrain,
|
||||||
|
)
|
||||||
|
from Items import ItemFactory
|
||||||
|
from PotShuffle import PotSecretTable, choose_pots, key_drop_data, vanilla_pots
|
||||||
|
from source.dungeon.EnemyList import enemy_names, setup_enemy_locations
|
||||||
|
|
||||||
|
|
||||||
def create_regions(world, player):
|
def create_regions(world, player):
|
||||||
|
|||||||
@@ -1,48 +1,87 @@
|
|||||||
import bisect
|
import bisect
|
||||||
import collections
|
import collections
|
||||||
|
import hashlib
|
||||||
import io
|
import io
|
||||||
import json
|
import json
|
||||||
import hashlib
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import struct
|
||||||
|
import sys
|
||||||
|
|
||||||
import Items
|
import Items
|
||||||
import RaceRandom as random
|
import RaceRandom as random
|
||||||
import struct
|
|
||||||
import sys
|
|
||||||
try:
|
try:
|
||||||
import bps.apply
|
import bps.apply
|
||||||
import bps.io
|
import bps.io
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise Exception('Could not load BPS module')
|
raise Exception('Could not load BPS module')
|
||||||
|
|
||||||
from BaseClasses import ShopType, Region, Location, OWEdge, Door, DoorType, RegionType, LocationType
|
from BaseClasses import (
|
||||||
from DoorShuffle import compass_data, DROptions, boss_indicator, dungeon_portals
|
Door,
|
||||||
from Dungeons import dungeon_music_addresses, dungeon_table
|
DoorType,
|
||||||
from Regions import location_table, shop_to_location_table, retro_shops
|
Location,
|
||||||
from RoomData import DoorKind
|
LocationType,
|
||||||
from Text import MultiByteTextMapper, CompressedTextMapper, text_addresses, Credits, TextTable
|
OWEdge,
|
||||||
from Text import Uncle_texts, Ganon1_texts, Ganon_Phase_3_No_Silvers_texts, Ganon_Phase_3_No_Weakness_texts, TavernMan_texts, Sahasrahla2_texts
|
Region,
|
||||||
from Text import Triforce_texts, Blind_texts, BombShop2_texts, junk_texts
|
RegionType,
|
||||||
from Text import KingsReturn_texts, Sanctuary_texts, Kakariko_texts, Blacksmiths_texts, DeathMountain_texts
|
ShopType,
|
||||||
from Text import LostWoods_texts, WishingWell_texts, DesertPalace_texts, MountainTower_texts, LinksHouse_texts
|
)
|
||||||
from Text import Lumberjacks_texts, SickKid_texts, FluteBoy_texts, Zora_texts, MagicShop_texts, Sahasrahla_names
|
|
||||||
from Utils import local_path, int16_as_bytes, int32_as_bytes, snes_to_pc
|
|
||||||
from Items import ItemFactory, prize_item_table
|
|
||||||
from source.overworld.EntranceData import door_addresses, ow_prize_table
|
|
||||||
from source.overworld.EntranceShuffle2 import exit_ids
|
|
||||||
from OverworldShuffle import default_flute_connections, flute_data
|
|
||||||
from InitialSram import InitialSram
|
|
||||||
from DamageTable import DamageTable
|
from DamageTable import DamageTable
|
||||||
from Versions import DRVersion, GKVersion, ORVersion
|
from DoorShuffle import DROptions, boss_indicator, compass_data, dungeon_portals
|
||||||
|
from Dungeons import dungeon_music_addresses, dungeon_table
|
||||||
from source.classes.SFX import randomize_sfx, randomize_sfxinstruments, randomize_songinstruments
|
from InitialSram import InitialSram
|
||||||
from source.item.FillUtil import valid_pot_items
|
from Items import ItemFactory, prize_item_table
|
||||||
|
from OverworldShuffle import default_flute_connections, flute_data
|
||||||
|
from Regions import location_table, retro_shops, shop_to_location_table
|
||||||
|
from RoomData import DoorKind
|
||||||
|
from source.classes.SFX import (
|
||||||
|
randomize_sfx,
|
||||||
|
randomize_sfxinstruments,
|
||||||
|
randomize_songinstruments,
|
||||||
|
)
|
||||||
from source.dungeon.EnemyList import EnemySprite, setup_enemy_dungeon_tables
|
from source.dungeon.EnemyList import EnemySprite, setup_enemy_dungeon_tables
|
||||||
from source.dungeon.RoomObject import DoorObject
|
from source.dungeon.RoomObject import DoorObject
|
||||||
from source.enemizer.Bossmizer import boss_writes
|
from source.enemizer.Bossmizer import boss_writes
|
||||||
from source.enemizer.Enemizer import write_enemy_shuffle_settings
|
from source.enemizer.Enemizer import write_enemy_shuffle_settings
|
||||||
|
from source.item.FillUtil import valid_pot_items
|
||||||
|
from source.overworld.EntranceData import door_addresses, ow_prize_table
|
||||||
|
from source.overworld.EntranceShuffle2 import exit_ids
|
||||||
|
from Text import (
|
||||||
|
Blacksmiths_texts,
|
||||||
|
Blind_texts,
|
||||||
|
BombShop2_texts,
|
||||||
|
CompressedTextMapper,
|
||||||
|
Credits,
|
||||||
|
DeathMountain_texts,
|
||||||
|
DesertPalace_texts,
|
||||||
|
FluteBoy_texts,
|
||||||
|
Ganon1_texts,
|
||||||
|
Ganon_Phase_3_No_Silvers_texts,
|
||||||
|
Ganon_Phase_3_No_Weakness_texts,
|
||||||
|
Kakariko_texts,
|
||||||
|
KingsReturn_texts,
|
||||||
|
LinksHouse_texts,
|
||||||
|
LostWoods_texts,
|
||||||
|
Lumberjacks_texts,
|
||||||
|
MagicShop_texts,
|
||||||
|
MountainTower_texts,
|
||||||
|
MultiByteTextMapper,
|
||||||
|
Sahasrahla2_texts,
|
||||||
|
Sahasrahla_names,
|
||||||
|
Sanctuary_texts,
|
||||||
|
SickKid_texts,
|
||||||
|
TavernMan_texts,
|
||||||
|
TextTable,
|
||||||
|
Triforce_texts,
|
||||||
|
Uncle_texts,
|
||||||
|
WishingWell_texts,
|
||||||
|
Zora_texts,
|
||||||
|
junk_texts,
|
||||||
|
text_addresses,
|
||||||
|
)
|
||||||
|
from Utils import int16_as_bytes, int32_as_bytes, local_path, snes_to_pc
|
||||||
|
from Versions import DRVersion, GKVersion, ORVersion
|
||||||
|
|
||||||
JAP10HASH = '03a63945398191337e896e5771f77173'
|
JAP10HASH = '03a63945398191337e896e5771f77173'
|
||||||
RANDOMIZERBASEHASH = '2647cc28bca3675152576dd1f5ea0bab'
|
RANDOMIZERBASEHASH = '2647cc28bca3675152576dd1f5ea0bab'
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from enum import Enum, unique
|
from enum import Enum, unique
|
||||||
|
|
||||||
from Tables import door_pair_offset_table
|
from Tables import door_pair_offset_table
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,18 +3,28 @@ import logging
|
|||||||
from collections import deque
|
from collections import deque
|
||||||
|
|
||||||
import OverworldGlitchRules
|
import OverworldGlitchRules
|
||||||
from BaseClasses import CollectionState, RegionType, DoorType, Entrance, CrystalBarrier, KeyRuleType, LocationType, Terrain
|
from BaseClasses import (
|
||||||
from BaseClasses import PotFlags
|
CollectionState,
|
||||||
|
CrystalBarrier,
|
||||||
|
DoorType,
|
||||||
|
Entrance,
|
||||||
|
KeyRuleType,
|
||||||
|
LocationType,
|
||||||
|
PotFlags,
|
||||||
|
RegionType,
|
||||||
|
Terrain,
|
||||||
|
)
|
||||||
from Dungeons import dungeon_table
|
from Dungeons import dungeon_table
|
||||||
from RoomData import DoorKind
|
|
||||||
from OWEdges import OWExitTypes
|
|
||||||
from OverworldGlitchRules import overworld_glitches_rules
|
from OverworldGlitchRules import overworld_glitches_rules
|
||||||
from UnderworldGlitchRules import underworld_glitches_rules
|
from OWEdges import OWExitTypes
|
||||||
|
from RoomData import DoorKind
|
||||||
from source.logic.Rule import RuleFactory
|
|
||||||
from source.dungeon.EnemyList import EnemySprite, Sprite
|
from source.dungeon.EnemyList import EnemySprite, Sprite
|
||||||
from source.enemizer.EnemyLogic import special_rules_check, special_rules_for_region, defeat_rule_single
|
from source.enemizer.EnemyLogic import and_rule as and_rule_new
|
||||||
from source.enemizer.EnemyLogic import defeat_rule_multiple, and_rule as and_rule_new, or_rule as or_rule_new
|
from source.enemizer.EnemyLogic import defeat_rule_multiple, defeat_rule_single
|
||||||
|
from source.enemizer.EnemyLogic import or_rule as or_rule_new
|
||||||
|
from source.enemizer.EnemyLogic import special_rules_check, special_rules_for_region
|
||||||
|
from source.logic.Rule import RuleFactory
|
||||||
|
from UnderworldGlitchRules import underworld_glitches_rules
|
||||||
|
|
||||||
|
|
||||||
def set_rules(world, player):
|
def set_rules(world, player):
|
||||||
|
|||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
|
import argparse
|
||||||
|
import concurrent.futures
|
||||||
|
import multiprocessing
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import multiprocessing
|
|
||||||
import concurrent.futures
|
|
||||||
import argparse
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
cpu_threads = multiprocessing.cpu_count()
|
cpu_threads = multiprocessing.cpu_count()
|
||||||
|
|||||||
+4
-4
@@ -1,10 +1,10 @@
|
|||||||
|
import argparse
|
||||||
|
import concurrent.futures
|
||||||
|
import csv
|
||||||
|
import multiprocessing
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import multiprocessing
|
|
||||||
import concurrent.futures
|
|
||||||
import argparse
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
import csv
|
|
||||||
|
|
||||||
cpu_threads = multiprocessing.cpu_count()
|
cpu_threads = multiprocessing.cpu_count()
|
||||||
py_version = f"{sys.version_info.major}.{sys.version_info.minor}"
|
py_version = f"{sys.version_info.major}.{sys.version_info.minor}"
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
from collections import OrderedDict
|
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
import warnings
|
import warnings
|
||||||
|
from collections import OrderedDict
|
||||||
|
|
||||||
warnings.filterwarnings("ignore", category=SyntaxWarning)
|
warnings.filterwarnings("ignore", category=SyntaxWarning)
|
||||||
|
|
||||||
text_addresses = {'Pedestal': (0x180300, 256),
|
text_addresses = {'Pedestal': (0x180300, 256),
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import functools
|
import functools
|
||||||
from BaseClasses import Entrance, DoorType, Door
|
|
||||||
from DoorShuffle import connect_simple_door
|
|
||||||
import Rules
|
import Rules
|
||||||
|
from BaseClasses import Door, DoorType, Entrance
|
||||||
|
from DoorShuffle import connect_simple_door
|
||||||
|
|
||||||
kikiskip_spots = [
|
kikiskip_spots = [
|
||||||
("Kiki Skip", "Spectacle Rock Cave (Bottom)", "Palace of Darkness Portal")
|
("Kiki Skip", "Spectacle Rock Cave (Bottom)", "Palace of Darkness Portal")
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import fileinput
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
import urllib.parse
|
||||||
|
import urllib.request
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from math import factorial
|
|
||||||
from itertools import count
|
from itertools import count
|
||||||
import fileinput
|
from math import factorial
|
||||||
|
|
||||||
import urllib.request
|
|
||||||
import urllib.parse
|
|
||||||
import yaml
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
|
||||||
def int16_as_bytes(value):
|
def int16_as_bytes(value):
|
||||||
value = value & 0xFFFF
|
value = value & 0xFFFF
|
||||||
@@ -103,9 +103,9 @@ def close_console():
|
|||||||
|
|
||||||
|
|
||||||
def make_new_base2current(old_rom='Zelda no Densetsu - Kamigami no Triforce (Japan).sfc', new_rom='working.sfc'):
|
def make_new_base2current(old_rom='Zelda no Densetsu - Kamigami no Triforce (Japan).sfc', new_rom='working.sfc'):
|
||||||
from collections import OrderedDict
|
|
||||||
import json
|
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import json
|
||||||
|
from collections import OrderedDict
|
||||||
with open(old_rom, 'rb') as stream:
|
with open(old_rom, 'rb') as stream:
|
||||||
old_rom_data = bytearray(stream.read())
|
old_rom_data = bytearray(stream.read())
|
||||||
with open(new_rom, 'rb') as stream:
|
with open(new_rom, 'rb') as stream:
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
"""collections_extended contains a few extra basic data structures."""
|
"""collections_extended contains a few extra basic data structures."""
|
||||||
from ._compat import Collection
|
from ._compat import Collection
|
||||||
from .bags import bag, frozenbag
|
from .bags import bag, frozenbag
|
||||||
from .setlists import setlist, frozensetlist
|
|
||||||
from .bijection import bijection
|
from .bijection import bijection
|
||||||
from .range_map import RangeMap, MappedRange
|
from .range_map import MappedRange, RangeMap
|
||||||
|
from .setlists import frozensetlist, setlist
|
||||||
|
|
||||||
__version__ = '1.0.2'
|
__version__ = '1.0.2'
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ else:
|
|||||||
|
|
||||||
|
|
||||||
if sys.version_info < (3, 6):
|
if sys.version_info < (3, 6):
|
||||||
from collections import Sized, Iterable, Container
|
from collections import Container, Iterable, Sized
|
||||||
|
|
||||||
def _check_methods(C, *methods):
|
def _check_methods(C, *methods):
|
||||||
mro = C.__mro__
|
mro = C.__mro__
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"""Bag class definitions."""
|
"""Bag class definitions."""
|
||||||
import heapq
|
import heapq
|
||||||
|
from collections import Hashable, MutableSet, Set
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
from collections import Set, MutableSet, Hashable
|
|
||||||
|
|
||||||
from . import _compat
|
from . import _compat
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"""Class definition for bijection."""
|
"""Class definition for bijection."""
|
||||||
|
|
||||||
from collections import MutableMapping, Mapping
|
from collections import Mapping, MutableMapping
|
||||||
|
|
||||||
|
|
||||||
class bijection(MutableMapping):
|
class bijection(MutableMapping):
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
"""RangeMap class definition."""
|
"""RangeMap class definition."""
|
||||||
from bisect import bisect_left, bisect_right
|
from bisect import bisect_left, bisect_right
|
||||||
from collections import namedtuple, Mapping, MappingView, Set
|
from collections import Mapping, MappingView, Set, namedtuple
|
||||||
|
|
||||||
|
|
||||||
# Used to mark unmapped ranges
|
# Used to mark unmapped ranges
|
||||||
_empty = object()
|
_empty = object()
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
"""Setlist class definitions."""
|
"""Setlist class definitions."""
|
||||||
import random as random_
|
import random as random_
|
||||||
|
from collections import Hashable, MutableSequence, MutableSet, Sequence, Set
|
||||||
from collections import (
|
|
||||||
Sequence,
|
|
||||||
Set,
|
|
||||||
MutableSequence,
|
|
||||||
MutableSet,
|
|
||||||
Hashable,
|
|
||||||
)
|
|
||||||
|
|
||||||
from . import _util
|
from . import _util
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
sys.path.append(os.path.join(sys._MEIPASS, "ext"))
|
sys.path.append(os.path.join(sys._MEIPASS, "ext"))
|
||||||
|
|||||||
@@ -14,3 +14,6 @@ dependencies = [
|
|||||||
"pyyaml>=6.0.1",
|
"pyyaml>=6.0.1",
|
||||||
"websockets>=11.0.3",
|
"websockets>=11.0.3",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[tool.isort]
|
||||||
|
profile = "black"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import os # for env vars
|
import os # for env vars
|
||||||
import stat # file statistics
|
import stat # file statistics
|
||||||
import sys # default system info
|
import sys # default system info
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import distro
|
import distro
|
||||||
except ModuleNotFoundError as e:
|
except ModuleNotFoundError as e:
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import common
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import urllib.request, ssl
|
import ssl
|
||||||
import subprocess # do stuff at the shell level
|
import subprocess # do stuff at the shell level
|
||||||
|
import urllib.request
|
||||||
|
|
||||||
|
import common
|
||||||
|
|
||||||
env = common.prepare_env()
|
env = common.prepare_env()
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
# import modules
|
# import modules
|
||||||
import common # app common functions
|
|
||||||
|
|
||||||
import json # json manipulation
|
import json # json manipulation
|
||||||
import os # for os data, filesystem manipulation
|
import os # for os data, filesystem manipulation
|
||||||
import subprocess # for running shell commands
|
import subprocess # for running shell commands
|
||||||
import sys # for system commands
|
import sys # for system commands
|
||||||
import traceback # for errors
|
import traceback # for errors
|
||||||
|
|
||||||
|
import common # app common functions
|
||||||
|
|
||||||
# get env
|
# get env
|
||||||
env = common.prepare_env() # get environment variables
|
env = common.prepare_env() # get environment variables
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import common
|
|
||||||
import os # for env vars
|
import os # for env vars
|
||||||
import sys # for path
|
import sys # for path
|
||||||
import urllib.request # for downloads
|
import urllib.request # for downloads
|
||||||
from shutil import unpack_archive
|
from shutil import unpack_archive
|
||||||
|
|
||||||
|
import common
|
||||||
|
|
||||||
# only do stuff if we don't have a UPX folder
|
# only do stuff if we don't have a UPX folder
|
||||||
|
|
||||||
if not os.path.isdir(os.path.join(".","upx")):
|
if not os.path.isdir(os.path.join(".","upx")):
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import subprocess # do stuff at the shell level
|
|
||||||
import os
|
import os
|
||||||
|
import subprocess # do stuff at the shell level
|
||||||
|
|
||||||
|
|
||||||
def git_clean(clean_ignored=True, clean_user=False):
|
def git_clean(clean_ignored=True, clean_user=False):
|
||||||
excludes = [
|
excludes = [
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import common
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import subprocess # do stuff at the shell level
|
import subprocess # do stuff at the shell level
|
||||||
|
|
||||||
|
import common
|
||||||
|
|
||||||
env = common.prepare_env()
|
env = common.prepare_env()
|
||||||
|
|
||||||
pip_requirements = os.path.join(".","resources","app","meta","manifests","pip_requirements.txt")
|
pip_requirements = os.path.join(".","resources","app","meta","manifests","pip_requirements.txt")
|
||||||
|
|||||||
@@ -6,9 +6,10 @@ import json
|
|||||||
import os
|
import os
|
||||||
import ssl
|
import ssl
|
||||||
import urllib.request
|
import urllib.request
|
||||||
import yaml
|
|
||||||
from json.decoder import JSONDecodeError
|
from json.decoder import JSONDecodeError
|
||||||
|
|
||||||
|
import yaml
|
||||||
|
|
||||||
allACTIONS = {}
|
allACTIONS = {}
|
||||||
listACTIONS = []
|
listACTIONS = []
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import install
|
|
||||||
import get_get_pip
|
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
import get_get_pip
|
||||||
|
import install
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(add_help=False)
|
parser = argparse.ArgumentParser(add_help=False)
|
||||||
parser.add_argument('--py', default=0)
|
parser.add_argument('--py', default=0)
|
||||||
parser.add_argument('--user', default=False, action="store_true")
|
parser.add_argument('--user', default=False, action="store_true")
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
def get_py_path():
|
def get_py_path():
|
||||||
user_paths = os.environ["PATH"].split(os.pathsep)
|
user_paths = os.environ["PATH"].split(os.pathsep)
|
||||||
(python,py) = ("","")
|
(python,py) = ("","")
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import common
|
|
||||||
import os # for env vars
|
import os # for env vars
|
||||||
from shutil import copy # file manipulation
|
from shutil import copy # file manipulation
|
||||||
|
|
||||||
|
import common
|
||||||
|
|
||||||
env = common.prepare_env()
|
env = common.prepare_env()
|
||||||
|
|
||||||
# set tag to app_version.txt
|
# set tag to app_version.txt
|
||||||
|
|||||||
@@ -3,10 +3,11 @@ Locate and prepare binary builds
|
|||||||
"""
|
"""
|
||||||
# import distutils.dir_util # for copying trees
|
# import distutils.dir_util # for copying trees
|
||||||
import os # for env vars
|
import os # for env vars
|
||||||
|
from shutil import move # file manipulation
|
||||||
|
|
||||||
# import stat # for file stats
|
# import stat # for file stats
|
||||||
# import subprocess # do stuff at the shell level
|
# import subprocess # do stuff at the shell level
|
||||||
import common
|
import common
|
||||||
from shutil import move # file manipulation
|
|
||||||
|
|
||||||
env = common.prepare_env()
|
env = common.prepare_env()
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,10 @@ import distutils.dir_util # for copying trees
|
|||||||
import os # for env vars
|
import os # for env vars
|
||||||
import stat # for file stats
|
import stat # for file stats
|
||||||
import subprocess # do stuff at the shell level
|
import subprocess # do stuff at the shell level
|
||||||
|
from shutil import copy, make_archive, move, rmtree # file manipulation
|
||||||
|
|
||||||
import common
|
import common
|
||||||
from git_clean import git_clean
|
from git_clean import git_clean
|
||||||
from shutil import copy, make_archive, move, rmtree # file manipulation
|
|
||||||
|
|
||||||
env = common.prepare_env() # get env vars
|
env = common.prepare_env() # get env vars
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import json
|
|||||||
import locale
|
import locale
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
class BabelFish():
|
class BabelFish():
|
||||||
def __init__(self,subpath=["resources","app","meta"],lang=None):
|
def __init__(self,subpath=["resources","app","meta"],lang=None):
|
||||||
localization_string = locale.getdefaultlocale()[0] #get set localization
|
localization_string = locale.getdefaultlocale()[0] #get set localization
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
import os
|
import os
|
||||||
import urllib.request
|
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
import yaml
|
import urllib.request
|
||||||
from typing import Any
|
|
||||||
from yaml.representer import Representer
|
|
||||||
from Utils import HexInt, hex_representer
|
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
import yaml
|
||||||
|
from yaml.representer import Representer
|
||||||
|
|
||||||
import RaceRandom as random
|
import RaceRandom as random
|
||||||
from BaseClasses import LocationType, DoorType
|
from BaseClasses import DoorType, LocationType
|
||||||
from OverworldShuffle import default_flute_connections, flute_data
|
from OverworldShuffle import default_flute_connections, flute_data
|
||||||
from source.tools.MysteryUtils import roll_settings, get_weights
|
from source.tools.MysteryUtils import get_weights, roll_settings
|
||||||
|
from Utils import HexInt, hex_representer
|
||||||
|
|
||||||
|
|
||||||
class CustomSettings(object):
|
class CustomSettings(object):
|
||||||
|
|||||||
@@ -1,5 +1,20 @@
|
|||||||
from tkinter import Button, Canvas, Label, LabelFrame, Frame, PhotoImage, Scrollbar, Toplevel, LEFT, BOTTOM, X, RIGHT, TOP
|
|
||||||
import os
|
import os
|
||||||
|
from tkinter import (
|
||||||
|
BOTTOM,
|
||||||
|
LEFT,
|
||||||
|
RIGHT,
|
||||||
|
TOP,
|
||||||
|
Button,
|
||||||
|
Canvas,
|
||||||
|
Frame,
|
||||||
|
Label,
|
||||||
|
LabelFrame,
|
||||||
|
PhotoImage,
|
||||||
|
Scrollbar,
|
||||||
|
Toplevel,
|
||||||
|
X,
|
||||||
|
)
|
||||||
|
|
||||||
from GuiUtils import ToolTips, set_icon
|
from GuiUtils import ToolTips, set_icon
|
||||||
from Utils import local_path
|
from Utils import local_path
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from enum import IntEnum
|
|
||||||
import random
|
import random
|
||||||
|
from enum import IntEnum
|
||||||
|
|
||||||
from Utils import int16_as_bytes, snes_to_pc
|
from Utils import int16_as_bytes, snes_to_pc
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,36 @@
|
|||||||
from tkinter import filedialog, messagebox, Button, Canvas, Label, LabelFrame, Frame, PhotoImage, Scrollbar, Toplevel, ALL, LEFT, BOTTOM, X, RIGHT, TOP, EW, NS
|
|
||||||
from glob import glob
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import shutil
|
import shutil
|
||||||
import ssl
|
import ssl
|
||||||
|
import webbrowser
|
||||||
|
from glob import glob
|
||||||
|
from tkinter import (
|
||||||
|
ALL,
|
||||||
|
BOTTOM,
|
||||||
|
EW,
|
||||||
|
LEFT,
|
||||||
|
NS,
|
||||||
|
RIGHT,
|
||||||
|
TOP,
|
||||||
|
Button,
|
||||||
|
Canvas,
|
||||||
|
Frame,
|
||||||
|
Label,
|
||||||
|
LabelFrame,
|
||||||
|
PhotoImage,
|
||||||
|
Scrollbar,
|
||||||
|
Toplevel,
|
||||||
|
X,
|
||||||
|
filedialog,
|
||||||
|
messagebox,
|
||||||
|
)
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
from urllib.request import urlopen
|
from urllib.request import urlopen
|
||||||
import webbrowser
|
|
||||||
from GuiUtils import ToolTips, set_icon, BackgroundTaskProgress
|
from GuiUtils import BackgroundTaskProgress, ToolTips, set_icon
|
||||||
from Rom import Sprite
|
from Rom import Sprite
|
||||||
from Utils import is_bundled, local_path, output_path, open_file
|
from Utils import is_bundled, local_path, open_file, output_path
|
||||||
|
|
||||||
|
|
||||||
class SpriteSelector(object):
|
class SpriteSelector(object):
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
import platform, sys, os, subprocess
|
import os
|
||||||
|
import platform
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
except ModuleNotFoundError as e:
|
except ModuleNotFoundError as e:
|
||||||
@@ -7,6 +11,7 @@ import datetime
|
|||||||
|
|
||||||
from Versions import DRVersion, GKVersion, ORVersion
|
from Versions import DRVersion, GKVersion, ORVersion
|
||||||
|
|
||||||
|
|
||||||
def diagpad(str):
|
def diagpad(str):
|
||||||
return str.ljust(40, '.')
|
return str.ljust(40, '.')
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,18 @@
|
|||||||
import RaceRandom as random
|
|
||||||
import collections
|
import collections
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from BaseClasses import CrystalBarrier, DoorType, Hook, RegionType, Sector
|
import RaceRandom as random
|
||||||
from BaseClasses import hook_from_door, flooded_keys
|
from BaseClasses import (
|
||||||
from Regions import location_events, flooded_keys_reverse
|
CrystalBarrier,
|
||||||
|
DoorType,
|
||||||
|
Hook,
|
||||||
|
RegionType,
|
||||||
|
Sector,
|
||||||
|
flooded_keys,
|
||||||
|
hook_from_door,
|
||||||
|
)
|
||||||
|
from Regions import flooded_keys_reverse, location_events
|
||||||
|
|
||||||
|
|
||||||
def pre_validate(builder, entrance_region_names, split_dungeon, world, player):
|
def pre_validate(builder, entrance_region_names, split_dungeon, world, player):
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
from collections import defaultdict, deque
|
|
||||||
import typing
|
import typing
|
||||||
|
from collections import defaultdict, deque
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
from yaml.representer import Representer
|
from yaml.representer import Representer
|
||||||
@@ -13,9 +13,9 @@ import RaceRandom as random
|
|||||||
from BaseClasses import Location, LocationType, RegionType
|
from BaseClasses import Location, LocationType, RegionType
|
||||||
from Items import ItemFactory
|
from Items import ItemFactory
|
||||||
from PotShuffle import key_drop_special
|
from PotShuffle import key_drop_special
|
||||||
from Utils import snes_to_pc, pc_to_snes, int16_as_bytes
|
|
||||||
|
|
||||||
from source.overworld.EntranceData import door_addresses
|
from source.overworld.EntranceData import door_addresses
|
||||||
|
from Utils import int16_as_bytes, pc_to_snes, snes_to_pc
|
||||||
|
|
||||||
|
|
||||||
class EnemyStats:
|
class EnemyStats:
|
||||||
def __init__(self, sprite, static, drop_flag=False, prize_pack: typing.Union[tuple, int] = 0,
|
def __init__(self, sprite, static, drop_flag=False, prize_pack: typing.Union[tuple, int] = 0,
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
from enum import IntFlag as FastEnum
|
from enum import IntFlag as FastEnum
|
||||||
|
|
||||||
|
|
||||||
from RoomData import DoorKind, Position
|
from RoomData import DoorKind, Position
|
||||||
from source.dungeon.RoomObject import RoomObject, DoorObject
|
from source.dungeon.RoomObject import DoorObject, RoomObject
|
||||||
|
|
||||||
|
|
||||||
class Room:
|
class Room:
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import RaceRandom as random
|
import RaceRandom as random
|
||||||
from Utils import snes_to_pc
|
from source.dungeon.EnemyList import EnemySprite, Sprite, SpriteType
|
||||||
|
from source.dungeon.RoomList import Room0006, boss_rooms, gt_boss_room
|
||||||
from source.dungeon.EnemyList import EnemySprite, SpriteType, Sprite
|
|
||||||
from source.dungeon.RoomList import boss_rooms, gt_boss_room, Room0006
|
|
||||||
from source.dungeon.RoomObject import RoomObject
|
from source.dungeon.RoomObject import RoomObject
|
||||||
from source.enemizer.SpriteSheets import required_boss_sheets
|
from source.enemizer.SpriteSheets import required_boss_sheets
|
||||||
|
from Utils import snes_to_pc
|
||||||
|
|
||||||
|
|
||||||
def get_dungeon_boss_room(dungeon_name, level):
|
def get_dungeon_boss_room(dungeon_name, level):
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
import RaceRandom as random
|
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from Utils import snes_to_pc
|
|
||||||
|
|
||||||
from source.dungeon.EnemyList import SpriteType, EnemySprite, sprite_translation
|
import RaceRandom as random
|
||||||
|
from source.dungeon.EnemyList import EnemySprite, SpriteType, sprite_translation
|
||||||
from source.dungeon.RoomList import Room010C
|
from source.dungeon.RoomList import Room010C
|
||||||
from source.enemizer.SpecialEnemyModes import set_mimics, write_mimic_changes
|
from source.enemizer.SpecialEnemyModes import set_mimics, write_mimic_changes
|
||||||
from source.enemizer.SpriteSheets import sub_group_choices, sheets_with_free_gfx
|
from source.enemizer.SpriteSheets import (
|
||||||
from source.enemizer.SpriteSheets import randomize_underworld_sprite_sheets, randomize_overworld_sprite_sheets
|
randomize_overworld_sprite_sheets,
|
||||||
|
randomize_underworld_sprite_sheets,
|
||||||
|
sheets_with_free_gfx,
|
||||||
|
sub_group_choices,
|
||||||
|
)
|
||||||
from source.enemizer.TilePattern import tile_patterns
|
from source.enemizer.TilePattern import tile_patterns
|
||||||
|
from Utils import snes_to_pc
|
||||||
|
|
||||||
shutter_sprites = {
|
shutter_sprites = {
|
||||||
0xb8: {0, 1, 2, 3, 4, 5}, 0xb: {4, 5, 6, 7, 8, 9}, 0x1b: {3, 4, 5}, 0x4b: {0, 3, 4}, 0x4: {9, 13, 14},
|
0xb8: {0, 1, 2, 3, 4, 5}, 0xb: {4, 5, 6, 7, 8, 9}, 0x1b: {3, 4, 5}, 0x4b: {0, 3, 4}, 0x4: {9, 13, 14},
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
from types import SimpleNamespace
|
|
||||||
from collections import Counter, defaultdict
|
from collections import Counter, defaultdict
|
||||||
|
from types import SimpleNamespace
|
||||||
|
|
||||||
from source.dungeon.EnemyList import enemy_names, SpriteType
|
|
||||||
from source.enemizer.Enemizer import randomize_underworld_rooms, randomize_overworld_enemies
|
|
||||||
from source.enemizer.SpriteSheets import randomize_underworld_sprite_sheets, randomize_overworld_sprite_sheets
|
|
||||||
from source.rom.DataTables import init_data_tables
|
|
||||||
from source.enemizer.DamageTables import DamageTable
|
|
||||||
import RaceRandom as random
|
import RaceRandom as random
|
||||||
|
from source.dungeon.EnemyList import SpriteType, enemy_names
|
||||||
|
from source.enemizer.DamageTables import DamageTable
|
||||||
|
from source.enemizer.Enemizer import (
|
||||||
|
randomize_overworld_enemies,
|
||||||
|
randomize_underworld_rooms,
|
||||||
|
)
|
||||||
|
from source.enemizer.SpriteSheets import (
|
||||||
|
randomize_overworld_sprite_sheets,
|
||||||
|
randomize_underworld_sprite_sheets,
|
||||||
|
)
|
||||||
|
from source.rom.DataTables import init_data_tables
|
||||||
|
|
||||||
|
|
||||||
def calculate_odds():
|
def calculate_odds():
|
||||||
|
|||||||
@@ -2,9 +2,8 @@ import math
|
|||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
import RaceRandom as random
|
import RaceRandom as random
|
||||||
|
|
||||||
from source.logic.Rule import RuleFactory
|
|
||||||
from source.dungeon.EnemyList import EnemySprite
|
from source.dungeon.EnemyList import EnemySprite
|
||||||
|
from source.logic.Rule import RuleFactory
|
||||||
|
|
||||||
|
|
||||||
# these are for drops only
|
# these are for drops only
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from source.dungeon.EnemyList import Sprite, EnemySprite
|
from source.dungeon.EnemyList import EnemySprite, Sprite
|
||||||
|
|
||||||
vanilla_sprites_ow = {}
|
vanilla_sprites_ow = {}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
import RaceRandom as random
|
import RaceRandom as random
|
||||||
|
from source.dungeon.EnemyList import (
|
||||||
|
EnemySprite,
|
||||||
|
SpriteType,
|
||||||
|
enemy_names,
|
||||||
|
sprite_translation,
|
||||||
|
)
|
||||||
from Utils import snes_to_pc
|
from Utils import snes_to_pc
|
||||||
|
|
||||||
from source.dungeon.EnemyList import EnemySprite, SpriteType, sprite_translation, enemy_names
|
|
||||||
|
|
||||||
change_idx_1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 13, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 31, 32, 35, 38, 65, 66, 67, 68, 70, 71, 76, 77, 78, 81, 83, 89, 91, 92, 94, 97, 100, 101, 102, 103, 104, 105, 106, 107]
|
change_idx_1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 13, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 31, 32, 35, 38, 65, 66, 67, 68, 70, 71, 76, 77, 78, 81, 83, 89, 91, 92, 94, 97, 100, 101, 102, 103, 104, 105, 106, 107]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
import logging
|
import logging
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
import RaceRandom as random
|
|
||||||
|
|
||||||
from source.dungeon.EnemyList import EnemySprite, SpriteType, enemy_names, sprite_translation, overlord_names
|
import RaceRandom as random
|
||||||
|
from source.dungeon.EnemyList import (
|
||||||
|
EnemySprite,
|
||||||
|
SpriteType,
|
||||||
|
enemy_names,
|
||||||
|
overlord_names,
|
||||||
|
sprite_translation,
|
||||||
|
)
|
||||||
from source.dungeon.RoomConstants import *
|
from source.dungeon.RoomConstants import *
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import os
|
|
||||||
import json
|
|
||||||
import codecs
|
import codecs
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
directory = './EnemizerCLI.Core/tiles'
|
directory = './EnemizerCLI.Core/tiles'
|
||||||
|
|||||||
@@ -1,15 +1,31 @@
|
|||||||
from tkinter import ttk, filedialog, messagebox, StringVar, Button, Entry, Frame, Label, E, W, LEFT, RIGHT, X, BOTTOM
|
|
||||||
from AdjusterMain import adjust, patch
|
|
||||||
from argparse import Namespace
|
|
||||||
from source.classes.SpriteSelector import SpriteSelector
|
|
||||||
from source.classes.ItemGfxSelector import ItemGfxSelector
|
|
||||||
import source.gui.widgets as widgets
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
from argparse import Namespace
|
||||||
|
from tkinter import (
|
||||||
|
BOTTOM,
|
||||||
|
LEFT,
|
||||||
|
RIGHT,
|
||||||
|
Button,
|
||||||
|
E,
|
||||||
|
Entry,
|
||||||
|
Frame,
|
||||||
|
Label,
|
||||||
|
StringVar,
|
||||||
|
W,
|
||||||
|
X,
|
||||||
|
filedialog,
|
||||||
|
messagebox,
|
||||||
|
ttk,
|
||||||
|
)
|
||||||
|
|
||||||
|
import source.gui.widgets as widgets
|
||||||
|
from AdjusterMain import adjust, patch
|
||||||
|
from source.classes.ItemGfxSelector import ItemGfxSelector
|
||||||
|
from source.classes.SpriteSelector import SpriteSelector
|
||||||
from Utils import output_path
|
from Utils import output_path
|
||||||
|
|
||||||
|
|
||||||
def adjust_page(top, parent, settings):
|
def adjust_page(top, parent, settings):
|
||||||
# Adjust page
|
# Adjust page
|
||||||
self = ttk.Frame(parent)
|
self = ttk.Frame(parent)
|
||||||
|
|||||||
+19
-7
@@ -1,17 +1,29 @@
|
|||||||
from tkinter import ttk, messagebox, StringVar, Button, Entry, Frame, Label, LEFT, RIGHT, X
|
|
||||||
from argparse import Namespace
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
|
from argparse import Namespace
|
||||||
|
from tkinter import (
|
||||||
|
LEFT,
|
||||||
|
RIGHT,
|
||||||
|
Button,
|
||||||
|
Entry,
|
||||||
|
Frame,
|
||||||
|
Label,
|
||||||
|
StringVar,
|
||||||
|
X,
|
||||||
|
messagebox,
|
||||||
|
ttk,
|
||||||
|
)
|
||||||
|
|
||||||
|
import source.classes.constants as CONST
|
||||||
|
import source.gui.widgets as widgets
|
||||||
from CLI import parse_cli
|
from CLI import parse_cli
|
||||||
from Fill import FillError
|
from Fill import FillError
|
||||||
from Main import main, export_yaml, EnemizerError
|
from Main import EnemizerError, export_yaml, main
|
||||||
from Utils import local_path, output_path, open_file, update_deprecated_args
|
|
||||||
import source.classes.constants as CONST
|
|
||||||
from source.gui.randomize.multiworld import multiworld_page
|
|
||||||
import source.gui.widgets as widgets
|
|
||||||
from source.classes.Empty import Empty
|
from source.classes.Empty import Empty
|
||||||
|
from source.gui.randomize.multiworld import multiworld_page
|
||||||
|
from Utils import local_path, open_file, output_path, update_deprecated_args
|
||||||
|
|
||||||
|
|
||||||
def bottom_frame(self, parent, args=None):
|
def bottom_frame(self, parent, args=None):
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
from tkinter import ttk, Frame, N, E, W, LEFT, TOP, X, VERTICAL, Y
|
|
||||||
import source.gui.widgets as widgets
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
from tkinter import LEFT, TOP, VERTICAL, E, Frame, N, W, X, Y, ttk
|
||||||
|
|
||||||
import source.classes.constants as CONST
|
import source.classes.constants as CONST
|
||||||
|
import source.gui.widgets as widgets
|
||||||
|
|
||||||
|
|
||||||
def custom_page(top,parent):
|
def custom_page(top,parent):
|
||||||
# Custom Item Pool
|
# Custom Item Pool
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
from source.classes.SpriteSelector import SpriteSelector as spriteSelector
|
|
||||||
from source.gui.randomize.gameoptions import set_sprite
|
|
||||||
from Rom import Sprite, get_sprite_from_name
|
|
||||||
from Utils import update_deprecated_args
|
|
||||||
import source.classes.constants as CONST
|
import source.classes.constants as CONST
|
||||||
|
from Rom import Sprite, get_sprite_from_name
|
||||||
from source.classes.BabelFish import BabelFish
|
from source.classes.BabelFish import BabelFish
|
||||||
from source.classes.Empty import Empty
|
from source.classes.Empty import Empty
|
||||||
|
from source.classes.SpriteSelector import SpriteSelector as spriteSelector
|
||||||
|
from source.gui.randomize.gameoptions import set_sprite
|
||||||
|
from Utils import update_deprecated_args
|
||||||
|
|
||||||
|
|
||||||
# Load args/settings for most tabs
|
# Load args/settings for most tabs
|
||||||
def loadcliargs(gui, args, settings=None):
|
def loadcliargs(gui, args, settings=None):
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
from tkinter import ttk, Frame, Label, E, W, LEFT, RIGHT, TOP
|
|
||||||
import source.gui.widgets as widgets
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
from tkinter import LEFT, RIGHT, TOP, E, Frame, Label, W, ttk
|
||||||
|
|
||||||
|
import source.gui.widgets as widgets
|
||||||
|
|
||||||
|
|
||||||
def dungeon_page(parent):
|
def dungeon_page(parent):
|
||||||
# Dungeon Shuffle
|
# Dungeon Shuffle
|
||||||
|
|||||||
@@ -1,10 +1,27 @@
|
|||||||
from tkinter import ttk, filedialog, StringVar, Button, Entry, Frame, Label, N, E, W, LEFT, RIGHT, BOTTOM, X
|
|
||||||
import source.gui.widgets as widgets
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
from tkinter import (
|
||||||
|
BOTTOM,
|
||||||
|
LEFT,
|
||||||
|
RIGHT,
|
||||||
|
Button,
|
||||||
|
E,
|
||||||
|
Entry,
|
||||||
|
Frame,
|
||||||
|
Label,
|
||||||
|
N,
|
||||||
|
StringVar,
|
||||||
|
W,
|
||||||
|
X,
|
||||||
|
filedialog,
|
||||||
|
ttk,
|
||||||
|
)
|
||||||
|
|
||||||
|
import source.gui.widgets as widgets
|
||||||
from source.classes.Empty import Empty
|
from source.classes.Empty import Empty
|
||||||
|
|
||||||
|
|
||||||
def enemizer_page(parent,settings):
|
def enemizer_page(parent,settings):
|
||||||
# Enemizer
|
# Enemizer
|
||||||
self = ttk.Frame(parent)
|
self = ttk.Frame(parent)
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
from tkinter import ttk, Frame, E, W, LEFT, RIGHT
|
|
||||||
import source.gui.widgets as widgets
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
from tkinter import LEFT, RIGHT, E, Frame, W, ttk
|
||||||
|
|
||||||
|
import source.gui.widgets as widgets
|
||||||
|
|
||||||
|
|
||||||
def entrando_page(parent):
|
def entrando_page(parent):
|
||||||
# Entrance Randomizer
|
# Entrance Randomizer
|
||||||
|
|||||||
@@ -1,10 +1,25 @@
|
|||||||
from tkinter import ttk, StringVar, Button, Entry, Frame, Label, NE, NW, E, W, LEFT, RIGHT
|
|
||||||
from functools import partial
|
|
||||||
import source.classes.SpriteSelector as spriteSelector
|
|
||||||
import source.classes.ItemGfxSelector as itemGfxSelector
|
|
||||||
import source.gui.widgets as widgets
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
from functools import partial
|
||||||
|
from tkinter import (
|
||||||
|
LEFT,
|
||||||
|
NE,
|
||||||
|
NW,
|
||||||
|
RIGHT,
|
||||||
|
Button,
|
||||||
|
E,
|
||||||
|
Entry,
|
||||||
|
Frame,
|
||||||
|
Label,
|
||||||
|
StringVar,
|
||||||
|
W,
|
||||||
|
ttk,
|
||||||
|
)
|
||||||
|
|
||||||
|
import source.classes.ItemGfxSelector as itemGfxSelector
|
||||||
|
import source.classes.SpriteSelector as spriteSelector
|
||||||
|
import source.gui.widgets as widgets
|
||||||
|
|
||||||
|
|
||||||
def gameoptions_page(top, parent):
|
def gameoptions_page(top, parent):
|
||||||
# Game Options
|
# Game Options
|
||||||
|
|||||||
@@ -1,12 +1,29 @@
|
|||||||
from tkinter import ttk, filedialog, StringVar, Button, Entry, Frame, Label, E, W, LEFT, X, Text, Tk, INSERT
|
|
||||||
import source.classes.diags as diagnostics
|
|
||||||
import source.gui.widgets as widgets
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
from tkinter import (
|
||||||
|
INSERT,
|
||||||
|
LEFT,
|
||||||
|
Button,
|
||||||
|
E,
|
||||||
|
Entry,
|
||||||
|
Frame,
|
||||||
|
Label,
|
||||||
|
StringVar,
|
||||||
|
Text,
|
||||||
|
Tk,
|
||||||
|
W,
|
||||||
|
X,
|
||||||
|
filedialog,
|
||||||
|
ttk,
|
||||||
|
)
|
||||||
|
|
||||||
|
import source.classes.diags as diagnostics
|
||||||
|
import source.gui.widgets as widgets
|
||||||
from source.classes.Empty import Empty
|
from source.classes.Empty import Empty
|
||||||
from Versions import DRVersion
|
from Versions import DRVersion
|
||||||
|
|
||||||
|
|
||||||
def generation_page(parent,settings):
|
def generation_page(parent,settings):
|
||||||
# Generation Setup
|
# Generation Setup
|
||||||
self = ttk.Frame(parent)
|
self = ttk.Frame(parent)
|
||||||
|
|||||||
@@ -1,8 +1,24 @@
|
|||||||
from tkinter import messagebox, ttk, font, Button, Frame, E, W, TOP, LEFT, RIGHT, X, Y, Label
|
|
||||||
import source.gui.widgets as widgets
|
|
||||||
from source.classes.Empty import Empty
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
from tkinter import (
|
||||||
|
LEFT,
|
||||||
|
RIGHT,
|
||||||
|
TOP,
|
||||||
|
Button,
|
||||||
|
E,
|
||||||
|
Frame,
|
||||||
|
Label,
|
||||||
|
W,
|
||||||
|
X,
|
||||||
|
Y,
|
||||||
|
font,
|
||||||
|
messagebox,
|
||||||
|
ttk,
|
||||||
|
)
|
||||||
|
|
||||||
|
import source.gui.widgets as widgets
|
||||||
|
from source.classes.Empty import Empty
|
||||||
|
|
||||||
|
|
||||||
def item_page(parent):
|
def item_page(parent):
|
||||||
# Item Randomizer
|
# Item Randomizer
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
from tkinter import ttk, StringVar, Entry, Frame, Label, N, E, W, X, LEFT
|
|
||||||
import source.gui.widgets as widgets
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
from tkinter import LEFT, E, Entry, Frame, Label, N, StringVar, W, X, ttk
|
||||||
|
|
||||||
|
import source.gui.widgets as widgets
|
||||||
from source.classes.Empty import Empty
|
from source.classes.Empty import Empty
|
||||||
|
|
||||||
|
|
||||||
def multiworld_page(parent,settings):
|
def multiworld_page(parent,settings):
|
||||||
# Multiworld
|
# Multiworld
|
||||||
self = ttk.Frame(parent)
|
self = ttk.Frame(parent)
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
from tkinter import ttk, Frame, Label, W, E, NW, LEFT, RIGHT, X, Y, TOP
|
|
||||||
import source.gui.widgets as widgets
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
from tkinter import LEFT, NW, RIGHT, TOP, E, Frame, Label, W, X, Y, ttk
|
||||||
|
|
||||||
|
import source.gui.widgets as widgets
|
||||||
|
|
||||||
|
|
||||||
def overworld_page(parent):
|
def overworld_page(parent):
|
||||||
# Overworld Shuffle
|
# Overworld Shuffle
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
from tkinter import ttk, Frame, N, E, W, LEFT, TOP, X, VERTICAL, Y
|
|
||||||
import source.gui.widgets as widgets
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
from tkinter import LEFT, TOP, VERTICAL, E, Frame, N, W, X, Y, ttk
|
||||||
|
|
||||||
import source.classes.constants as CONST
|
import source.classes.constants as CONST
|
||||||
|
import source.gui.widgets as widgets
|
||||||
|
|
||||||
|
|
||||||
def startinventory_page(top,parent):
|
def startinventory_page(top,parent):
|
||||||
# Starting Inventory
|
# Starting Inventory
|
||||||
|
|||||||
+17
-2
@@ -1,7 +1,22 @@
|
|||||||
from tkinter import messagebox, Checkbutton, Entry, Frame, IntVar, Label, OptionMenu, Spinbox, StringVar, LEFT, RIGHT, X
|
from tkinter import (
|
||||||
from tkinter import Button
|
LEFT,
|
||||||
|
RIGHT,
|
||||||
|
Button,
|
||||||
|
Checkbutton,
|
||||||
|
Entry,
|
||||||
|
Frame,
|
||||||
|
IntVar,
|
||||||
|
Label,
|
||||||
|
OptionMenu,
|
||||||
|
Spinbox,
|
||||||
|
StringVar,
|
||||||
|
X,
|
||||||
|
messagebox,
|
||||||
|
)
|
||||||
|
|
||||||
from source.classes.Empty import Empty
|
from source.classes.Empty import Empty
|
||||||
|
|
||||||
|
|
||||||
# Override Spinbox to include mousewheel support for changing value
|
# Override Spinbox to include mousewheel support for changing value
|
||||||
class mySpinbox(Spinbox):
|
class mySpinbox(Spinbox):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ from collections import deque
|
|||||||
|
|
||||||
from BaseClasses import CollectionState, RegionType
|
from BaseClasses import CollectionState, RegionType
|
||||||
from Dungeons import dungeon_table
|
from Dungeons import dungeon_table
|
||||||
from OWEdges import OWTileRegions, OWTileDistricts
|
from OWEdges import OWTileDistricts, OWTileRegions
|
||||||
|
|
||||||
|
|
||||||
class District(object):
|
class District(object):
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import RaceRandom as random
|
|
||||||
import logging
|
import logging
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
from source.item.District import resolve_districts
|
import RaceRandom as random
|
||||||
from BaseClasses import PotItem, PotFlags, LocationType
|
from BaseClasses import LocationType, PotFlags, PotItem
|
||||||
from DoorShuffle import validate_vanilla_reservation
|
from DoorShuffle import validate_vanilla_reservation
|
||||||
from Dungeons import dungeon_table
|
from Dungeons import dungeon_table
|
||||||
from Items import item_table, ItemFactory
|
from Items import ItemFactory, item_table
|
||||||
from PotShuffle import vanilla_pots
|
from PotShuffle import vanilla_pots
|
||||||
|
from source.item.District import resolve_districts
|
||||||
|
|
||||||
|
|
||||||
class ItemPoolConfig(object):
|
class ItemPoolConfig(object):
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import itertools
|
import itertools
|
||||||
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from fast_enum import FastEnum
|
from fast_enum import FastEnum
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
Build Entrypoints
|
Build Entrypoints
|
||||||
'''
|
'''
|
||||||
import json
|
import json
|
||||||
import platform
|
|
||||||
import os # for checking for dirs
|
import os # for checking for dirs
|
||||||
|
import platform
|
||||||
import re
|
import re
|
||||||
from json.decoder import JSONDecodeError
|
from json.decoder import JSONDecodeError
|
||||||
from subprocess import Popen, PIPE, STDOUT, CalledProcessError
|
from subprocess import PIPE, STDOUT, CalledProcessError, Popen
|
||||||
|
|
||||||
DEST_DIRECTORY = "."
|
DEST_DIRECTORY = "."
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ def check_requirements(console=False):
|
|||||||
logger.error('https://github.com/aerinon/ALttPDoorRandomizer/blob/DoorDev/docs/BUILDING.md')
|
logger.error('https://github.com/aerinon/ALttPDoorRandomizer/blob/DoorDev/docs/BUILDING.md')
|
||||||
else:
|
else:
|
||||||
import webbrowser
|
import webbrowser
|
||||||
from tkinter import Tk, Label, Button, Frame
|
from tkinter import Button, Frame, Label, Tk
|
||||||
|
|
||||||
master = Tk()
|
master = Tk()
|
||||||
master.title('Error')
|
master.title('Error')
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import RaceRandom as random
|
|
||||||
import logging
|
|
||||||
import copy
|
import copy
|
||||||
|
import logging
|
||||||
|
from collections import OrderedDict, defaultdict
|
||||||
|
|
||||||
from collections import defaultdict, OrderedDict
|
import RaceRandom as random
|
||||||
from BaseClasses import RegionType
|
from BaseClasses import RegionType
|
||||||
|
|
||||||
from source.overworld.EntranceData import door_addresses
|
from source.overworld.EntranceData import door_addresses
|
||||||
|
|
||||||
|
|
||||||
@@ -857,9 +856,9 @@ def get_nearby_entrances(avail, start_region):
|
|||||||
|
|
||||||
|
|
||||||
def get_accessible_entrances(start_region, avail, assumed_inventory=[], cross_world=False, region_rules=True, exit_rules=True, include_one_ways=False, restrictive_follower=False):
|
def get_accessible_entrances(start_region, avail, assumed_inventory=[], cross_world=False, region_rules=True, exit_rules=True, include_one_ways=False, restrictive_follower=False):
|
||||||
from Main import copy_world_premature
|
|
||||||
from BaseClasses import CollectionState
|
from BaseClasses import CollectionState
|
||||||
from Items import ItemFactory
|
from Items import ItemFactory
|
||||||
|
from Main import copy_world_premature
|
||||||
from OverworldShuffle import build_accessible_region_list, one_way_ledges
|
from OverworldShuffle import build_accessible_region_list, one_way_ledges
|
||||||
|
|
||||||
for p in range(1, avail.world.players + 1):
|
for p in range(1, avail.world.players + 1):
|
||||||
|
|||||||
@@ -1,13 +1,28 @@
|
|||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
from Utils import snes_to_pc, int24_as_bytes, int16_as_bytes, load_cached_yaml, pc_to_snes
|
from source.dungeon.EnemyList import (
|
||||||
|
EnemySprite,
|
||||||
from source.dungeon.EnemyList import EnemyTable, init_vanilla_sprites, vanilla_sprites, init_enemy_stats, EnemySprite
|
EnemyTable,
|
||||||
from source.dungeon.EnemyList import sprite_translation
|
init_enemy_stats,
|
||||||
|
init_vanilla_sprites,
|
||||||
|
sprite_translation,
|
||||||
|
vanilla_sprites,
|
||||||
|
)
|
||||||
from source.dungeon.RoomHeader import init_room_headers
|
from source.dungeon.RoomHeader import init_room_headers
|
||||||
from source.dungeon.RoomList import Room0127
|
from source.dungeon.RoomList import Room0127
|
||||||
from source.enemizer.OwEnemyList import init_vanilla_sprites_ow, vanilla_sprites_ow
|
from source.enemizer.OwEnemyList import init_vanilla_sprites_ow, vanilla_sprites_ow
|
||||||
from source.enemizer.SpriteSheets import init_sprite_sheets, init_sprite_requirements, SheetChoice
|
from source.enemizer.SpriteSheets import (
|
||||||
|
SheetChoice,
|
||||||
|
init_sprite_requirements,
|
||||||
|
init_sprite_sheets,
|
||||||
|
)
|
||||||
|
from Utils import (
|
||||||
|
int16_as_bytes,
|
||||||
|
int24_as_bytes,
|
||||||
|
load_cached_yaml,
|
||||||
|
pc_to_snes,
|
||||||
|
snes_to_pc,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def convert_area_id_to_offset(area_id):
|
def convert_area_id_to_offset(area_id):
|
||||||
|
|||||||
+2
-3
@@ -1,11 +1,10 @@
|
|||||||
# Code derived from https://github.com/marcrobledo/RomPatcher.js (MIT License)
|
# Code derived from https://github.com/marcrobledo/RomPatcher.js (MIT License)
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
from binascii import crc32
|
||||||
|
from collections import defaultdict
|
||||||
from time import perf_counter
|
from time import perf_counter
|
||||||
|
|
||||||
from collections import defaultdict
|
|
||||||
from binascii import crc32
|
|
||||||
try:
|
try:
|
||||||
from fast_enum import FastEnum
|
from fast_enum import FastEnum
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import RaceRandom as random
|
|
||||||
import os
|
import os
|
||||||
|
import urllib.parse
|
||||||
|
import urllib.request
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import urllib.request
|
|
||||||
import urllib.parse
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
import RaceRandom as random
|
||||||
|
|
||||||
|
|
||||||
def get_weights(path):
|
def get_weights(path):
|
||||||
if os.path.exists(Path(path)):
|
if os.path.exists(Path(path)):
|
||||||
|
|||||||
+5
-2
@@ -1,9 +1,12 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
from aenum import Enum, IntEnum, extend_enum
|
|
||||||
from source.classes.BabelFish import BabelFish
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from aenum import Enum, IntEnum, extend_enum
|
||||||
|
|
||||||
|
from source.classes.BabelFish import BabelFish
|
||||||
|
|
||||||
fish = BabelFish(lang="en")
|
fish = BabelFish(lang="en")
|
||||||
|
|
||||||
def tokenize(token):
|
def tokenize(token):
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
|
import argparse
|
||||||
|
import concurrent.futures
|
||||||
|
import multiprocessing
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import multiprocessing
|
|
||||||
import concurrent.futures
|
|
||||||
import argparse
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
cpu_threads = multiprocessing.cpu_count()
|
cpu_threads = multiprocessing.cpu_count()
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
|
import argparse
|
||||||
|
import concurrent.futures
|
||||||
import fnmatch
|
import fnmatch
|
||||||
|
import multiprocessing
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import multiprocessing
|
|
||||||
import concurrent.futures
|
|
||||||
import argparse
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
cpu_threads = multiprocessing.cpu_count()
|
cpu_threads = multiprocessing.cpu_count()
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from BaseClasses import World, CollectionState
|
from BaseClasses import CollectionState, World
|
||||||
from Dungeons import create_dungeons, get_dungeon_item_pool
|
from Dungeons import create_dungeons, get_dungeon_item_pool
|
||||||
from ItemList import difficulties, generate_itempool
|
from ItemList import difficulties, generate_itempool
|
||||||
from Items import ItemFactory
|
from Items import ItemFactory
|
||||||
from Regions import create_regions
|
from Regions import create_regions
|
||||||
from Rules import set_rules
|
from Rules import set_rules
|
||||||
from source.overworld.EntranceShuffle2 import mandatory_connections, connect_simple
|
from source.overworld.EntranceShuffle2 import connect_simple, mandatory_connections
|
||||||
|
|
||||||
|
|
||||||
class TestDungeon(unittest.TestCase):
|
class TestDungeon(unittest.TestCase):
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
|
from test.TestBase import TestBase
|
||||||
|
|
||||||
from BaseClasses import World
|
from BaseClasses import World
|
||||||
from DoorShuffle import link_doors
|
|
||||||
from Doors import create_doors
|
from Doors import create_doors
|
||||||
|
from DoorShuffle import link_doors
|
||||||
from Dungeons import create_dungeons, get_dungeon_item_pool
|
from Dungeons import create_dungeons, get_dungeon_item_pool
|
||||||
from OverworldShuffle import link_overworld
|
from ItemList import difficulties, generate_itempool
|
||||||
from ItemList import generate_itempool, difficulties
|
|
||||||
from Items import ItemFactory
|
from Items import ItemFactory
|
||||||
from Regions import create_regions, mark_light_dark_world_regions, create_dungeon_regions, create_shops
|
from OverworldShuffle import link_overworld
|
||||||
|
from Regions import (
|
||||||
|
create_dungeon_regions,
|
||||||
|
create_regions,
|
||||||
|
create_shops,
|
||||||
|
mark_light_dark_world_regions,
|
||||||
|
)
|
||||||
from RoomData import create_rooms
|
from RoomData import create_rooms
|
||||||
from Rules import set_rules
|
from Rules import set_rules
|
||||||
|
|
||||||
from source.overworld.EntranceShuffle2 import link_entrances_new
|
from source.overworld.EntranceShuffle2 import link_entrances_new
|
||||||
from test.TestBase import TestBase
|
|
||||||
|
|
||||||
|
|
||||||
class TestInverted(TestBase):
|
class TestInverted(TestBase):
|
||||||
|
|||||||
@@ -1,14 +1,29 @@
|
|||||||
import unittest
|
import unittest
|
||||||
|
from test.inverted.TestInverted import TestInverted
|
||||||
|
|
||||||
from BaseClasses import World
|
from BaseClasses import World
|
||||||
from Dungeons import create_dungeons
|
from Dungeons import create_dungeons
|
||||||
# todo: this test needs to be rewritten unfortunately
|
|
||||||
from source.overworld.EntranceShuffle2 import connect_entrance, Inverted_LW_Entrances, Inverted_LW_Dungeon_Entrances, Inverted_LW_Single_Cave_Doors, Inverted_Old_Man_Entrances, Inverted_DW_Entrances, Inverted_DW_Dungeon_Entrances, Inverted_DW_Single_Cave_Doors, \
|
|
||||||
Inverted_LW_Entrances_Must_Exit, Inverted_LW_Dungeon_Entrances_Must_Exit, Inverted_Bomb_Shop_Multi_Cave_Doors, Inverted_Bomb_Shop_Single_Cave_Doors, Inverted_Blacksmith_Single_Cave_Doors, Inverted_Blacksmith_Multi_Cave_Doors
|
|
||||||
from Regions import create_regions
|
|
||||||
from ItemList import difficulties
|
from ItemList import difficulties
|
||||||
|
from Regions import create_regions
|
||||||
from Rules import set_inverted_big_bomb_rules
|
from Rules import set_inverted_big_bomb_rules
|
||||||
from test.inverted.TestInverted import TestInverted
|
|
||||||
|
# todo: this test needs to be rewritten unfortunately
|
||||||
|
from source.overworld.EntranceShuffle2 import (
|
||||||
|
Inverted_Blacksmith_Multi_Cave_Doors,
|
||||||
|
Inverted_Blacksmith_Single_Cave_Doors,
|
||||||
|
Inverted_Bomb_Shop_Multi_Cave_Doors,
|
||||||
|
Inverted_Bomb_Shop_Single_Cave_Doors,
|
||||||
|
Inverted_DW_Dungeon_Entrances,
|
||||||
|
Inverted_DW_Entrances,
|
||||||
|
Inverted_DW_Single_Cave_Doors,
|
||||||
|
Inverted_LW_Dungeon_Entrances,
|
||||||
|
Inverted_LW_Dungeon_Entrances_Must_Exit,
|
||||||
|
Inverted_LW_Entrances,
|
||||||
|
Inverted_LW_Entrances_Must_Exit,
|
||||||
|
Inverted_LW_Single_Cave_Doors,
|
||||||
|
Inverted_Old_Man_Entrances,
|
||||||
|
connect_entrance,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class TestInvertedBombRules(TestInverted):
|
class TestInvertedBombRules(TestInverted):
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from test.inverted_owg.TestInvertedOWG import TestInvertedOWG
|
from test.inverted_owg.TestInvertedOWG import TestInvertedOWG
|
||||||
|
|
||||||
|
|
||||||
class TestDungeons(TestInvertedOWG):
|
class TestDungeons(TestInvertedOWG):
|
||||||
|
|
||||||
def testFirstDungeonChests(self):
|
def testFirstDungeonChests(self):
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
|
from test.TestBase import TestBase
|
||||||
|
|
||||||
from BaseClasses import World
|
from BaseClasses import World
|
||||||
from DoorShuffle import link_doors
|
|
||||||
from Doors import create_doors
|
from Doors import create_doors
|
||||||
|
from DoorShuffle import link_doors
|
||||||
from Dungeons import create_dungeons, get_dungeon_item_pool
|
from Dungeons import create_dungeons, get_dungeon_item_pool
|
||||||
from OverworldShuffle import link_overworld
|
from ItemList import difficulties, generate_itempool
|
||||||
from source.overworld.EntranceShuffle2 import link_entrances_new
|
|
||||||
from ItemList import generate_itempool, difficulties
|
|
||||||
from Items import ItemFactory
|
from Items import ItemFactory
|
||||||
from OverworldGlitchRules import create_owg_connections
|
from OverworldGlitchRules import create_owg_connections
|
||||||
from Regions import create_regions, mark_light_dark_world_regions, create_dungeon_regions, create_shops
|
from OverworldShuffle import link_overworld
|
||||||
|
from Regions import (
|
||||||
|
create_dungeon_regions,
|
||||||
|
create_regions,
|
||||||
|
create_shops,
|
||||||
|
mark_light_dark_world_regions,
|
||||||
|
)
|
||||||
from RoomData import create_rooms
|
from RoomData import create_rooms
|
||||||
from Rules import set_rules
|
from Rules import set_rules
|
||||||
from test.TestBase import TestBase
|
from source.overworld.EntranceShuffle2 import link_entrances_new
|
||||||
|
|
||||||
|
|
||||||
class TestInvertedOWG(TestBase):
|
class TestInvertedOWG(TestBase):
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user