LADX: fix marin text splitting #5225

This commit is contained in:
threeandthreee
2025-07-26 13:32:59 -04:00
committed by GitHub
parent 4e1eb78163
commit faac2540bf

View File

@@ -180,9 +180,10 @@ def noText(rom):
def reduceMessageLengths(rom, rnd): def reduceMessageLengths(rom, rnd):
# Into text from Marin. Got to go fast, so less text. (This intro text is very long) # 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 = pkgutil.get_data(__name__, "marin.txt").splitlines(keepends=True)
lines = [l for l in lines if l.strip()] while lines and lines[-1].strip() == b'':
rom.texts[0x01] = formatText(rnd.choice(lines).strip()) lines.pop(-1)
rom.texts[0x01] = formatText(rnd.choice(lines).strip().decode("unicode_escape"))
# Reduce length of a bunch of common texts # Reduce length of a bunch of common texts
rom.texts[0xEA] = formatText("You've got a Guardian Acorn!") rom.texts[0xEA] = formatText("You've got a Guardian Acorn!")