Skip to content

Decorated interiors — pass 1 (#28, #29) - #38

Merged
Dibujaron merged 16 commits into
mainfrom
feat/decorated-interiors
Jul 19, 2026
Merged

Decorated interiors — pass 1 (#28, #29)#38
Dibujaron merged 16 commits into
mainfrom
feat/decorated-interiors

Conversation

@Dibujaron

Copy link
Copy Markdown
Owner

First pass of decorated interiors: interiors can now carry per-tile decoration + colour end to end, and cargo pallets derive breakbulk capacity. Closes the pass-1 scope of #28 and #29; neighbour-aware / rule-bearing tiles are deferred to #36.

The glyph vocabulary (r/e/d/p/w + colors.json) already landed on main to unblock hull authoring; this PR is the pipeline + rendering that makes it live.

What's here

  • One grid of Cell. DeckGrid goes from parallel tiles/edges lists to a single grid of Cell(tile, edges, decor, color) (composite.gleam already worked in cell units, so this simplified it). Walkability/collision logic is untouched — field access only — so client-side movement prediction stays bit-for-bit identical.
  • Decor + NE-corner colour, lossless round-trip. Centre decoration glyph + a colour digit (0f) in the tile's NE corner parse into the cell and re-emit through deck_to_rows. The client re-parses the same rows, so no new wire fields.
  • 16-colour palette on the wire. server/colors.json (Minecraft dye order) is forwarded on welcome like the glyph registry; sprites are greyscale and multiply-tinted by the slot colour, so retuning a hex recolours every tile using that slot with zero re-authoring.
  • Derived breakbulk capacity. A hull's capacity is the count of its p cargo-pallet tiles (map-is-truth, like consoles/berths); the authored number is the zero-pallet fallback.
  • Client render pass. interior_view.gd draws decor tinted; a placeholder swatch shows authored decor+colour now, before any sprite art exists. Wall fixtures (w window, v screen) draw their sprite with a plain-wall fallback.
  • Decorated Mockingbird adopted as the reference test ship (26 seats, 17 beds, windows, 60 pallets → derived capacity 60).

Verification

  • 240 Gleam unit tests pass (incl. the Cell refactor's parity, decor/colour round-trip, composite decor-survives-mooring, palette, derived capacity, sim helm/collision/spawn); gleam format clean.
  • Client: headless parse & palette probes pass; a non-headless render capture confirmed tinted decor swatches render on the right tiles.
  • Integration: harness/test_m2_interior.py has 4 failures, but the identical 4 fail on the base commit (stale M2 harness vs the M3/M3.5 station-composite evolution) — this branch adds zero new failures.
  • Built subagent-driven: every task got an independent spec+quality review; a final whole-branch review (which caught two wiring bugs, both fixed here + regression-tested).

Notes for review

  • Front bow door (open design Q): the 4 Q tiles on the Lower deck currently model the "big front door" as 4 docking ports. They validate and break nothing, but Q semantically means a side-on mooring airlock (the Mockingbird moors on its west flank via the Mezzanine Qs). I'd model a wide bow door as a run of = door edges across the bow wall of the hold instead — no extra mooring ports. Left as-is pending your call; happy to convert.
  • Authored capacity 40 vs derived 60: the hull still authors "capacity": 40, now overridden by the 60 pallets. Left your value untouched — draw fewer pallets if you want less capacity, or I can sync the number.
  • Deferred Minors (naming/doc/perf nits from the reviews) are logged for the Aesthetic interior tiles (pass 2): neighbor-aware & rule-bearing tiles #36 follow-up: tiles_edges var name, a let assert in tile_block, a double glyphs.center lookup, pallet_count fold shape, a palette decode split, _fixture_tex per-edge _deck().

🤖 Generated with Claude Code

Dibujaron and others added 16 commits July 19, 2026 11:56
Design for the first pass of decorated interiors: a per-cell Cell record
carrying decor + NE-corner colour end-to-end (server DeckGrid, wire,
client), a 16-colour palette in colors.json applied as a greyscale-multiply
tint, the simple aesthetic tiles (rug/seat/bed/window), and cargo pallets
deriving breakbulk capacity. Neighbour-aware/rule-bearing tiles deferred to
#36.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Landed early so hulls can be authored against it while the render pipeline
is built. Centres r/e/d rug/seat/bed + p cargo_pallet (all walkable floor);
edge w window; v viewscreen now covers any wall screen. colors.json holds
the 16 Minecraft-dye palette (slot 0-f, greyscale-multiply tint). Additive
and fallback-safe: unknown glyphs still parse as floor. Nothing renders these
distinctly yet — that is the pass-1 pipeline work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Mirrors deckplan.gleam's Cell(tile, edges, decor, color): ship_class_data.gd's
Deck now stores an inner Cell per tile instead of parallel tiles/edges arrays,
with decor (centre glyph, is-decor per the welcome-time GlyphRegistry) and
NE-corner colour (hex 0-f -> 0-15) parsed alongside geometry. Adds
GlyphRegistry.is_decor (needed here since decor resolution depends on it) and
decor_at/color_at accessors on both Deck and ShipClassData.

interior_parse_probe asserts geometry + decor + colour against a synthetic
grid; it runs as a Node scene (interior_parse_probe.tscn) rather than via
--script, because a --script main-loop override compiles its full dependency
graph (including ship_class_data.gd's NetworkClient.glyphs reference) before
autoload singletons are registered as global identifiers in this Godot
version, which fails compilation. Running as a real scene goes through the
normal boot order, matching how the client actually runs.
_draw_decor draws each floor tile's decor glyph tinted by its NE-corner
palette colour, falling back to a centred tinted swatch when the sprite
art doesn't exist yet (T7 of the decorated-interiors plan) - so authored
decor + colour is visible ahead of the art. _draw_structure now resolves
a sprite for FIXTURE edges (window/viewscreen) via the glyph registry and
draws it on the wall strip, falling back to the plain wall plate when no
sprite is mapped; collision is unchanged. Adds a headless render probe
(interior_render_probe.gd/.tscn) exercising both draw paths against a
small decorated deck.
…lyphs before parsing ship_class; + tests

composite.cell() hardcoded decor:None, color:None instead of reading the
whole Cell via deckplan.cell_at_xy, stripping decor/colour from every
docked ship (and the concourse) in the stitched composite. network_client.gd
parsed the welcome message's ship_class before glyphs/palette were set, so
Deck.from_grid's decor lookup against NetworkClient.glyphs always missed for
the aboard ship. Adds regression coverage for both: a composite test that a
decor+colour tile survives mooring/rotation, and deckplan tests that a '#'
or non-hex letter in the NE colour corner parses to None.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The new Mockingbird exercises the pass-1 pipeline end to end: 26 seats (e),
17 beds (d), windows (w), and 60 cargo pallets (p) whose count DERIVES the
breakbulk capacity (60, overriding the authored 40). Applied the author's two
fixes: the 25 spawn (s) tiles were meant as seats (-> e; a ship's spawn still
derives from its west-facing mooring Q, so no s tile is needed), and the
second helm (-> e) since multi-helm login-seating isn't supported yet (a
repeated console kind namespaces to helm0/helm1, which breaks find_console
"...:helm"). Updated the capacity test (40 -> 60) and the derived-capacity doc.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… ports

The 4 Lower-deck Q tiles were the "front big door" but Q means a side-on
mooring airlock (the Mockingbird moors on its west flank via the Mezzanine
Q's). Replaced them with a 4-wide run of = door edges across the bow wall,
opening onto plain hold floor behind — no phantom docking ports. Lower deck
now has 0 Q; the 2 Mezzanine mooring ports are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
From play-testing PR #38: one bed retuned to a seat, and the wide bow door
made airlock-style — an outer door run (to void) and an inner door run (to
the hold) with a floor chamber between, rather than a single opening.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Dibujaron
Dibujaron merged commit 5865a84 into main Jul 19, 2026
1 check passed
@Dibujaron
Dibujaron deleted the feat/decorated-interiors branch July 19, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant