convert/subprocessor: derive train/research location name from head unit id#1814
Open
lugt wants to merge 1 commit into
Open
convert/subprocessor: derive train/research location name from head unit id#1814lugt wants to merge 1 commit into
lugt wants to merge 1 commit into
Conversation
…nit id The name used for locating a CreatableGameEntity or ResearchableTech's nested object inside its train_location's / research_location's ability is currently derived from train_location_id / research_location_id. However, that id is not necessarily the head unit of the resolved location group: it may be a non-head member of a line, or it may resolve to a group (via fallback) whose head has a different identifier. In all such cases, the id-based lookup produces a game-entity name that does not match the train_location / research_location group's actual game entity, leaving the nested object stranded without a host ability. Derive the name from train_location.get_head_unit_id() (or research_location.get_head_unit_id()) instead, matching the convention already used for the train_location variable assignment itself. Affected: - AoCAuxiliarySubprocessor.get_creatable_game_entity - AoCAuxiliarySubprocessor.get_researchable_game_entity - AoCCivSubprocessor.setup_unique_units Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…nit id
The name used for locating a CreatableGameEntity or ResearchableTech's nested object inside its train_location's / research_location's ability is currently derived from train_location_id / research_location_id.
However, that id is not necessarily the head unit of the resolved location group: it may be a non-head member of a line, or it may resolve to a group (via fallback) whose head has a different identifier.
In all such cases, the id-based lookup produces a game-entity name that does not match the train_location / research_location group's actual game entity, leaving the nested object stranded without a host ability.
Derive the name from train_location.get_head_unit_id() (or research_location.get_head_unit_id()) instead, matching the convention already used for the train_location variable assignment itself.
Affected: