From 4b8500096009b230ca81778bc74d0643620408c8 Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Sun, 31 Jul 2022 14:01:39 -0700 Subject: [PATCH 1/6] Fixed a crafting category bug related to fluids. (#848) --- worlds/factorio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/factorio/__init__.py b/worlds/factorio/__init__.py index 33f1809cf7..9dc1febcba 100644 --- a/worlds/factorio/__init__.py +++ b/worlds/factorio/__init__.py @@ -221,7 +221,7 @@ class Factorio(World): # Return the liquid to the pool and get a new ingredient. pool.append(new_ingredient) new_ingredient = pool.pop(0) - liquids_used += 1 + liquids_used += 1 if new_ingredient in fluids else 0 new_ingredients[new_ingredient] = 1 return Recipe(original.name, self.get_category(original.category, liquids_used), new_ingredients, original.products, original.energy) From 57979b92875814291cf0b49d0c2cf8a3c27681df Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Mon, 1 Aug 2022 12:41:15 +0200 Subject: [PATCH 2/6] WebHost: update flask (#804) --- WebHostLib/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WebHostLib/requirements.txt b/WebHostLib/requirements.txt index c9ee8620ce..52d0316b2a 100644 --- a/WebHostLib/requirements.txt +++ b/WebHostLib/requirements.txt @@ -1,7 +1,7 @@ -flask>=2.1.2 +flask>=2.1.3 pony>=0.7.16 waitress>=2.1.1 -Flask-Caching>=2.0.0 +Flask-Caching>=2.0.1 Flask-Compress>=1.12 Flask-Limiter>=2.5.0 -bokeh>=2.4.3 \ No newline at end of file +bokeh>=2.4.3 From 0b228834c2c3398fca15d193028206c5d5619fb9 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Mon, 1 Aug 2022 20:09:34 +0200 Subject: [PATCH 3/6] The Witness: Logic fix (unbeatable seed) (#850) --- worlds/witness/WitnessLogic.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/worlds/witness/WitnessLogic.txt b/worlds/witness/WitnessLogic.txt index a4cdd9f1c4..71ca7c819f 100644 --- a/worlds/witness/WitnessLogic.txt +++ b/worlds/witness/WitnessLogic.txt @@ -765,7 +765,9 @@ Inside Mountain Second Layer (Inside Mountain) - Inside Mountain Second Layer Li 158430 - 0x09FD8 (Color Cycle 5) - 0x09FD7 - Color Cycle & RGB & Squares & Colored Squares & Symmetry & Colored Dots Door - 0x09FFB (Staircase Near) - 0x09FD8 -Inside Mountain Second Layer Blue Bridge (Inside Mountain) - Inside Mountain Second Layer Beyond Bridge - TrueOneWay - Inside Mountain Second Layer Elevator Room - 0x09EDD: +Inside Mountain Second Layer Blue Bridge (Inside Mountain) - Inside Mountain Second Layer Beyond Bridge - TrueOneWay - Inside Mountain Second Layer At Door - TrueOneWay: + +Inside Mountain Second Layer At Door (Inside Mountain) - Inside Mountain Second Layer Elevator Room - 0x09EDD: Door - 0x09EDD (Door to Elevator) - 0x09ED8 & 0x09E86 Inside Mountain Second Layer Light Bridge Room Near (Inside Mountain): From 5f27019855bc0ac5ca8b4d852edad40006b3e858 Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Mon, 1 Aug 2022 14:57:30 -0700 Subject: [PATCH 4/6] Add an optional path to factorio server-settings.json (#851) * Add an optional path to factorio server-settings.json * factorio: changes * use forward slashs in host.yaml going forward. (works on all OSes.) * comment out the host.yaml server_settings option. * assume that server_settings is NOT provided and explicitly check for its existence in factorio_client. --- FactorioClient.py | 9 ++++++++- host.yaml | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/FactorioClient.py b/FactorioClient.py index b7bf324311..2fa8ba9c15 100644 --- a/FactorioClient.py +++ b/FactorioClient.py @@ -400,6 +400,7 @@ if __name__ == '__main__': "Refer to Factorio --help for those.") parser.add_argument('--rcon-port', default='24242', type=int, help='Port to use to communicate with Factorio') parser.add_argument('--rcon-password', help='Password to authenticate with RCON.') + parser.add_argument('--server-settings', help='Factorio server settings configuration file.') args, rest = parser.parse_known_args() colorama.init() @@ -410,6 +411,9 @@ if __name__ == '__main__': factorio_server_logger = logging.getLogger("FactorioServer") options = Utils.get_options() executable = options["factorio_options"]["executable"] + server_settings = args.server_settings if args.server_settings else options["factorio_options"].get("server_settings", None) + if server_settings: + server_settings = os.path.abspath(server_settings) if not os.path.exists(os.path.dirname(executable)): raise FileNotFoundError(f"Path {os.path.dirname(executable)} does not exist or could not be accessed.") @@ -421,7 +425,10 @@ if __name__ == '__main__': else: raise FileNotFoundError(f"Path {executable} is not an executable file.") - server_args = ("--rcon-port", rcon_port, "--rcon-password", rcon_password, *rest) + if server_settings and os.path.isfile(server_settings): + server_args = ("--rcon-port", rcon_port, "--rcon-password", rcon_password, "--server-settings", server_settings, *rest) + else: + server_args = ("--rcon-port", rcon_port, "--rcon-password", rcon_password, *rest) asyncio.run(main(args)) colorama.deinit() diff --git a/host.yaml b/host.yaml index 86f88de024..901e6cd727 100644 --- a/host.yaml +++ b/host.yaml @@ -101,7 +101,9 @@ sm_options: # Alternatively, a path to a program to open the .sfc file with rom_start: true factorio_options: - executable: "factorio\\bin\\x64\\factorio" + executable: "factorio/bin/x64/factorio" + # by default, no settings are loaded if this file does not exist. If this file does exist, then it will be used. + # server_settings: "factorio\\data\\server-settings.json" minecraft_options: forge_directory: "Minecraft Forge server" max_heap_size: "2G" From b47cca451567bdfcb196984baec9e86f74064757 Mon Sep 17 00:00:00 2001 From: alwaysintreble Date: Wed, 3 Aug 2022 07:41:27 -0500 Subject: [PATCH 5/6] HK: Add bug report link (#824) Co-authored-by: Hussein Farran --- worlds/hk/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/worlds/hk/__init__.py b/worlds/hk/__init__.py index c07d995ecd..bc9b29519e 100644 --- a/worlds/hk/__init__.py +++ b/worlds/hk/__init__.py @@ -121,6 +121,7 @@ shop_cost_types: typing.Dict[str, typing.Tuple[str, ...]] = { "Leg_Eater": ("GEO",), } + class HKWeb(WebWorld): tutorials = [Tutorial( "Mod Setup and Use Guide", @@ -131,6 +132,8 @@ class HKWeb(WebWorld): ["Ijwu"] )] + bug_report_page = "https://github.com/Ijwu/Archipelago.HollowKnight/issues/new?assignees=&labels=bug%2C+needs+investigation&template=bug_report.md&title=" + class HKWorld(World): """Beneath the fading town of Dirtmouth sleeps a vast, ancient kingdom. Many are drawn beneath the surface, From 59918b9dbc5ce68641273ea3f1cec31c8c77466d Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Wed, 3 Aug 2022 14:53:14 +0200 Subject: [PATCH 6/6] Core: patch stream_input to ignore non-parsable input (such as EOF encoded as 0xff) (#854) --- Utils.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Utils.py b/Utils.py index 423bb3b469..4d3d6b134b 100644 --- a/Utils.py +++ b/Utils.py @@ -479,9 +479,13 @@ def init_logging(name: str, loglevel: typing.Union[str, int] = logging.INFO, wri def stream_input(stream, queue): def queuer(): while 1: - text = stream.readline().strip() - if text: - queue.put_nowait(text) + try: + text = stream.readline().strip() + except UnicodeDecodeError as e: + logging.exception(e) + else: + if text: + queue.put_nowait(text) from threading import Thread thread = Thread(target=queuer, name=f"Stream handler for {stream.name}", daemon=True)