Skip to content

Conversation

@poiuyqwert
Copy link
Owner

No description provided.

poiuyqwert and others added 30 commits December 12, 2024 16:02
…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
- 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This flattening is not valid, for example it is converting Self(SpellEffects(Ensnare)) to SpellEffects(Ensnare) when no other flags are specified.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self() makes it so that the conditions are checked against the caster, not the target

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhh, ok, that makes more sense. Thanks, I'll update this soon.

Copy link
Owner Author

@poiuyqwert poiuyqwert Feb 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants