diff --git a/ModuleUpdate.py b/ModuleUpdate.py index abae05c4..e8abef64 100644 --- a/ModuleUpdate.py +++ b/ModuleUpdate.py @@ -19,7 +19,7 @@ def update(): update_ran = True path = os.path.join(os.path.dirname(sys.argv[0]), 'requirements.txt') if not os.path.exists(path): - os.path.join(os.path.dirname(__file__), 'requirements.txt') + path = os.path.join(os.path.dirname(__file__), 'requirements.txt') with open(path) as requirementsfile: for line in requirementsfile.readlines(): module, remote_version = line.split(">=") diff --git a/MultiServer.py b/MultiServer.py index ce518614..b969b55a 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -647,7 +647,7 @@ class CommonCommandProcessor(CommandProcessor): for option in self.simple_options: self.output(f"Option {option} is set to {getattr(self.ctx, option)}") -class ClientMessageProcessor(CommandProcessor): +class ClientMessageProcessor(CommonCommandProcessor): marker = "!" def __init__(self, ctx: Context, client: Client): diff --git a/Text.py b/Text.py index 67d844cc..b1617c24 100644 --- a/Text.py +++ b/Text.py @@ -281,7 +281,6 @@ junk_texts = [ "{C:GREEN}\nThe gnome asks\nyou to guess\nhis name. >", "{C:GREEN}\nI heard beans\non toast is a\ngreat meal. >", "{C:GREEN}\n> Sweetcorn\non pizza is a\ngreat choice.", - "{C:GREEN}\n> race roms\ndon’t have\nspoiler logs", "{C:GREEN}\nI bet a nice\ncup of tea\nwould help! >", "{C:GREEN}\nI bet you\nexpected help,\ndidn't you? >", "{C:GREEN}\nLearn to make\nplogues, easy\nand yummy! >", @@ -297,7 +296,7 @@ junk_texts = [ "{C:GREEN}\n> READ\nor the owl\nwill eat you.", "{C:GREEN}\n> Bunnies\nare cute.", "{C:GREEN}\nPugs are the\nsuperior dog\nbreed. >", - "{C:GREEN}\nYou are\nplaying\nALTTPR. >", + "{C:GREEN}\nThis is\nBerserker's\nMultiworld.>", "{C:GREEN}\nOther randos\nexist too!\nTry some! >", ] diff --git a/WebHost.py b/WebHost.py index 88e994bf..ce42fcd8 100644 --- a/WebHost.py +++ b/WebHost.py @@ -2,11 +2,11 @@ import os import multiprocessing import logging -from WebHost import app as raw_app +from WebHostLib import app as raw_app from waitress import serve -from WebHost.models import db -from WebHost.autolauncher import autohost +from WebHostLib.models import db +from WebHostLib.autolauncher import autohost configpath = "config.yaml" diff --git a/WebHost/__init__.py b/WebHostLib/__init__.py similarity index 98% rename from WebHost/__init__.py rename to WebHostLib/__init__.py index be56d2f7..07a571ca 100644 --- a/WebHost/__init__.py +++ b/WebHostLib/__init__.py @@ -108,5 +108,5 @@ def host_room(room: UUID): return render_template("host_room.html", room=room) -from WebHost.customserver import run_server_process +from WebHostLib.customserver import run_server_process from . import tracker, upload, landing # to trigger app routing picking up on it diff --git a/WebHost/autolauncher.py b/WebHostLib/autolauncher.py similarity index 96% rename from WebHost/autolauncher.py rename to WebHostLib/autolauncher.py index ffbad87f..dcfc4634 100644 --- a/WebHost/autolauncher.py +++ b/WebHostLib/autolauncher.py @@ -45,8 +45,8 @@ else: # unix class Locker(CommonLocker): def __enter__(self): - self.fp = open(self.lockfile, "rb") try: + self.fp = open(self.lockfile, "wb") fcntl.flock(self.fp.fileno(), fcntl.LOCK_EX) except OSError as e: raise AlreadyRunningException() from e @@ -72,6 +72,7 @@ def autohost(config: dict): def keep_running(): try: with Locker("autohost"): + logging.info("Starting autohost service") # db.bind(**config["PONY"]) # db.generate_mapping(check_tables=False) while 1: diff --git a/WebHost/customserver.py b/WebHostLib/customserver.py similarity index 97% rename from WebHost/customserver.py rename to WebHostLib/customserver.py index 7dc845b4..00ba1771 100644 --- a/WebHost/customserver.py +++ b/WebHostLib/customserver.py @@ -20,7 +20,7 @@ from Utils import get_public_ipv4, get_public_ipv6 class CustomClientMessageProcessor(ClientMessageProcessor): ctx: WebHostContext def _cmd_video(self, platform, user): - """Set a link for your name in the WebHost tracker pointing to a video stream""" + """Set a link for your name in the WebHostLib tracker pointing to a video stream""" if platform.lower().startswith("t"): # twitch self.ctx.video[self.client.team, self.client.slot] = "Twitch", user self.ctx.save() @@ -139,4 +139,4 @@ def run_server_process(room_id, ponyconfig: dict): asyncio.run(main()) -from WebHost import LOGS_FOLDER +from WebHostLib import LOGS_FOLDER diff --git a/WebHost/landing.py b/WebHostLib/landing.py similarity index 82% rename from WebHost/landing.py rename to WebHostLib/landing.py index 8a8eca26..3bc3488b 100644 --- a/WebHost/landing.py +++ b/WebHostLib/landing.py @@ -1,5 +1,5 @@ from flask import render_template -from WebHost import app, cache +from WebHostLib import app, cache @cache.memoize(timeout=300) diff --git a/WebHost/models.py b/WebHostLib/models.py similarity index 100% rename from WebHost/models.py rename to WebHostLib/models.py diff --git a/WebHost/requirements.txt b/WebHostLib/requirements.txt similarity index 66% rename from WebHost/requirements.txt rename to WebHostLib/requirements.txt index 0e14504f..d82c5314 100644 --- a/WebHost/requirements.txt +++ b/WebHostLib/requirements.txt @@ -3,6 +3,4 @@ pony>=0.7.13 waitress>=1.4.4 flask-caching>=1.9.0 Flask-Autoversion>=0.2.0 -Flask-Compress>=1.5.0 -redis>=3.5.3 -rq>=1.4.3 \ No newline at end of file +Flask-Compress>=1.5.0 \ No newline at end of file diff --git a/WebHost/static/jquery.scrollsync.js b/WebHostLib/static/jquery.scrollsync.js similarity index 100% rename from WebHost/static/jquery.scrollsync.js rename to WebHostLib/static/jquery.scrollsync.js diff --git a/WebHost/static/static.css b/WebHostLib/static/static.css similarity index 100% rename from WebHost/static/static.css rename to WebHostLib/static/static.css diff --git a/WebHost/templates/host_room.html b/WebHostLib/templates/host_room.html similarity index 100% rename from WebHost/templates/host_room.html rename to WebHostLib/templates/host_room.html diff --git a/WebHost/templates/landing.html b/WebHostLib/templates/landing.html similarity index 100% rename from WebHost/templates/landing.html rename to WebHostLib/templates/landing.html diff --git a/WebHost/templates/layout.html b/WebHostLib/templates/layout.html similarity index 100% rename from WebHost/templates/layout.html rename to WebHostLib/templates/layout.html diff --git a/WebHost/templates/macros.html b/WebHostLib/templates/macros.html similarity index 100% rename from WebHost/templates/macros.html rename to WebHostLib/templates/macros.html diff --git a/WebHost/templates/tracker.html b/WebHostLib/templates/tracker.html similarity index 100% rename from WebHost/templates/tracker.html rename to WebHostLib/templates/tracker.html diff --git a/WebHost/templates/uploads.html b/WebHostLib/templates/uploads.html similarity index 100% rename from WebHost/templates/uploads.html rename to WebHostLib/templates/uploads.html diff --git a/WebHost/templates/view_seed.html b/WebHostLib/templates/view_seed.html similarity index 100% rename from WebHost/templates/view_seed.html rename to WebHostLib/templates/view_seed.html diff --git a/WebHost/tracker.py b/WebHostLib/tracker.py similarity index 99% rename from WebHost/tracker.py rename to WebHostLib/tracker.py index d0d18b66..385b7bef 100644 --- a/WebHost/tracker.py +++ b/WebHostLib/tracker.py @@ -7,7 +7,7 @@ import logging from uuid import UUID import Items -from WebHost import app, cache, Room +from WebHostLib import app, cache, Room def get_id(item_name): diff --git a/WebHost/upload.py b/WebHostLib/upload.py similarity index 98% rename from WebHost/upload.py rename to WebHostLib/upload.py index 890e027e..547665d7 100644 --- a/WebHost/upload.py +++ b/WebHostLib/upload.py @@ -6,7 +6,7 @@ import logging from flask import request, flash, redirect, url_for, session, render_template from pony.orm import commit, select -from WebHost import app, allowed_file, Seed, Room, Patch +from WebHostLib import app, allowed_file, Seed, Room, Patch accepted_zip_contents = {"patches": ".bmbp", "spoiler": ".txt", diff --git a/easy.yaml b/easy.yaml index 8cc7f5ca..0aa0af95 100644 --- a/easy.yaml +++ b/easy.yaml @@ -185,9 +185,10 @@ timer: glitch_boots: on: 1 # enables that you start with Pegasus Boots in any glitched logic mode off: 0 -remote_items: # Warning: currently broken. Stores all your items on the server, effectively sending them to you as if another player picked it up - on: 0 # intended for racing, as the item information is missing from the ROM - off: 1 +door_shuffle: # Only available if the host uses the doors branch, it is ignored otherwise + vanilla: 1 # everything should be like in vanilla + basic: 0 # dungeons are shuffled within themselves. + crossed: 0 # dungeons are shuffled across each other. linked_options: - name: crosskeys options: # these overwrite earlier options if the percentage chance triggers