Define vessels through data and capability components #35

Closed
opened 2026-08-14 11:53:09 +00:00 by metaheavens · 1 comment
Owner

Problem

Vessel type knowledge is distributed across Ship.gd, VesselDelivery.gd, BuildController.gd, and GameState.gd. Shield initialization, drawing, damage handling, colors, icons, crafting lists, hangar entries, unlocks, and upgrades use hard-coded vessel checks or repeated arrays.

Direction

Introduce VesselDefinition resources for static metadata and base stats, then compose optional behavior nodes such as ShieldComponent, WeaponComponent, CargoComponent, and TransportComponent into vessel scenes. Crafting, hangar, fleet, and lab menus should enumerate the vessel catalog and its research metadata rather than maintain separate type lists.

Acceptance criteria

  • Ship.gd does not check a vessel identifier to enable shield behavior; only vessels with a ShieldComponent have shields.
  • Delivery visuals, icons, names, build costs, base stats, and research references come from VesselDefinition.
  • Crafter, hangar, fleet, and lab vessel lists enumerate one catalog rather than duplicate hard-coded arrays.
  • Combat and transport behavior queries capabilities/components instead of vessel-name conditionals.
  • Adding a vessel assembled from existing capabilities requires a definition/scene and no new central type branch.
  • Existing crafting, delivery, hangar, fleet removal/storage, combat, and lab tests continue to pass.
## Problem Vessel type knowledge is distributed across Ship.gd, VesselDelivery.gd, BuildController.gd, and GameState.gd. Shield initialization, drawing, damage handling, colors, icons, crafting lists, hangar entries, unlocks, and upgrades use hard-coded vessel checks or repeated arrays. ## Direction Introduce VesselDefinition resources for static metadata and base stats, then compose optional behavior nodes such as ShieldComponent, WeaponComponent, CargoComponent, and TransportComponent into vessel scenes. Crafting, hangar, fleet, and lab menus should enumerate the vessel catalog and its research metadata rather than maintain separate type lists. ## Acceptance criteria - Ship.gd does not check a vessel identifier to enable shield behavior; only vessels with a ShieldComponent have shields. - Delivery visuals, icons, names, build costs, base stats, and research references come from VesselDefinition. - Crafter, hangar, fleet, and lab vessel lists enumerate one catalog rather than duplicate hard-coded arrays. - Combat and transport behavior queries capabilities/components instead of vessel-name conditionals. - Adding a vessel assembled from existing capabilities requires a definition/scene and no new central type branch. - Existing crafting, delivery, hangar, fleet removal/storage, combat, and lab tests continue to pass.
Author
Owner

Implemented and pushed in commit 14081ad. Added VesselDefinition/VesselUpgradeDefinition resources plus a single vessel catalog for names, icons, colors, costs, build times, base stats, unlocks, and lab upgrades. Ship behavior is composed from optional weapon, shield, cargo, and transport component scenes; Ship.gd has no vessel-identifier behavior checks. Production and transporter handling query capabilities, and crafter/lab/hangar/queue/delivery UI resolves the catalog. Added test_vessel_composition. Full in-place suite: 60/60 passed. Rendered and inspected 720x1280 lab and crafter previews.

Implemented and pushed in commit 14081ad. Added VesselDefinition/VesselUpgradeDefinition resources plus a single vessel catalog for names, icons, colors, costs, build times, base stats, unlocks, and lab upgrades. Ship behavior is composed from optional weapon, shield, cargo, and transport component scenes; Ship.gd has no vessel-identifier behavior checks. Production and transporter handling query capabilities, and crafter/lab/hangar/queue/delivery UI resolves the catalog. Added test_vessel_composition. Full in-place suite: 60/60 passed. Rendered and inspected 720x1280 lab and crafter previews.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
metaheavens/spaceship#35
No description provided.