No description
  • GDScript 96.3%
  • GDShader 2%
  • Shell 0.8%
  • Python 0.6%
  • HTML 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Claude 840f9aa9a0 #224: refuse to build a structure on top of another
BuildingField.place() dropped a structure at the fleet centroid with no
overlap check of any kind, so they could be stacked.

It reads worse than it looks. BuildingField decides which structure the
fleet is standing on by testing the centroid against interact_radius and
returning the FIRST match, so two structures inside one another make that a
question of list order rather than of where the player flew - you could fly
to your workshop and open the crafter.

The separation is interact_radius itself (150) rather than a new number,
because that is exactly the circle the ambiguity comes from. Buildings draw
to a radius of roughly 60, so this leaves a visible gap rather than letting
them touch.

Gated in three places: the info popup (the button greys out and says which
structure is in the way), _confirm_build, and _try_place - the preview goes
stale as the fleet keeps moving.

Ordering matters in one case. A unique structure replaces itself by
demolishing the old one BEFORE placing the new one, so a placement refused
afterwards would leave the player with neither. The check runs before the
demolition and excludes the structure being replaced. Case D pins it.

Two existing tests encoded the old permissive behaviour and now fly clear
first; neither is about placement:

  test_build_info_popup builds every menu option from one position, so
  each structure blocked the next
  test_payments_use_fleet_hold builds a mothership on the ship lab that
  an earlier case injects at the origin

Also fixes a bug from 37e2e89: Sfx.warm() called add_child() from _ready(),
which Godot refuses outright - it printed an error and never pre-built the
pool, defeating the point of warming it. Deferred, like Music.ensure().

173/173.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019AJMdB7iuHuLFZM1aBu3GD
2026-09-09 12:57:28 +02:00
android Initial commit: SpaceshipTest, a top-down space RTS in Godot 4.7.1 2026-08-10 18:41:58 +02:00
audio #224: refuse to build a structure on top of another 2026-09-09 12:57:28 +02:00
boss Take planets by killing what defends them 2026-09-05 13:31:25 +02:00
buildings Keep the export probe, and the uid files beside the new scripts 2026-09-07 16:40:45 +02:00
controllers #224: refuse to build a structure on top of another 2026-09-09 12:57:28 +02:00
core #224: refuse to build a structure on top of another 2026-09-09 12:57:28 +02:00
enemies Tune and optimize boss encounter 2026-09-03 11:49:51 +02:00
fonts Skill tree, node-based building animation, bigger UI, and a 19x faster test suite 2026-08-11 15:00:41 +02:00
logistics Research the Fleet Office, and give it one hull 2026-09-05 21:57:53 +02:00
planets Build the accretion disc once per spawn, not twice 2026-09-08 22:35:41 +02:00
PlanetSetups Take planets by killing what defends them 2026-09-05 13:31:25 +02:00
resources #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
shaders Tune and optimize boss encounter 2026-09-03 11:49:51 +02:00
shots Remove the one-way ore API superseded by the transfer menu 2026-08-12 13:07:52 +02:00
surface Find the planet setups in an exported build 2026-09-07 13:55:41 +02:00
tests #224: refuse to build a structure on top of another 2026-09-09 12:57:28 +02:00
ui Stop the first play of each sound paying for its own load 2026-09-09 11:40:28 +02:00
vessels Research the Fleet Office, and give it one hull 2026-09-05 21:57:53 +02:00
vfx Stop redrawing what only needs moving 2026-09-08 11:35:45 +02:00
world Teach where research data comes from, and say so when it runs out 2026-09-06 16:24:09 +02:00
.gitignore Add a WSL path to the test runner 2026-08-22 14:40:44 +02:00
export_presets.cfg Fix the web build: a wasm trap on integer % 0, and buttons that never fired 2026-08-19 01:08:09 +02:00
icon.svg Initial commit: SpaceshipTest, a top-down space RTS in Godot 4.7.1 2026-08-10 18:41:58 +02:00
icon.svg.import Initial commit: SpaceshipTest, a top-down space RTS in Godot 4.7.1 2026-08-10 18:41:58 +02:00
project.godot Smooth boosted fleet travel 2026-09-04 20:01:56 +02:00
ui_theme.tres Skill tree, node-based building animation, bigger UI, and a 19x faster test suite 2026-08-11 15:00:41 +02:00
web_shell.html Fix the web build: a wasm trap on integer % 0, and buttons that never fired 2026-08-19 01:08:09 +02:00