Extract an abstract EntityList base for the HUD lists (#146) #148
No reviewers
Labels
No labels
assets
bug
duplicate
enhancement
help wanted
invalid
question
testing
ui
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
liamjd/UntitledColonyBuilder!148
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "146-entity-list-base"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #146
What changed
ui/lists/entity_list.gd: new@abstract class_name EntityList. It holds expand/collapse, add/remove, interaction-mode handling and selection sync._cardsis keyed byEntity, and_cards.has(new)replaces theis Pawn/is Buildingchecks.ui/lists/entity_list.tscn: the only definition of the list layout, with neutral unique names (%ListContainer). Its root has no script.PawnList/BuildingList: onlyCARD_SCENE,_connect_entity_signals()and_make_card()remain. Both scenes are inherited fromentity_list.tscnand keep their original uids, sogame.tscnis untouched.common/game.gd: removed thepawns_list.pawns/building_list.buildingswiring. The lists never read these references.Behaviour changes (bug fixes)
selection_changedtwice: once from theGameState.selectedsetter and again by hand. It now fires once.^while expanded. It now starts asv.Verification
test/unit/test_entity_list.gd: 12 tests, each run against both lists. Full GUT suite: 895 passed, 1 pending (the existing #85 placeholder).tools/screenshot_entity_lists.gdon the real game scene: lists render, clicking a card selects the pawn, the header collapses the list, and cards are disabled in PLACE mode.Not done / caveats
main; this is deferred until art and theming.--headless --editor --quitprintsInvalid access to property or key 'building_placed' on ... GameState. This also happens onmain, so this PR did not cause it.🤖 Generated with Claude Code