From faac2540bf5089fadd205258c5c61d8112cde5e1 Mon Sep 17 00:00:00 2001 From: threeandthreee Date: Sat, 26 Jul 2025 13:32:59 -0400 Subject: [PATCH] LADX: fix marin text splitting #5225 --- worlds/ladx/LADXR/patches/aesthetics.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/worlds/ladx/LADXR/patches/aesthetics.py b/worlds/ladx/LADXR/patches/aesthetics.py index 6ca7d3d9..2c9c8186 100644 --- a/worlds/ladx/LADXR/patches/aesthetics.py +++ b/worlds/ladx/LADXR/patches/aesthetics.py @@ -180,9 +180,10 @@ def noText(rom): def reduceMessageLengths(rom, rnd): # Into text from Marin. Got to go fast, so less text. (This intro text is very long) - lines = pkgutil.get_data(__name__, "marin.txt").decode("unicode_escape").splitlines() - lines = [l for l in lines if l.strip()] - rom.texts[0x01] = formatText(rnd.choice(lines).strip()) + lines = pkgutil.get_data(__name__, "marin.txt").splitlines(keepends=True) + while lines and lines[-1].strip() == b'': + lines.pop(-1) + rom.texts[0x01] = formatText(rnd.choice(lines).strip().decode("unicode_escape")) # Reduce length of a bunch of common texts rom.texts[0xEA] = formatText("You've got a Guardian Acorn!")