db+game: tech table + starting tech list seeded on new game and v5 backfill step
This commit is contained in:
@@ -81,6 +81,19 @@ CREATE TABLE IF NOT EXISTS ship_systems (
|
||||
UNIQUE (save_id, type)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tech (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
save_id INTEGER NOT NULL REFERENCES saves(id),
|
||||
slug TEXT NOT NULL, -- stable key, e.g. WEAPONS_SYSTEMS
|
||||
name TEXT NOT NULL, -- display name, e.g. 'WEAPONS SYSTEMS'
|
||||
cost_kind TEXT NOT NULL, -- 'resource' | 'part'
|
||||
cost_qty INTEGER NOT NULL DEFAULT 1,
|
||||
prerequisites TEXT NOT NULL DEFAULT '', -- comma-separated tech slugs, '' when none
|
||||
effect TEXT NOT NULL, -- effect slug — semantics in EFFECTS (lib/game/tech.ts)
|
||||
researched INTEGER NOT NULL DEFAULT 0,
|
||||
UNIQUE (save_id, slug)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS events (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
save_id INTEGER NOT NULL REFERENCES saves(id),
|
||||
|
||||
Reference in New Issue
Block a user