Skip to content

Conversation

@CnCRAZER
Copy link

This is my first serious PR to go alongside PR:#297
That being said. Please let me know if any syntax or code style is not in sync with the rest of the repo.

Screenshot from Scripting menu:
image

Screenshot of the AITargetTypes window:
Please note. This window is enabled if RA2YR=true within constants.ini, but for local testing I did not swap other files. You will notice there is technotypes not related to RA2YR, this can be ignored.
image

This pull request adds a new "AITargetTypes" editing window to the map editor, allowing users to view and modify AI target type definitions in a dedicated UI. The changes include the implementation of the window, its integration into the window controller, the addition of its configuration file, and the conditional addition of its menu entry for compatible game modes.

Addition of AITargetTypes editing functionality:

  • Implemented the AITargetTypesWindow class, providing a full-featured UI for listing, adding, deleting, cloning, and editing AI Target Types and their associated technos. The window supports filtering available technos and synchronizes changes with the map's INI data. (AITargetTypesWindow.cs)

  • Created a new configuration file, AITargetTypesWindow.ini, defining the layout, controls, and appearance of the new window. (Config/Default/UI/Windows/AITargetTypesWindow.ini)

Integration with the editor application:

  • Registered the new window in the WindowController, ensuring it is constructed and managed alongside other editor windows. (WindowController.cs) [1] [2]

  • Updated the project file to include the new configuration file so it is copied to the output directory. (TSMapEditor.csproj)

  • Added a conditional entry to the scripting menu to open the new AITargetTypes window, only if the current game mode supports it (i.e., for RA2/YR). (TopBarMenu.cs)

Introduces a new AITargetTypesWindow with UI and logic for managing AI target types, including adding, deleting, cloning, and editing techno entries.

Updates the project file to include the new INI config, adds the window to the WindowController, and integrates it into the scripting menu.
Wrapped the addition of the AITargetTypes menu item in a check for Constants.IsRA2YR, so it only appears when the RA2YR constant is true.
@CnCRAZER
Copy link
Author

Closing this. Talks in discord determined this should be a script to add / edit AITargetTypes instead of it being a new window.

@CnCRAZER CnCRAZER closed this Nov 20, 2025
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.

1 participant