Commit Graph

40 Commits

Author SHA1 Message Date
56c691abfe Snap belt-drag end tile to a building's input edge
When a belt drag ends with the cursor over a non-belt building or construction
site, the end tile now snaps to the input-capable adjacent tile closest to the
cursor and points into the target, instead of showing an invalid ghost on the
occupied tile.

Adds BuildingSystem::getInputPorts(id) (reusing computeInputPorts, refactored
into a bodyCells+outputPorts core) as the single source of truth for a target's
input-capable adjacent tiles; works for both operational buildings (stored
inputPorts) and construction sites (mask-derived). GameWorldView tracks the
cursor world position and, in recomputeBeltDragPath, picks the nearest input
port and overrides the end tile's rotation. Ghost preview, resolve, and apply
consume the snapped path unchanged.

Implements REQ-BLD-BELT-DRAG snapping-to-a-building.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-21 16:19:59 +02:00
1cbc695bc5 Add building status light 2026-07-20 22:19:58 +02:00
9622fa4345 Use std::optional instead of sentinel values for absent data 2026-07-20 20:27:20 +02:00
d412c69f82 Prefix all getters with "get" 2026-07-19 21:17:38 +02:00
486296feee Allow direct output-to-input port coupling between adjacent buildings 2026-07-14 20:23:24 +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
dd7c997816 Auto-process smelter and reprocessing plant (no recipe selection) 2026-07-12 21:35:23 +02:00
cd966daba9 fix issue where shipyard produces ships with modules without requiring items for the modules if the ship's layout was never changed 2026-07-09 21:29:04 +02:00
88bc4f2170 fix bug where selecting the same ship again in a shipyard clears the layout and resets the progress 2026-07-09 21:05:01 +02:00
2ddf13238c Fix Salvage Bay drop-off not working by adding config-driven buffer capacity 2026-07-09 20:11:12 +02:00
e8786c3922 implement cost formula for asteroid expansion 2026-07-08 20:33:19 +02: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
d271d65678 allow to set the recipe already for construction sites 2026-06-22 22:15:56 +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
1ea1cc59fb show threat rate in debug output 2026-06-14 13:39:10 +02:00
54a6056b77 implicit item locking 2026-06-12 16:14:21 +02:00
6b95619806 add units in config files 2026-06-06 20:46:36 +02:00
abc261c03a add tracing for performance profiling 2026-06-05 16:38:36 +02:00
b57299fd2a rename EntityId to BuildingId 2026-05-23 07:53:56 +02:00
bd488db8ef remove unused building HP 2026-05-22 21:34:21 +02:00
4e3dc51981 fix stations were not drawn 2026-05-22 21:15:26 +02:00
9d20048705 cleanup 2026-05-22 20:45:10 +02:00
ca07cbaf0e switch to ECS architecture 2026-05-22 20:31:39 +02:00
d08bf5d37b implement ship modules 2026-05-18 08:54:26 +02:00
2770bf96be allow to rotate buildings in place 2026-04-29 21:51:04 +02:00
559dde96cf fix bug where buildings could not output directly on splitters 2026-04-27 21:38:11 +02:00
fb83db98ab rename blueprint to schematic 2026-04-26 21:00:55 +02:00
774f5dee28 read tunnel length from different config and fix tests 2026-04-26 20:41:40 +02:00
89005d6bb7 implement tunnels 2026-04-26 17:15:50 +02:00
55997ef851 store belts as buildings and fix issue that belts could not be selected 2026-04-24 21:09:28 +02:00
807ccc2ddf implement belts are now added to the build queue 2026-04-22 21:54:07 +02:00
f29dc9862a dont require output belts to be aligned with output ports 2026-04-22 21:15:39 +02:00
393c49e1bb fix issue where shipyard did not produce anything 2026-04-21 22:17:48 +02:00
79e89b524e implement returning full cost for buildings that get demolished in construction queue 2026-04-21 21:19:27 +02:00
2991a9584f show ports 2026-04-20 21:37:41 +02:00
46188bd9ca fix belts were not drawn 2026-04-20 21:18:14 +02:00
498b97db20 implement waves 2026-04-20 14:10:01 +02:00
65de4ddc5c implement ship behaviors 2026-04-20 08:29:53 +02:00
bf29cc40e3 implement building system 2026-04-19 20:53:08 +02:00