AITargetTypes for Phobos #298
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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

Scriptingmenu:Screenshot of the

AITargetTypeswindow: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.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
AITargetTypesWindowclass, 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)