happyleavesaoc / aoc-mgz

Age of Empires II recorded game parsing and summarization in Python 3.
MIT License
197 stars 41 forks source link

fixed parsing of scenario matches #101

Closed Skazu closed 1 year ago

Skazu commented 1 year ago

Created dedicated source branch for the issue mentioned here: https://github.com/happyleavesaoc/aoc-mgz/pull/100 because i have additional fixes for another problem.

I'm closing the old PR.

Open in this PR: Fixes for the Full-Body-Parser.

Skazu commented 1 year ago

FYI: I've added code to parse triggers/conditions for scenario records but for DE only, it doesn't break the old behaviour for aoc and others, and of course it's still in the fast header parser only. There's also an example record commited.

I don't currently know if I will port the code into the full header parser, it would cost me quite a lot of time, the declarative approach and the long test duration makes it very difficult and unpleasant to debug there. But I would still like to let you profit from our adaptations upstream. Maybe someone else who uses the full parser has the time to port the code?

Let me know if you have any suggestens for the code.

happyleavesaoc commented 1 year ago

It's fine to support only the fast header. As you say, anyone who wants can port it back given this example.

But, please make the tests pass (I guess by excluding the scenario file from the full tests).

Skazu commented 1 year ago

I have made a few code corrections and fixed the tests. From my point of view, the code is now ready-to-merge.

Skazu commented 1 year ago

I've changed it.

happyleavesaoc commented 1 year ago

Thanks!