ui/phase-17: ship-class CRUD without calc
Phase 17 lights up the ship-class table and designer active views, extends the order-draft pipeline with createShipClass and removeShipClass commands, and projects pending Save/Delete actions through applyOrderOverlay so the table reflects the player's intent before auto-sync lands. The plan is corrected in the same patch: per game/rules.txt, ship classes are designed once and cannot be edited — the engine has no Update command, so the UI exposes only Create + Delete. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,11 @@ export interface OtherPlanetFixture extends InhabitedFixture {
|
||||
|
||||
export interface ShipClassFixture {
|
||||
name: string;
|
||||
drive?: number;
|
||||
armament?: number;
|
||||
weapons?: number;
|
||||
shields?: number;
|
||||
cargo?: number;
|
||||
}
|
||||
|
||||
export interface PlayerFixture {
|
||||
@@ -165,6 +170,11 @@ export function buildReportPayload(fixture: ReportFixture): Uint8Array {
|
||||
const name = builder.createString(cls.name);
|
||||
ShipClass.startShipClass(builder);
|
||||
ShipClass.addName(builder, name);
|
||||
ShipClass.addDrive(builder, cls.drive ?? 0);
|
||||
ShipClass.addArmament(builder, BigInt(cls.armament ?? 0));
|
||||
ShipClass.addWeapons(builder, cls.weapons ?? 0);
|
||||
ShipClass.addShields(builder, cls.shields ?? 0);
|
||||
ShipClass.addCargo(builder, cls.cargo ?? 0);
|
||||
return ShipClass.endShipClass(builder);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user