Commit Graph

88 Commits

Author SHA1 Message Date
db1b7b617f Rename EntitySelectedEvent to EntitySelectionChangedEvent
The event also fires on deselection and now carries a set of entities
rather than a single one, so the "SelectionChanged" name (matching
SelectionChangedEvent and ScrapSelectionChangedEvent) is more accurate.
Pure rename: header + include guard, CMake entry, and all usages.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-20 20:32:35 +02:00
4044846d6a Multi-select ships/stations, mixable with scrap
Reshape game-world selection into two categories: buildings (exclusive,
win all ties) and field objects (ships, defence stations, scrap) that
coexist. Ships/stations are now multi-selectable via Ctrl+click and
box-drag and can be selected together with scrap; the Selected panel
shows a single-actor stats panel or a multi-actor summary plus the scrap
total.

- Widen EntitySelectedEvent to std::vector<entt::entity>
- Add actorsInBox() ECS query (+ Catch2 test)
- GameWorldView: vector actor selection, building>actor>scrap hit-test,
  actor Ctrl-toggle/box-select, membership highlights, per-frame prune
- SelectedBuildingPanel: buildFieldSelection composition, buildEntitySummary
- ArenaView/InspectWindow: adapt to vector payload (single-select)

Implements REQ-UI-SELECTION-CATEGORIES, REQ-UI-FIELD-MULTI-SELECTION and
the updated entity/scrap selection requirements.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-20 20:23:09 +02:00
388d354e51 Use std::optional instead of sentinel values for absent data
Replace sentinel values that signalled "no value" with std::optional
across simulation, UI, and balancing code:

- BuildingId references: DeliverScrapBehavior::deliveryBay,
  Simulation::m_hqBuildingId, the return types of BuildingSystem::place
  and Simulation::tryPlaceBuilding (previously kInvalidBuildingId on
  failure), GameWorldView building/site-at-tile lookups and demolish
  hover, SelectedBuildingPanel::m_singleBuildingId.
- Command id fields: the five id-carrying commands now hold
  optional<BuildingId>; CommandSerializer and Simulation::apply updated.
  The serialized replay format is unchanged.
- Index sentinels: BlueprintPanel::m_activeIndex,
  BalancingWindow::m_inspectedArenaIndex, ArenaSimulation winnerTeam,
  and the moduleIndex grid cells in ShipLayoutDialog/ShipLayoutPreview.
  ShipLayoutDialog::m_activeModuleIndex was a tri-state, so it is
  modelled as bool m_removeMode + optional<int>.

