isort
This commit is contained in:
+3
-2
@@ -1,13 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import os
|
||||
import logging
|
||||
import textwrap
|
||||
import os
|
||||
import sys
|
||||
import textwrap
|
||||
|
||||
from AdjusterMain import adjust
|
||||
from Rom import get_sprite_from_name
|
||||
|
||||
|
||||
class ArgumentDefaultsHelpFormatter(argparse.RawTextHelpFormatter):
|
||||
|
||||
def _get_help_string(self, action):
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
import logging
|
||||
|
||||
try:
|
||||
import bps.apply
|
||||
@@ -8,9 +8,9 @@ try:
|
||||
except ImportError:
|
||||
raise Exception('Could not load BPS module')
|
||||
|
||||
from Utils import output_path
|
||||
from Rom import LocalRom, apply_rom_settings
|
||||
from source.tools.BPS import bps_read_vlv
|
||||
from Utils import output_path
|
||||
|
||||
|
||||
def adjust(args):
|
||||
|
||||
+10
-5
@@ -2,7 +2,7 @@ import base64
|
||||
import copy
|
||||
import json
|
||||
import logging
|
||||
from collections import OrderedDict, Counter, deque, defaultdict
|
||||
from collections import Counter, OrderedDict, defaultdict, deque
|
||||
from enum import Enum, IntEnum, unique
|
||||
|
||||
try:
|
||||
@@ -10,12 +10,17 @@ try:
|
||||
except ImportError:
|
||||
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 source.classes.BabelFish import BabelFish
|
||||
from source.dungeon.RoomObject import RoomObject
|
||||
from source.overworld.EntranceData import door_addresses
|
||||
from Tables import (
|
||||
divisor_lookup,
|
||||
multiply_lookup,
|
||||
normal_offset_table,
|
||||
spiral_offset_table,
|
||||
)
|
||||
from Utils import int16_as_bytes
|
||||
|
||||
|
||||
class World(object):
|
||||
@@ -1664,8 +1669,8 @@ class Region(object):
|
||||
self.crystal_switch = False
|
||||
|
||||
def can_reach(self, state):
|
||||
from Utils import stack_size3a
|
||||
from DungeonGenerator import GenerationException
|
||||
from Utils import stack_size3a
|
||||
if stack_size3a() > self.world.players * 1000:
|
||||
raise GenerationException(f'Infinite loop detected for "{self.name}" located at \'Region.can_reach\'')
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import logging
|
||||
import RaceRandom as random
|
||||
|
||||
import RaceRandom as random
|
||||
from BaseClasses import Boss, FillError
|
||||
from source.enemizer.Bossmizer import boss_adjust
|
||||
|
||||
|
||||
@@ -2,14 +2,13 @@ import argparse
|
||||
import copy
|
||||
import json
|
||||
import os
|
||||
import textwrap
|
||||
import shlex
|
||||
import sys
|
||||
import textwrap
|
||||
|
||||
from source.classes.BabelFish import BabelFish
|
||||
|
||||
from Utils import update_deprecated_args
|
||||
from source.classes.CustomSettings import CustomSettings
|
||||
from Utils import update_deprecated_args
|
||||
|
||||
|
||||
class ArgumentDefaultsHelpFormatter(argparse.RawTextHelpFormatter):
|
||||
|
||||
@@ -3,6 +3,7 @@ from typing import List
|
||||
|
||||
import RaceRandom as random
|
||||
|
||||
|
||||
def _load_entries():
|
||||
entries = []
|
||||
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 time
|
||||
from enum import unique, Flag
|
||||
from typing import DefaultDict, Dict, List
|
||||
from collections import defaultdict, deque
|
||||
from enum import Flag, unique
|
||||
from itertools import chain
|
||||
from typing import DefaultDict, Dict, List
|
||||
|
||||
from BaseClasses import RegionType, Region, Door, DoorType, Sector, CrystalBarrier, DungeonInfo, dungeon_keys
|
||||
from BaseClasses import PotFlags, LocationType, Direction, KeyRuleType
|
||||
import RaceRandom as random
|
||||
from BaseClasses import (
|
||||
CrystalBarrier,
|
||||
Direction,
|
||||
Door,
|
||||
DoorType,
|
||||
DungeonInfo,
|
||||
KeyRuleType,
|
||||
LocationType,
|
||||
PotFlags,
|
||||
Region,
|
||||
RegionType,
|
||||
Sector,
|
||||
dungeon_keys,
|
||||
)
|
||||
from Doors import reset_portals
|
||||
from Dungeons import dungeon_regions, region_starts, standard_starts, split_region_starts
|
||||
from Dungeons import dungeon_bigs, dungeon_hints
|
||||
from DungeonGenerator import (
|
||||
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 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 source.dungeon.DungeonStitcher import GenerationException, generate_dungeon
|
||||
from source.dungeon.DungeonStitcher import ExplorationState as ExplorationState2
|
||||
from DungeonGenerator import ExplorationState, convert_regions, determine_required_paths, drop_entrances
|
||||
from DungeonGenerator import create_dungeon_builders, split_dungeon_builder, simple_dungeon_builder, default_dungeon_entrances
|
||||
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
|
||||
from source.dungeon.DungeonStitcher import GenerationException, generate_dungeon
|
||||
from Utils import kth_combination, ncr
|
||||
|
||||
|
||||
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
|
||||
|
||||
# constants
|
||||
|
||||
+18
-8
@@ -1,22 +1,32 @@
|
||||
import RaceRandom as random
|
||||
import collections
|
||||
import itertools
|
||||
from collections import defaultdict, deque
|
||||
from functools import reduce
|
||||
import logging
|
||||
import math
|
||||
import operator as op
|
||||
import time
|
||||
from collections import defaultdict, deque
|
||||
from functools import reduce
|
||||
from typing import List
|
||||
|
||||
from BaseClasses import DoorType, Direction, CrystalBarrier, RegionType, Polarity, PolSlot, flooded_keys, Sector
|
||||
from BaseClasses import Hook, hook_from_door, Door
|
||||
from Regions import location_events, flooded_keys_reverse
|
||||
import RaceRandom as random
|
||||
from BaseClasses import (
|
||||
CrystalBarrier,
|
||||
Direction,
|
||||
Door,
|
||||
DoorType,
|
||||
Hook,
|
||||
Polarity,
|
||||
PolSlot,
|
||||
RegionType,
|
||||
Sector,
|
||||
flooded_keys,
|
||||
hook_from_door,
|
||||
)
|
||||
from Dungeons import split_region_starts
|
||||
from Regions import flooded_keys_reverse, location_events
|
||||
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 generate_dungeon_find_proposal
|
||||
|
||||
|
||||
class GraphPiece:
|
||||
|
||||
@@ -3,19 +3,19 @@ if __name__ == '__main__':
|
||||
from source.meta.check_requirements import check_requirements
|
||||
check_requirements(console=True)
|
||||
|
||||
import os
|
||||
import logging
|
||||
import RaceRandom as random
|
||||
import os
|
||||
import sys
|
||||
|
||||
from source.classes.BabelFish import BabelFish
|
||||
import RaceRandom as random
|
||||
import source.classes.diags as diagnostics
|
||||
|
||||
from CLI import parse_cli, get_args_priority
|
||||
from Main import main, EnemizerError, __version__
|
||||
from Rom import get_sprite_from_name
|
||||
from Utils import is_bundled, close_console
|
||||
from CLI import get_args_priority, parse_cli
|
||||
from Fill import FillError
|
||||
from Main import EnemizerError, __version__, main
|
||||
from Rom import get_sprite_from_name
|
||||
from source.classes.BabelFish import BabelFish
|
||||
from Utils import close_console, is_bundled
|
||||
|
||||
|
||||
def start():
|
||||
args = parse_cli(None)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import RaceRandom as random
|
||||
import collections
|
||||
import itertools
|
||||
import logging
|
||||
@@ -6,11 +5,18 @@ import math
|
||||
from collections import Counter
|
||||
from contextlib import suppress
|
||||
|
||||
import RaceRandom as random
|
||||
from BaseClasses import CollectionState, FillError, LocationType
|
||||
from Items import ItemFactory
|
||||
from Regions import shop_to_location_table, retro_shops
|
||||
from source.item.FillUtil import filter_locations, classify_major_items, replace_trash_item, vanilla_fallback
|
||||
from source.item.FillUtil import filter_special_locations, valid_pot_items
|
||||
from Regions import retro_shops, shop_to_location_table
|
||||
from source.item.FillUtil import (
|
||||
classify_major_items,
|
||||
filter_locations,
|
||||
filter_special_locations,
|
||||
replace_trash_item,
|
||||
valid_pot_items,
|
||||
vanilla_fallback,
|
||||
)
|
||||
|
||||
|
||||
def get_dungeon_item_pool(world):
|
||||
|
||||
@@ -5,29 +5,41 @@ if __name__ == '__main__':
|
||||
import json
|
||||
import os
|
||||
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 DungeonRandomizer import parse_cli
|
||||
from source.gui.adjust.overview import adjust_page
|
||||
from source.gui.startinventory.overview import startinventory_page
|
||||
from source.gui.custom.overview import custom_page
|
||||
from source.gui.loadcliargs import loadcliargs, loadadjustargs
|
||||
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.multiworld import multiworld_page
|
||||
from source.gui.randomize.gameoptions import gameoptions_page
|
||||
from source.gui.randomize.generation import generation_page
|
||||
from source.gui.bottom import bottom_frame, create_guiargs
|
||||
from GuiUtils import set_icon
|
||||
from Main import __version__ as ESVersion
|
||||
from OverworldShuffle import __version__ as ORVersion
|
||||
|
||||
from source.classes.BabelFish import BabelFish
|
||||
from source.classes.Empty import Empty
|
||||
from source.gui.adjust.overview import adjust_page
|
||||
from source.gui.bottom import bottom_frame, create_guiargs
|
||||
from source.gui.custom.overview import custom_page
|
||||
from source.gui.loadcliargs import loadadjustargs, loadcliargs
|
||||
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.gameoptions import gameoptions_page
|
||||
from source.gui.randomize.generation import generation_page
|
||||
from source.gui.randomize.item import item_page
|
||||
from source.gui.randomize.overworld import overworld_page
|
||||
from source.gui.startinventory.overview import startinventory_page
|
||||
|
||||
|
||||
def check_python_version(fish):
|
||||
|
||||
+2
-1
@@ -1,10 +1,11 @@
|
||||
import queue
|
||||
import os
|
||||
import queue
|
||||
import threading
|
||||
import tkinter as tk
|
||||
|
||||
from Utils import local_path
|
||||
|
||||
|
||||
def set_icon(window):
|
||||
er16 = tk.PhotoImage(file=local_path(os.path.join("data","ER16.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 math
|
||||
from collections import defaultdict, namedtuple
|
||||
|
||||
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
|
||||
|
||||
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.
|
||||
#Some basic items that various modes require are placed here, including pendants and crystals. Medallion requirements for the two relevant entrances are also decided.
|
||||
@@ -691,7 +709,7 @@ def create_farm_locations(world, player):
|
||||
world.dynamic_locations.append(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:
|
||||
loc = create_and_fill_location(region, 'Bush Drop', 'Farmable Bombs')
|
||||
add_bunny_rule(loc, player)
|
||||
|
||||
+10
-4
@@ -2,11 +2,17 @@ import itertools
|
||||
import logging
|
||||
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 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):
|
||||
|
||||
@@ -1,44 +1,97 @@
|
||||
import base64
|
||||
import copy
|
||||
from itertools import zip_longest
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import RaceRandom as random
|
||||
import string
|
||||
import time
|
||||
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 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 KeyDoorShuffle import validate_key_placement
|
||||
from OverworldGlitchRules import create_owg_connections
|
||||
from PotShuffle import shuffle_pots, shuffle_pot_switches
|
||||
from Regions import create_regions, create_shops, mark_light_dark_world_regions, create_dungeon_regions, adjust_locations
|
||||
from OverworldShuffle import (
|
||||
create_dynamic_flute_exits,
|
||||
create_dynamic_mirror_exits,
|
||||
link_overworld,
|
||||
update_world_regions,
|
||||
)
|
||||
from OWEdges import create_owedges
|
||||
from OverworldShuffle import link_overworld, update_world_regions, create_dynamic_flute_exits, create_dynamic_mirror_exits
|
||||
from Rom import patch_rom, patch_race_rom, apply_rom_settings, LocalRom, JsonRom, get_hash_string
|
||||
from Doors import create_doors
|
||||
from DoorShuffle import link_doors, connect_portal, link_doors_prep
|
||||
from PotShuffle import shuffle_pot_switches, shuffle_pots
|
||||
from Regions import (
|
||||
adjust_locations,
|
||||
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 Rules import set_rules
|
||||
from Dungeons import create_dungeons
|
||||
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.enemizer.DamageTables import DamageTable
|
||||
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.tools.BPS import create_bps_from_data
|
||||
from UnderworldGlitchRules import (
|
||||
connect_hmg_entrances_regions,
|
||||
create_hmg_entrances_regions,
|
||||
)
|
||||
from Utils import output_path, parse_player_names
|
||||
|
||||
version_number = '1.5.0'
|
||||
version_branch = '-u'
|
||||
|
||||
+6
-5
@@ -1,19 +1,20 @@
|
||||
import aioconsole
|
||||
import argparse
|
||||
import asyncio
|
||||
import colorama
|
||||
import json
|
||||
import logging
|
||||
import shlex
|
||||
import urllib.parse
|
||||
|
||||
import aioconsole
|
||||
import colorama
|
||||
import websockets
|
||||
|
||||
from BaseClasses import PotItem, PotFlags, LocationType
|
||||
import Items
|
||||
import Regions
|
||||
import PotShuffle
|
||||
import Regions
|
||||
import source.dungeon.EnemyList as EnemyList
|
||||
import source.rom.DataTables as DataTables
|
||||
from BaseClasses import LocationType, PotFlags, PotItem
|
||||
|
||||
|
||||
class ReceivedItem:
|
||||
@@ -975,8 +976,8 @@ async def track_locations(ctx : Context, roomid, roomdata):
|
||||
ow_unchecked[location] = (screenid, 0x40)
|
||||
ow_begin = min(ow_begin, screenid)
|
||||
ow_end = max(ow_end, screenid + 1)
|
||||
from Regions import bonk_prize_table
|
||||
from OWEdges import OWTileRegions
|
||||
from Regions import bonk_prize_table
|
||||
for location, (_, flag, _, _, region_name, _) in bonk_prize_table.items():
|
||||
if location not in ctx.locations_checked:
|
||||
if region_name in OWTileRegions:
|
||||
|
||||
+11
-5
@@ -1,4 +1,3 @@
|
||||
import aioconsole
|
||||
import argparse
|
||||
import asyncio
|
||||
import functools
|
||||
@@ -8,16 +7,23 @@ import re
|
||||
import shlex
|
||||
import ssl
|
||||
import urllib.request
|
||||
import websockets
|
||||
import zlib
|
||||
|
||||
from BaseClasses import PotItem, PotFlags
|
||||
import aioconsole
|
||||
import websockets
|
||||
|
||||
import Items
|
||||
import Regions
|
||||
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.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:
|
||||
def __init__(self, socket):
|
||||
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
import argparse
|
||||
import logging
|
||||
import RaceRandom as random
|
||||
|
||||
from yaml.constructor import SafeConstructor
|
||||
|
||||
import RaceRandom as random
|
||||
from DungeonRandomizer import parse_cli
|
||||
from Main import main as DRMain
|
||||
from source.classes.BabelFish import BabelFish
|
||||
from yaml.constructor import SafeConstructor
|
||||
|
||||
from source.tools.MysteryUtils import roll_settings, get_weights
|
||||
from source.tools.MysteryUtils import get_weights, roll_settings
|
||||
|
||||
|
||||
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 BaseClasses import Direction, OWEdge, PolSlot, Terrain, WorldType
|
||||
from Utils import bidict
|
||||
|
||||
|
||||
@unique
|
||||
class OpenStd(Enum):
|
||||
Open = 0
|
||||
|
||||
+34
-8
@@ -1,11 +1,30 @@
|
||||
import RaceRandom as random, logging, copy
|
||||
import copy
|
||||
import logging
|
||||
from collections import OrderedDict, defaultdict
|
||||
|
||||
import RaceRandom as random
|
||||
from BaseClasses import (
|
||||
Direction,
|
||||
Entrance,
|
||||
OWEdge,
|
||||
PolSlot,
|
||||
RegionType,
|
||||
Terrain,
|
||||
WorldType,
|
||||
)
|
||||
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 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
|
||||
|
||||
version_number = '0.6.1.7'
|
||||
@@ -1370,8 +1389,8 @@ def update_world_regions(world, player):
|
||||
world.get_region(name, player).type = RegionType.LightWorld
|
||||
|
||||
def can_reach_smith(world, player):
|
||||
from Items import ItemFactory
|
||||
from BaseClasses import CollectionState
|
||||
from Items import ItemFactory
|
||||
|
||||
def explore_region(region_name, region=None):
|
||||
nonlocal found
|
||||
@@ -1426,7 +1445,7 @@ def can_reach_smith(world, player):
|
||||
def build_sectors(world, player):
|
||||
from Main import copy_world_premature
|
||||
from OWEdges import OWTileRegions
|
||||
|
||||
|
||||
# perform accessibility check on duplicate world
|
||||
for p in range(1, world.players + 1):
|
||||
world.key_logic[p] = {}
|
||||
@@ -1478,8 +1497,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):
|
||||
from BaseClasses import CollectionState
|
||||
from Main import copy_world_premature
|
||||
from Items import ItemFactory
|
||||
from Main import copy_world_premature
|
||||
from Utils import stack_size3a
|
||||
|
||||
def explore_region(region_name, region=None):
|
||||
@@ -1552,7 +1571,14 @@ def validate_layout(world, player):
|
||||
}
|
||||
|
||||
# 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]
|
||||
connector_entrances = list(zip(*default_connector_connections))[0]
|
||||
|
||||
@@ -3,20 +3,31 @@ import argparse
|
||||
import hashlib
|
||||
import logging
|
||||
import os
|
||||
import RaceRandom as random
|
||||
import time
|
||||
import sys
|
||||
import time
|
||||
|
||||
import RaceRandom as random
|
||||
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 Items import ItemFactory
|
||||
from ItemList import difficulties
|
||||
from Items import ItemFactory
|
||||
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,
|
||||
)
|
||||
|
||||
__version__ = '0.2-dev'
|
||||
|
||||
|
||||
+3
-5
@@ -1,11 +1,9 @@
|
||||
import RaceRandom as random
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
from BaseClasses import PotItem, Pot, PotFlags, CrystalBarrier, LocationType, RegionType
|
||||
from Utils import int16_as_bytes, pc_to_snes, snes_to_pc
|
||||
|
||||
import RaceRandom as random
|
||||
from BaseClasses import CrystalBarrier, LocationType, Pot, PotFlags, PotItem, RegionType
|
||||
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: [],
|
||||
{'PoD Stalfos Basement': ['PoD Basement Ledge'],
|
||||
|
||||
+15
-4
@@ -1,9 +1,20 @@
|
||||
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):
|
||||
|
||||
@@ -1,47 +1,86 @@
|
||||
import bisect
|
||||
import collections
|
||||
import hashlib
|
||||
import io
|
||||
import json
|
||||
import hashlib
|
||||
import logging
|
||||
import os
|
||||
import struct
|
||||
import sys
|
||||
|
||||
import Items
|
||||
import RaceRandom as random
|
||||
import struct
|
||||
import sys
|
||||
|
||||
try:
|
||||
import bps.apply
|
||||
import bps.io
|
||||
except ImportError:
|
||||
raise Exception('Could not load BPS module')
|
||||
|
||||
from BaseClasses import ShopType, Region, Location, OWEdge, Door, DoorType, RegionType, LocationType
|
||||
from DoorShuffle import compass_data, DROptions, boss_indicator, dungeon_portals
|
||||
from Dungeons import dungeon_music_addresses, dungeon_table
|
||||
from Regions import location_table, shop_to_location_table, retro_shops
|
||||
from RoomData import DoorKind
|
||||
from Text import MultiByteTextMapper, CompressedTextMapper, text_addresses, Credits, TextTable
|
||||
from Text import Uncle_texts, Ganon1_texts, Ganon_Phase_3_No_Silvers_texts, Ganon_Phase_3_No_Weakness_texts, TavernMan_texts, Sahasrahla2_texts
|
||||
from Text import Triforce_texts, Blind_texts, BombShop2_texts, junk_texts
|
||||
from Text import KingsReturn_texts, Sanctuary_texts, Kakariko_texts, Blacksmiths_texts, DeathMountain_texts
|
||||
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 BaseClasses import (
|
||||
Door,
|
||||
DoorType,
|
||||
Location,
|
||||
LocationType,
|
||||
OWEdge,
|
||||
Region,
|
||||
RegionType,
|
||||
ShopType,
|
||||
)
|
||||
from DamageTable import DamageTable
|
||||
|
||||
from source.classes.SFX import randomize_sfx, randomize_sfxinstruments, randomize_songinstruments
|
||||
from source.item.FillUtil import valid_pot_items
|
||||
from DoorShuffle import DROptions, boss_indicator, compass_data, dungeon_portals
|
||||
from Dungeons import dungeon_music_addresses, dungeon_table
|
||||
from InitialSram import InitialSram
|
||||
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.RoomObject import DoorObject
|
||||
from source.enemizer.Bossmizer import boss_writes
|
||||
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
|
||||
|
||||
JAP10HASH = '03a63945398191337e896e5771f77173'
|
||||
RANDOMIZERBASEHASH = '76dc2d00e5dd5b925ad01574b327d364'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from enum import Enum, unique
|
||||
|
||||
from Tables import door_pair_offset_table
|
||||
|
||||
|
||||
|
||||
@@ -3,18 +3,28 @@ import logging
|
||||
from collections import deque
|
||||
|
||||
import OverworldGlitchRules
|
||||
from BaseClasses import CollectionState, RegionType, DoorType, Entrance, CrystalBarrier, KeyRuleType, LocationType, Terrain
|
||||
from BaseClasses import PotFlags
|
||||
from BaseClasses import (
|
||||
CollectionState,
|
||||
CrystalBarrier,
|
||||
DoorType,
|
||||
Entrance,
|
||||
KeyRuleType,
|
||||
LocationType,
|
||||
PotFlags,
|
||||
RegionType,
|
||||
Terrain,
|
||||
)
|
||||
from Dungeons import dungeon_table
|
||||
from RoomData import DoorKind
|
||||
from OWEdges import OWExitTypes
|
||||
from OverworldGlitchRules import overworld_glitches_rules
|
||||
from UnderworldGlitchRules import underworld_glitches_rules
|
||||
|
||||
from source.logic.Rule import RuleFactory
|
||||
from OWEdges import OWExitTypes
|
||||
from RoomData import DoorKind
|
||||
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 defeat_rule_multiple, and_rule as and_rule_new, or_rule as or_rule_new
|
||||
from source.enemizer.EnemyLogic import and_rule as and_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):
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
import argparse
|
||||
import concurrent.futures
|
||||
import multiprocessing
|
||||
import subprocess
|
||||
import sys
|
||||
import multiprocessing
|
||||
import concurrent.futures
|
||||
import argparse
|
||||
from collections import OrderedDict
|
||||
|
||||
cpu_threads = multiprocessing.cpu_count()
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
import argparse
|
||||
import concurrent.futures
|
||||
import csv
|
||||
import multiprocessing
|
||||
import subprocess
|
||||
import sys
|
||||
import multiprocessing
|
||||
import concurrent.futures
|
||||
import argparse
|
||||
from collections import OrderedDict
|
||||
import csv
|
||||
|
||||
cpu_threads = multiprocessing.cpu_count()
|
||||
py_version = f"{sys.version_info.major}.{sys.version_info.minor}"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# -*- coding: UTF-8 -*-
|
||||
from collections import OrderedDict
|
||||
import logging
|
||||
import re
|
||||
import warnings
|
||||
from collections import OrderedDict
|
||||
|
||||
warnings.filterwarnings("ignore", category=SyntaxWarning)
|
||||
|
||||
text_addresses = {'Pedestal': (0x180300, 256),
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import functools
|
||||
from BaseClasses import Entrance, DoorType, Door
|
||||
from DoorShuffle import connect_simple_door
|
||||
|
||||
import Rules
|
||||
from BaseClasses import Door, DoorType, Entrance
|
||||
from DoorShuffle import connect_simple_door
|
||||
|
||||
kikiskip_spots = [
|
||||
("Kiki Skip", "Spectacle Rock Cave (Bottom)", "Palace of Darkness Portal")
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
#!/usr/bin/env python3
|
||||
import fileinput
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
import xml.etree.ElementTree as ET
|
||||
from collections import defaultdict
|
||||
from math import factorial
|
||||
from itertools import count
|
||||
import fileinput
|
||||
|
||||
import urllib.request
|
||||
import urllib.parse
|
||||
import yaml
|
||||
from math import factorial
|
||||
from pathlib import Path
|
||||
|
||||
import yaml
|
||||
|
||||
|
||||
def int16_as_bytes(value):
|
||||
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'):
|
||||
from collections import OrderedDict
|
||||
import json
|
||||
import hashlib
|
||||
import json
|
||||
from collections import OrderedDict
|
||||
with open(old_rom, 'rb') as stream:
|
||||
old_rom_data = bytearray(stream.read())
|
||||
with open(new_rom, 'rb') as stream:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
"""collections_extended contains a few extra basic data structures."""
|
||||
from ._compat import Collection
|
||||
from .bags import bag, frozenbag
|
||||
from .setlists import setlist, frozensetlist
|
||||
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'
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ else:
|
||||
|
||||
|
||||
if sys.version_info < (3, 6):
|
||||
from collections import Sized, Iterable, Container
|
||||
from collections import Container, Iterable, Sized
|
||||
|
||||
def _check_methods(C, *methods):
|
||||
mro = C.__mro__
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""Bag class definitions."""
|
||||
import heapq
|
||||
from collections import Hashable, MutableSet, Set
|
||||
from operator import itemgetter
|
||||
from collections import Set, MutableSet, Hashable
|
||||
|
||||
from . import _compat
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Class definition for bijection."""
|
||||
|
||||
from collections import MutableMapping, Mapping
|
||||
from collections import Mapping, MutableMapping
|
||||
|
||||
|
||||
class bijection(MutableMapping):
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"""RangeMap class definition."""
|
||||
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
|
||||
_empty = object()
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
"""Setlist class definitions."""
|
||||
import random as random_
|
||||
|
||||
from collections import (
|
||||
Sequence,
|
||||
Set,
|
||||
MutableSequence,
|
||||
MutableSet,
|
||||
Hashable,
|
||||
)
|
||||
Hashable,
|
||||
MutableSequence,
|
||||
MutableSet,
|
||||
Sequence,
|
||||
Set,
|
||||
)
|
||||
|
||||
from . import _util
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from OverworldShuffle import __version__ as OWVersion
|
||||
import os
|
||||
|
||||
from OverworldShuffle import __version__ as OWVersion
|
||||
|
||||
with(open(os.path.join("resources","app","meta","manifests","app_version.txt"),"w+")) as f:
|
||||
f.write(OWVersion)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import sys
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.append(os.path.join(sys._MEIPASS, "ext"))
|
||||
|
||||
@@ -14,3 +14,6 @@ dependencies = [
|
||||
"pyyaml>=6.0.1",
|
||||
"websockets>=11.0.3",
|
||||
]
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import os # for env vars
|
||||
import stat # file statistics
|
||||
import os # for env vars
|
||||
import stat # file statistics
|
||||
import sys # default system info
|
||||
|
||||
try:
|
||||
import distro
|
||||
except ModuleNotFoundError as e:
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import common
|
||||
import argparse
|
||||
import os
|
||||
import urllib.request, ssl
|
||||
import subprocess # do stuff at the shell level
|
||||
import ssl
|
||||
import subprocess # do stuff at the shell level
|
||||
import urllib.request
|
||||
|
||||
import common
|
||||
|
||||
env = common.prepare_env()
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# import modules
|
||||
import common # app common functions
|
||||
import json # json manipulation
|
||||
import os # for os data, filesystem manipulation
|
||||
import subprocess # for running shell commands
|
||||
import sys # for system commands
|
||||
import traceback # for errors
|
||||
|
||||
import json # json manipulation
|
||||
import os # for os data, filesystem manipulation
|
||||
import subprocess # for running shell commands
|
||||
import sys # for system commands
|
||||
import traceback # for errors
|
||||
import common # app common functions
|
||||
|
||||
# get env
|
||||
env = common.prepare_env() # get environment variables
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import common
|
||||
import os # for env vars
|
||||
import sys # for path
|
||||
import urllib.request # for downloads
|
||||
import os # for env vars
|
||||
import sys # for path
|
||||
import urllib.request # for downloads
|
||||
from shutil import unpack_archive
|
||||
|
||||
import common
|
||||
|
||||
# only do stuff if we don't have a UPX folder
|
||||
|
||||
if not os.path.isdir(os.path.join(".","upx")):
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import subprocess # do stuff at the shell level
|
||||
import os
|
||||
import subprocess # do stuff at the shell level
|
||||
|
||||
|
||||
def git_clean(clean_ignored=True, clean_user=False):
|
||||
excludes = [
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import common
|
||||
import argparse
|
||||
import os
|
||||
import platform
|
||||
import subprocess # do stuff at the shell level
|
||||
import subprocess # do stuff at the shell level
|
||||
|
||||
import common
|
||||
|
||||
env = common.prepare_env()
|
||||
|
||||
|
||||
@@ -6,9 +6,10 @@ import json
|
||||
import os
|
||||
import ssl
|
||||
import urllib.request
|
||||
import yaml
|
||||
from json.decoder import JSONDecodeError
|
||||
|
||||
import yaml
|
||||
|
||||
allACTIONS = {}
|
||||
listACTIONS = []
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import install
|
||||
import get_get_pip
|
||||
|
||||
import argparse
|
||||
|
||||
import get_get_pip
|
||||
import install
|
||||
|
||||
parser = argparse.ArgumentParser(add_help=False)
|
||||
parser.add_argument('--py', default=0)
|
||||
parser.add_argument('--user', default=False, action="store_true")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def get_py_path():
|
||||
user_paths = os.environ["PATH"].split(os.pathsep)
|
||||
(python,py) = ("","")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import os # for env vars
|
||||
from shutil import copy # file manipulation
|
||||
|
||||
import common
|
||||
import os # for env vars
|
||||
from shutil import copy # file manipulation
|
||||
|
||||
env = common.prepare_env()
|
||||
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
Locate and prepare binary builds
|
||||
"""
|
||||
# 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 subprocess # do stuff at the shell level
|
||||
import common
|
||||
from shutil import move # file manipulation
|
||||
|
||||
env = common.prepare_env()
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import distutils.dir_util # for copying trees
|
||||
import os # for env vars
|
||||
import stat # for file stats
|
||||
import subprocess # do stuff at the shell level
|
||||
import distutils.dir_util # for copying trees
|
||||
import os # for env vars
|
||||
import stat # for file stats
|
||||
import subprocess # do stuff at the shell level
|
||||
from shutil import copy, make_archive, move, rmtree # file manipulation
|
||||
|
||||
import common
|
||||
from git_clean import git_clean
|
||||
from shutil import copy, make_archive, move, rmtree # file manipulation
|
||||
|
||||
env = common.prepare_env() # get env vars
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import json
|
||||
import locale
|
||||
import os
|
||||
|
||||
|
||||
class BabelFish():
|
||||
def __init__(self,subpath=["resources","app","meta"],lang=None):
|
||||
localization_string = locale.getdefaultlocale()[0] #get set localization
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
import os
|
||||
import urllib.request
|
||||
import urllib.parse
|
||||
import yaml
|
||||
from typing import Any
|
||||
from yaml.representer import Representer
|
||||
from Utils import HexInt, hex_representer
|
||||
import urllib.request
|
||||
from collections import defaultdict
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
import yaml
|
||||
from yaml.representer import Representer
|
||||
|
||||
import RaceRandom as random
|
||||
from BaseClasses import LocationType, DoorType
|
||||
from BaseClasses import DoorType, LocationType
|
||||
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):
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
from tkinter import Button, Canvas, Label, LabelFrame, Frame, PhotoImage, Scrollbar, Toplevel, LEFT, BOTTOM, X, RIGHT, TOP
|
||||
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 Utils import local_path
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from enum import IntEnum
|
||||
import random
|
||||
from enum import IntEnum
|
||||
|
||||
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 os
|
||||
import random
|
||||
import shutil
|
||||
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.request import urlopen
|
||||
import webbrowser
|
||||
from GuiUtils import ToolTips, set_icon, BackgroundTaskProgress
|
||||
|
||||
from GuiUtils import BackgroundTaskProgress, ToolTips, set_icon
|
||||
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):
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import os
|
||||
|
||||
from OverworldShuffle import __version__
|
||||
|
||||
OWR_VERSION = __version__
|
||||
|
||||
def write_appversion():
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import platform, sys, os, subprocess
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
try:
|
||||
import pkg_resources
|
||||
except ModuleNotFoundError as e:
|
||||
@@ -6,9 +10,11 @@ except ModuleNotFoundError as e:
|
||||
import datetime
|
||||
|
||||
from Main import __version__
|
||||
|
||||
DR_VERSION = __version__
|
||||
|
||||
from OverworldShuffle import __version__
|
||||
|
||||
OWR_VERSION = __version__
|
||||
|
||||
PROJECT_NAME = "ALttP Overworld Randomizer"
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
import RaceRandom as random
|
||||
import collections
|
||||
import logging
|
||||
import time
|
||||
|
||||
from BaseClasses import CrystalBarrier, DoorType, Hook, RegionType, Sector
|
||||
from BaseClasses import hook_from_door, flooded_keys
|
||||
from Regions import location_events, flooded_keys_reverse
|
||||
import RaceRandom as random
|
||||
from BaseClasses import (
|
||||
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):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from collections import defaultdict, deque
|
||||
import typing
|
||||
from collections import defaultdict, deque
|
||||
|
||||
import yaml
|
||||
from yaml.representer import Representer
|
||||
@@ -13,9 +13,9 @@ import RaceRandom as random
|
||||
from BaseClasses import Location, LocationType, RegionType
|
||||
from Items import ItemFactory
|
||||
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 Utils import int16_as_bytes, pc_to_snes, snes_to_pc
|
||||
|
||||
|
||||
class EnemyStats:
|
||||
def __init__(self, sprite, static, drop_flag=False, prize_pack: typing.Union[tuple, int] = 0,
|
||||
|
||||
@@ -3,9 +3,8 @@ try:
|
||||
except ImportError:
|
||||
from enum import IntFlag as FastEnum
|
||||
|
||||
|
||||
from RoomData import DoorKind, Position
|
||||
from source.dungeon.RoomObject import RoomObject, DoorObject
|
||||
from source.dungeon.RoomObject import DoorObject, RoomObject
|
||||
|
||||
|
||||
class Room:
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import RaceRandom as random
|
||||
from Utils import snes_to_pc
|
||||
|
||||
from source.dungeon.EnemyList import EnemySprite, SpriteType, Sprite
|
||||
from source.dungeon.RoomList import boss_rooms, gt_boss_room, Room0006
|
||||
from source.dungeon.EnemyList import EnemySprite, Sprite, SpriteType
|
||||
from source.dungeon.RoomList import Room0006, boss_rooms, gt_boss_room
|
||||
from source.dungeon.RoomObject import RoomObject
|
||||
from source.enemizer.SpriteSheets import required_boss_sheets
|
||||
from Utils import snes_to_pc
|
||||
|
||||
|
||||
def get_dungeon_boss_room(dungeon_name, level):
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
import RaceRandom as random
|
||||
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.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 randomize_underworld_sprite_sheets, randomize_overworld_sprite_sheets
|
||||
from source.enemizer.SpriteSheets import (
|
||||
randomize_overworld_sprite_sheets,
|
||||
randomize_underworld_sprite_sheets,
|
||||
sheets_with_free_gfx,
|
||||
sub_group_choices,
|
||||
)
|
||||
from source.enemizer.TilePattern import tile_patterns
|
||||
from Utils import snes_to_pc
|
||||
|
||||
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},
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
from types import SimpleNamespace
|
||||
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
|
||||
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():
|
||||
|
||||
@@ -2,9 +2,8 @@ import math
|
||||
from collections import defaultdict
|
||||
|
||||
import RaceRandom as random
|
||||
|
||||
from source.logic.Rule import RuleFactory
|
||||
from source.dungeon.EnemyList import EnemySprite
|
||||
from source.logic.Rule import RuleFactory
|
||||
|
||||
|
||||
# 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 = {}
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
import RaceRandom as random
|
||||
from source.dungeon.EnemyList import (
|
||||
EnemySprite,
|
||||
SpriteType,
|
||||
enemy_names,
|
||||
sprite_translation,
|
||||
)
|
||||
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]
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
import logging
|
||||
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 *
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import os
|
||||
import json
|
||||
import codecs
|
||||
import json
|
||||
import os
|
||||
|
||||
if __name__ == '__main__':
|
||||
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 logging
|
||||
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
|
||||
|
||||
|
||||
def adjust_page(top, parent, settings):
|
||||
# Adjust page
|
||||
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 os
|
||||
import random
|
||||
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 Fill import FillError
|
||||
from Main import main, export_yaml, EnemizerError
|
||||
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 Main import EnemizerError, export_yaml, main
|
||||
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):
|
||||
|
||||
@@ -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 os
|
||||
from tkinter import LEFT, TOP, VERTICAL, E, Frame, N, W, X, Y, ttk
|
||||
|
||||
import source.classes.constants as CONST
|
||||
import source.gui.widgets as widgets
|
||||
|
||||
|
||||
def custom_page(top,parent):
|
||||
# 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
|
||||
from Rom import Sprite, get_sprite_from_name
|
||||
from source.classes.BabelFish import BabelFish
|
||||
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
|
||||
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 os
|
||||
from tkinter import LEFT, RIGHT, TOP, E, Frame, Label, W, ttk
|
||||
|
||||
import source.gui.widgets as widgets
|
||||
|
||||
|
||||
def dungeon_page(parent):
|
||||
# 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 os
|
||||
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
|
||||
|
||||
|
||||
def enemizer_page(parent,settings):
|
||||
# Enemizer
|
||||
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 os
|
||||
from tkinter import LEFT, RIGHT, E, Frame, W, ttk
|
||||
|
||||
import source.gui.widgets as widgets
|
||||
|
||||
|
||||
def entrando_page(parent):
|
||||
# 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 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):
|
||||
# Game Options
|
||||
|
||||
@@ -1,11 +1,28 @@
|
||||
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 os
|
||||
from functools import partial
|
||||
from source.classes.Empty import Empty
|
||||
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 Main import __version__
|
||||
from source.classes.Empty import Empty
|
||||
|
||||
|
||||
def generation_page(parent,settings):
|
||||
# Generation Setup
|
||||
|
||||
@@ -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 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):
|
||||
# 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 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
|
||||
|
||||
|
||||
def multiworld_page(parent,settings):
|
||||
# Multiworld
|
||||
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 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):
|
||||
# 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 os
|
||||
from tkinter import LEFT, TOP, VERTICAL, E, Frame, N, W, X, Y, ttk
|
||||
|
||||
import source.classes.constants as CONST
|
||||
import source.gui.widgets as widgets
|
||||
|
||||
|
||||
def startinventory_page(top,parent):
|
||||
# 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 Button
|
||||
from tkinter import (
|
||||
LEFT,
|
||||
RIGHT,
|
||||
Button,
|
||||
Checkbutton,
|
||||
Entry,
|
||||
Frame,
|
||||
IntVar,
|
||||
Label,
|
||||
OptionMenu,
|
||||
Spinbox,
|
||||
StringVar,
|
||||
X,
|
||||
messagebox,
|
||||
)
|
||||
|
||||
from source.classes.Empty import Empty
|
||||
|
||||
|
||||
# Override Spinbox to include mousewheel support for changing value
|
||||
class mySpinbox(Spinbox):
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
@@ -2,7 +2,8 @@ from collections import deque
|
||||
|
||||
from BaseClasses import CollectionState, RegionType
|
||||
from Dungeons import dungeon_table
|
||||
from OWEdges import OWTileRegions, OWTileDistricts
|
||||
from OWEdges import OWTileDistricts, OWTileRegions
|
||||
|
||||
|
||||
class District(object):
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import RaceRandom as random
|
||||
import logging
|
||||
from collections import defaultdict
|
||||
|
||||
from source.item.District import resolve_districts
|
||||
from BaseClasses import PotItem, PotFlags, LocationType
|
||||
import RaceRandom as random
|
||||
from BaseClasses import LocationType, PotFlags, PotItem
|
||||
from DoorShuffle import validate_vanilla_reservation
|
||||
from Dungeons import dungeon_table
|
||||
from Items import item_table, ItemFactory
|
||||
from Items import ItemFactory, item_table
|
||||
from PotShuffle import vanilla_pots
|
||||
from source.item.District import resolve_districts
|
||||
|
||||
|
||||
class ItemPoolConfig(object):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import itertools
|
||||
|
||||
from collections import OrderedDict
|
||||
|
||||
try:
|
||||
from fast_enum import FastEnum
|
||||
except ImportError:
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
Build Entrypoints
|
||||
'''
|
||||
import json
|
||||
import platform
|
||||
import os # for checking for dirs
|
||||
import platform
|
||||
import re
|
||||
from json.decoder import JSONDecodeError
|
||||
from subprocess import Popen, PIPE, STDOUT, CalledProcessError
|
||||
from subprocess import PIPE, STDOUT, CalledProcessError, Popen
|
||||
|
||||
DEST_DIRECTORY = "."
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ def check_requirements(console=False):
|
||||
logger.error('https://github.com/aerinon/ALttPDoorRandomizer/blob/DoorDev/docs/BUILDING.md')
|
||||
else:
|
||||
import webbrowser
|
||||
from tkinter import Tk, Label, Button, Frame
|
||||
from tkinter import Button, Frame, Label, Tk
|
||||
|
||||
master = Tk()
|
||||
master.title('Error')
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import RaceRandom as random
|
||||
import logging
|
||||
import copy
|
||||
import logging
|
||||
from collections import OrderedDict, defaultdict
|
||||
|
||||
from collections import defaultdict, OrderedDict
|
||||
import RaceRandom as random
|
||||
from BaseClasses import RegionType
|
||||
|
||||
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):
|
||||
from Main import copy_world_premature
|
||||
from BaseClasses import CollectionState
|
||||
from Items import ItemFactory
|
||||
from Main import copy_world_premature
|
||||
from OverworldShuffle import build_accessible_region_list, one_way_ledges
|
||||
|
||||
for p in range(1, avail.world.players + 1):
|
||||
|
||||
@@ -1,13 +1,28 @@
|
||||
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 EnemyTable, init_vanilla_sprites, vanilla_sprites, init_enemy_stats, EnemySprite
|
||||
from source.dungeon.EnemyList import sprite_translation
|
||||
from source.dungeon.EnemyList import (
|
||||
EnemySprite,
|
||||
EnemyTable,
|
||||
init_enemy_stats,
|
||||
init_vanilla_sprites,
|
||||
sprite_translation,
|
||||
vanilla_sprites,
|
||||
)
|
||||
from source.dungeon.RoomHeader import init_room_headers
|
||||
from source.dungeon.RoomList import Room0127
|
||||
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):
|
||||
|
||||
+2
-3
@@ -1,11 +1,10 @@
|
||||
# Code derived from https://github.com/marcrobledo/RomPatcher.js (MIT License)
|
||||
|
||||
import sys
|
||||
|
||||
from binascii import crc32
|
||||
from collections import defaultdict
|
||||
from time import perf_counter
|
||||
|
||||
from collections import defaultdict
|
||||
from binascii import crc32
|
||||
try:
|
||||
from fast_enum import FastEnum
|
||||
except ImportError:
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import argparse
|
||||
import RaceRandom as random
|
||||
import os
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
from pathlib import Path
|
||||
|
||||
import urllib.request
|
||||
import urllib.parse
|
||||
import yaml
|
||||
|
||||
import RaceRandom as random
|
||||
|
||||
|
||||
def get_weights(path):
|
||||
if os.path.exists(Path(path)):
|
||||
|
||||
+5
-2
@@ -1,9 +1,12 @@
|
||||
from __future__ import annotations
|
||||
from aenum import Enum, IntEnum, extend_enum
|
||||
from source.classes.BabelFish import BabelFish
|
||||
|
||||
import json
|
||||
import os
|
||||
|
||||
from aenum import Enum, IntEnum, extend_enum
|
||||
|
||||
from source.classes.BabelFish import BabelFish
|
||||
|
||||
fish = BabelFish(lang="en")
|
||||
|
||||
def tokenize(token):
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import argparse
|
||||
import concurrent.futures
|
||||
import multiprocessing
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import multiprocessing
|
||||
import concurrent.futures
|
||||
import argparse
|
||||
from collections import OrderedDict
|
||||
|
||||
cpu_threads = multiprocessing.cpu_count()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import argparse
|
||||
import concurrent.futures
|
||||
import fnmatch
|
||||
import multiprocessing
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import multiprocessing
|
||||
import concurrent.futures
|
||||
import argparse
|
||||
from collections import OrderedDict
|
||||
|
||||
cpu_threads = multiprocessing.cpu_count()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import unittest
|
||||
|
||||
from BaseClasses import World, CollectionState
|
||||
from BaseClasses import CollectionState, World
|
||||
from Dungeons import create_dungeons, get_dungeon_item_pool
|
||||
from ItemList import difficulties, generate_itempool
|
||||
from Items import ItemFactory
|
||||
from Regions import create_regions
|
||||
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):
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
from test.TestBase import TestBase
|
||||
|
||||
from BaseClasses import World
|
||||
from DoorShuffle import link_doors
|
||||
from Doors import create_doors
|
||||
from DoorShuffle import link_doors
|
||||
from Dungeons import create_dungeons, get_dungeon_item_pool
|
||||
from OverworldShuffle import link_overworld
|
||||
from ItemList import generate_itempool, difficulties
|
||||
from ItemList import difficulties, generate_itempool
|
||||
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 Rules import set_rules
|
||||
|
||||
from source.overworld.EntranceShuffle2 import link_entrances_new
|
||||
from test.TestBase import TestBase
|
||||
|
||||
|
||||
class TestInverted(TestBase):
|
||||
|
||||
@@ -1,14 +1,29 @@
|
||||
import unittest
|
||||
from test.inverted.TestInverted import TestInverted
|
||||
|
||||
from BaseClasses import World
|
||||
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 Regions import create_regions
|
||||
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):
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user