diff options
| author | Vaino Kauppila <vaino@vke.fi> | 2026-07-30 11:56:27 +0300 |
|---|---|---|
| committer | Vaino Kauppila <vaino@vke.fi> | 2026-07-30 11:56:27 +0300 |
| commit | 6cdd436caf9e2103f516442ab6e70a870d4cba04 (patch) | |
| tree | 7a69242d34ef3739f3e554227213ec5d91a2a958 /third_party/imgui/backends/imgui_impl_sdl3.cpp | |
| parent | 521b5da83485a956811fc510cba9f139acad8b26 (diff) | |
| download | forts_clone-6cdd436caf9e2103f516442ab6e70a870d4cba04.tar.gz forts_clone-6cdd436caf9e2103f516442ab6e70a870d4cba04.zip | |
Mount devices on the strut graph so cutting supports destroys them
Implements win-condition path (c): destroy the enemy reactor by cutting
its supports so it falls. Previously devices sat at fixed map coordinates,
structurally immune to collapse.
- BuildGraph gains MountedDevice tracking: mount_device/unmount_device,
is_device_alive/get_device_hp/damage_device, nearest_device, with a
break_node index-shift fix so mount references stay correct as other
geometry on the same fort is destroyed. update_fire now also damages
any device mounted on a burning strut.
- app.cpp mounts devices onto the nearest strut (within 2 units) at both
map-load and interactive placement, and after each tick's structural
collapse pass, zeroes a device's HP if its mount didn't survive -- which
flows through the existing win-condition/cleanup code unchanged.
- tools/device_collapse_test.cpp: 15 headless tests covering collapse,
partial support loss, splash/beam/fire-through-mount damage, multiple
devices, index stability, and clean unmount.
Verified: full test suite passes (15/15), sim_check shows zero regressions
across all 3 maps.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'third_party/imgui/backends/imgui_impl_sdl3.cpp')
0 files changed, 0 insertions, 0 deletions