Building/ConstructionSite id defaults keep kInvalidBuildingId (identity,
not an absent reference); entt::null and config -1 domain values are
left as-is.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-20 07:36:34 +02:00
b708e1b29d Add demolish-mode vignette 2026-07-19 21:51:12 +02:00
b2e7e4897a Add paused-state vignette border to game world view 2026-07-19 21:34:56 +02:00
a4267a4760 Fix bug where restart fast-forwarded the new run by the time spent in a modal dialog 2026-07-19 21:19:36 +02:00
d412c69f82 Prefix all getters with "get" 2026-07-19 21:17:38 +02:00
d465671cfc draw beam wider at the source than at the target 2026-07-14 21:52:05 +02:00
876b344b20 fix issue where splitters were draggable during placement like belts 2026-07-14 20:35:47 +02:00
cd75492796 Reveal port items in a thin margin at machine edges 2026-07-14 20:32:27 +02:00
c9f14970a1 Animate items entering building input ports 2026-07-14 20:21:25 +02:00
6a8c456aa1 Animate items emerging from building output ports 2026-07-14 20:18:47 +02:00
3ce6e6d599 Tint not-yet-buildable asteroid area 2026-07-13 21:42:59 +02:00
80a2622267 Redefine camera scroll as view center 2026-07-13 21:31:52 +02:00
535d4f8f24 allow to (multi) select scrap 2026-07-13 21:09:01 +02:00
5f6ecbf6c8 implement visual feedback for copy building settings with shift + click gesture 2026-07-09 21:33:24 +02:00
4986c1bac8 implement copy building settings with shift + click gesture 2026-07-09 20:29:20 +02:00
e110e7e413 Add T hotkey for temporary blueprint from selection 2026-07-09 20:25:15 +02:00
de1ebb8a5f increase scroll speed across contest zone 2026-07-08 22:25:12 +02:00
24c18f8ac6 render HP bar below the HQ 2026-07-08 21:39:11 +02:00
2cedd5d433 fix issue where building selection outline is hidden by other buildings drawn later 2026-07-08 21:29:44 +02:00
f11db0c072 Add demolish box-drag interaction 2026-07-08 21:04:59 +02:00
e4ea4ca4b4 Refresh selected-building panel when paused player commands drain 2026-07-08 20:45:41 +02:00
e8786c3922 implement cost formula for asteroid expansion 2026-07-08 20:33:19 +02:00
5bc581bcb8 write replays next to the executable 2026-07-01 22:43:04 +02:00
0a7e9a34ef Add artifact win condition (#3)
Reviewed-on: #3
Co-authored-by: Malte Langkabel <malte.langkabel@gmail.com>
Co-committed-by: Malte Langkabel <malte.langkabel@gmail.com>
2026-07-01 20:27:29 +00:00
d74ba5bfad Replay: deterministic record & playback (#4)
Add deterministic record/playback for a run.

Recording captures `(seed, config hash, ordered tick-tagged commands)` and re-simulates on playback — no state snapshots. `DotaFactory.exe --replay <file>` re-plays a recorded run view-only with manual speed/pause.

Reviewed-on: #4
Co-authored-by: Malte Langkabel <malte.langkabel@gmail.com>
Co-committed-by: Malte Langkabel <malte.langkabel@gmail.com>
2026-07-01 19:20:08 +00:00
cf68ac2862 Fix selected construction site border not being drawn (#2)
Fixes a bug where the selected construction site was not drawn with a border.

Reviewed-on: #2
Co-authored-by: Malte Langkabel <malte.langkabel@gmail.com>
Co-committed-by: Malte Langkabel <malte.langkabel@gmail.com>
2026-06-29 20:09:10 +00:00
31a8915b0f update keyboard shortcuts 2026-06-23 22:09:26 +02:00
f818c90af0 draw ghost in semi-transparent building color 2026-06-23 21:29:38 +02:00
577927ef70 fix bug where splitter filters were not taken over to blueprint 2026-06-23 21:08:46 +02:00
e5017ab3c5 fix issue where construction sites could be placed outside of game world and add tests 2026-06-22 21:13:01 +02:00
59688e6532 fix issue where scrolling while drawing selection box did not update selection box size 2026-06-22 21:10:38 +02:00
c43225b6fa fix issue where beams were also disappearing while the game was paused 2026-06-21 22:09:25 +02:00
405206211e fix issue where right-click did not exit demolish mode 2026-06-21 21:56:40 +02:00
9573b9789a change repair_tool application and add beams for salvager and repair_tool 2026-06-19 21:15:47 +02:00
41c8ed2938 draw debug lines to repair and salvage behavior targets 2026-06-17 21:41:35 +02:00
0e02d9ec4a make sensor range semi transparent in debug draw mode 2026-06-16 21:51:26 +02:00
bd2391876c draw debug lines to target 2026-06-16 21:38:58 +02:00
1ea1cc59fb show threat rate in debug output 2026-06-14 13:39:10 +02:00
10c5ad678f derive threat cost dynamically 2026-06-13 22:47:46 +02:00
5317f35198 switch to using own event system 2026-06-13 17:52:22 +02:00
ed17664ef1 fix bug where game simulation continues while dialog is shown 2026-06-13 14:31:03 +02:00
49f7129bd5 schematic selection dialog 2026-06-13 14:19:51 +02:00
54a6056b77 implicit item locking 2026-06-12 16:14:21 +02:00
af96b95f61 allow to unlock modules when destroying defence stations 2026-06-10 22:37:38 +02:00
f097e9a25f add live ship stats panel 2026-06-07 22:06:37 +02:00
8dad554800 show threat budget in debug text overlay 2026-06-06 21:07:18 +02:00
6b95619806 add units in config files 2026-06-06 20:46:36 +02:00
66cf9ae23a change 4x speed to 10x speed for testing 2026-06-06 12:01:41 +02:00