Add official support for AISE to the Python 3 version of PyMS#149
Add official support for AISE to the Python 3 version of PyMS#149poiuyqwert wants to merge 61 commits intopython3from
Conversation
…to separate specific AISE stuff to a separate commit NOTE: IScriptBIN has not been updated for new refactors - Refactor CodeHandlers for work on AISE support - Added concept of "LanguageDefinition" which takes "LanguagePlugins" to add extensions like AISE - Split out a CompileContext and DecompileContext to closer match Parse/Serialize and add language context - Further split CodeType's lex/parse for some easier subclassing - Renamed Handler/Builder as Decompiler/Compiler
…is expanded, or the long jump mapping) - Added AILanguage with core language and AISE plugin - Started adding AISE commands - Started creating AISE types and test for the types
- Add some more AISE types - Fix/update some tests
- Made OptionSet a concrete type - Encapsulate OptionSet decompile into itself - Implemented Option serialization - Added OptionSet simplify
- Allow UnitGroup to accept other unit based types - Set wait_rand to separate code
- Update CodeType generics to represent binary type and memory type - Encapsulated CodeCommand param iterating into generator - Warn users about loading AISE files, or when a change needs to activate AISE support
- Rename _lex back to lex
- Cleanup StringEditor code
# Conflicts: # PyMS/FileFormats/AIBIN/AIBIN.py # PyMS/versions.json
…ly disabled" to try and catch more issues - Fixed up PyAI pylint reports
- Fixed issue in PyTILE with copy/paste megatiles
- Added directives to expand unit/upgrade/tech id's
…plex types like UnitGroupCodeType to handle more cases) - Added new directives to PyAI for manually managing expanded units/upgrades/tech - Move some data to a new ParseSettings to allow it to flow through multiple ParseContext uses - Fix UnitGroupCodeType and using variables in group - Fix IdleOrderFlags parse/serialize with only empty BasicFlags
# Conflicts: # PyMS/FileFormats/AIBIN/CodeHandlers/AISEIdleOrder.py # PyMS/FileFormats/AIBIN/CodeHandlers/CodeDirectives.py # PyMS/PyAI/CodeEditDialog.py # PyMS/PyAI/FixIssuesUI/FixIssuesDialog.py # PyMS/PyAI/PyAI.py
- Fixed pollution from `import *` by adding `__all__` definitions to relavent files - Remove some uses of `Any` where not strictly needed - Remove all cases of inheriting from `object`
…hen explicitly passing an empty dict - Fix tooltips in PyTRG - Fix issue with old load_file using encoding for binary files - Fix ReportList weirdness with subclassing which caused PyMPQ to crash
| else: | ||
| existing_options.append(option) | ||
| if len(options) == 1 and OptionSet.TYPE_ID in options and len(options[OptionSet.TYPE_ID]) == 1: | ||
| self.options = cast(OptionSet, options[OptionSet.TYPE_ID][0]).options |
There was a problem hiding this comment.
This flattening is not valid, for example it is converting Self(SpellEffects(Ensnare)) to SpellEffects(Ensnare) when no other flags are specified.
There was a problem hiding this comment.
Oh interesting, maybe I don't understand what Self(...) actually does. I would have assumed that those two examples result in the same thing. I guess I should just remove the flattening entirely?
There was a problem hiding this comment.
Self() makes it so that the conditions are checked against the caster, not the target
There was a problem hiding this comment.
Ohhh, ok, that makes more sense. Thanks, I'll update this soon.
There was a problem hiding this comment.
This should be fixed now with the latest commit, and also makes the code a little more clean/obvious with separating out the Self logic from OptionSet, so now there is OptionSet and SelfOptions.
…nded (expanded flag was not set on AISE context)
No description provided.