Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
gaithern authored Apr 25, 2024
2 parents 04b4812 + 4756c76 commit 6ea07a6
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion MultiServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2198,7 +2198,7 @@ async def console(ctx: Context):

def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser()
defaults = Utils.get_options()["server_options"].as_dict()
defaults = Utils.get_settings()["server_options"].as_dict()
parser.add_argument('multidata', nargs="?", default=defaults["multidata"])
parser.add_argument('--host', default=defaults["host"])
parser.add_argument('--port', default=defaults["port"], type=int)
Expand Down
4 changes: 2 additions & 2 deletions SNIClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class SNESState(enum.IntEnum):


def launch_sni() -> None:
sni_path = Utils.get_options()["sni_options"]["sni_path"]
sni_path = Utils.get_settings()["sni_options"]["sni_path"]

if not os.path.isdir(sni_path):
sni_path = Utils.local_path(sni_path)
Expand Down Expand Up @@ -654,7 +654,7 @@ async def game_watcher(ctx: SNIContext) -> None:

async def run_game(romfile: str) -> None:
auto_start = typing.cast(typing.Union[bool, str],
Utils.get_options()["sni_options"].get("snes_rom_start", True))
Utils.get_settings()["sni_options"].get("snes_rom_start", True))
if auto_start is True:
import webbrowser
webbrowser.open(romfile)
Expand Down
4 changes: 3 additions & 1 deletion Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def cache_path(*path: str) -> str:
def output_path(*path: str) -> str:
if hasattr(output_path, 'cached_path'):
return os.path.join(output_path.cached_path, *path)
output_path.cached_path = user_path(get_options()["general_options"]["output_path"])
output_path.cached_path = user_path(get_settings()["general_options"]["output_path"])
path = os.path.join(output_path.cached_path, *path)
os.makedirs(os.path.dirname(path), exist_ok=True)
return path
Expand Down Expand Up @@ -619,6 +619,8 @@ def get_fuzzy_ratio(word1: str, word2: str) -> float:

def open_filename(title: str, filetypes: typing.Sequence[typing.Tuple[str, typing.Sequence[str]]], suggest: str = "") \
-> typing.Optional[str]:
logging.info(f"Opening file input dialog for {title}.")

def run(*args: str):
return subprocess.run(args, capture_output=True, text=True).stdout.split("\n", 1)[0] or None

Expand Down
3 changes: 0 additions & 3 deletions docs/webhost configuration sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
# TODO
#CACHE_TYPE: "simple"

# TODO
#JSON_AS_ASCII: false

# Host Address. This is the address encoded into the patch that will be used for client auto-connect.
#HOST_ADDRESS: archipelago.gg

Expand Down
4 changes: 2 additions & 2 deletions worlds/alttp/Rom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1859,7 +1859,7 @@ def apply_oof_sfx(rom, oof: str):
rom.write_bytes(0x12803A, oof_bytes)
rom.write_bytes(0x12803A + len(oof_bytes), [0xEB, 0xEB])

#Enemizer patch: prevent Enemizer from overwriting $3188 in SPC memory with an unused sound effect ("WHAT")
# Enemizer patch: prevent Enemizer from overwriting $3188 in SPC memory with an unused sound effect ("WHAT")
rom.write_bytes(0x13000D, [0x00, 0x00, 0x00, 0x08])


Expand Down Expand Up @@ -3021,7 +3021,7 @@ def get_base_rom_bytes(file_name: str = "") -> bytes:


def get_base_rom_path(file_name: str = "") -> str:
options = Utils.get_options()
options = Utils.get_settings()
if not file_name:
file_name = options["lttp_options"]["rom_file"]
if not os.path.exists(file_name):
Expand Down
2 changes: 1 addition & 1 deletion worlds/factorio/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def _handle_color(self, node: JSONMessagePart):
rcon_password = args.rcon_password if args.rcon_password else ''.join(
random.choice(string.ascii_letters) for x in range(32))
factorio_server_logger = logging.getLogger("FactorioServer")
options = Utils.get_options()
options = Utils.get_settings()
executable = options["factorio_options"]["executable"]
server_settings = args.server_settings if args.server_settings \
else options["factorio_options"].get("server_settings", None)
Expand Down
Empty file removed worlds/sc2wol/Regions.py
Empty file.

0 comments on commit 6ea07a6

Please sign in to comment.