From 2671e1a10a1b55f2e6ab424e9ff277c220aca5f3 Mon Sep 17 00:00:00 2001 From: "Void / aoe2insights.com" Date: Fri, 7 Jul 2023 09:59:21 +0200 Subject: [PATCH] fixed parsing of scenario matches --- mgz/fast/header.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mgz/fast/header.py b/mgz/fast/header.py index f96c878..c583cef 100644 --- a/mgz/fast/header.py +++ b/mgz/fast/header.py @@ -230,10 +230,10 @@ def parse_scenario(data, num_players, version, save): """Parse scenario section.""" data.read(4455) if version is Version.DE: - data.read(128) + data.read(102) + scenario_filename = aoc_string(data) + data.read(24) instructions = aoc_string(data) - for _ in range(0, 9): - aoc_string(data) data.read(78) for _ in range(0, 16): aoc_string(data) @@ -278,7 +278,8 @@ def parse_scenario(data, num_players, version, save): return dict( map_id=map_id, difficulty_id=difficulty_id, - instructions=instructions + instructions=instructions, + scenario_filename=scenario_filename )