chore(generated): regenerate types and schema, register map migrations
Regenerated payload types and db schema; register the game map system, construction timestamp, map labels, and node/zone resources migrations. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
8cab545b9d
commit
b5925b7633
11 changed files with 113112 additions and 21 deletions
27789
src/migrations/20260916_083158_add_game_map_system.json
Normal file
27789
src/migrations/20260916_083158_add_game_map_system.json
Normal file
File diff suppressed because it is too large
Load diff
185
src/migrations/20260916_083158_add_game_map_system.ts
Normal file
185
src/migrations/20260916_083158_add_game_map_system.ts
Normal file
File diff suppressed because one or more lines are too long
27794
src/migrations/20260916_185544_construction_timestamp_model.json
Normal file
27794
src/migrations/20260916_185544_construction_timestamp_model.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,41 @@
|
||||||
|
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres'
|
||||||
|
|
||||||
|
export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
|
||||||
|
await db.execute(sql`
|
||||||
|
ALTER TABLE "structures" RENAME COLUMN "construction_time" TO "construction_duration_minutes";
|
||||||
|
ALTER TABLE "game_structures" ADD COLUMN "construction_started_at" timestamp(3) with time zone;
|
||||||
|
ALTER TABLE "game_structures" ADD COLUMN "construction_completes_at" timestamp(3) with time zone;
|
||||||
|
ALTER TABLE "game_structures" DROP COLUMN "construction_progress";`)
|
||||||
|
|
||||||
|
// Convert legacy tick durations to minutes using the configured tick interval
|
||||||
|
// (default 10 when the game rules row is missing).
|
||||||
|
await db.execute(sql`
|
||||||
|
UPDATE "structures"
|
||||||
|
SET "construction_duration_minutes" = "construction_duration_minutes" * COALESCE(
|
||||||
|
(SELECT "game_tick_interval_minutes" FROM "game_rules" LIMIT 1),
|
||||||
|
10
|
||||||
|
);`)
|
||||||
|
|
||||||
|
// Legacy building sites have no deadline; let them finish on the next sweep
|
||||||
|
// instead of stalling forever.
|
||||||
|
await db.execute(sql`
|
||||||
|
UPDATE "game_structures"
|
||||||
|
SET "construction_completes_at" = NOW()
|
||||||
|
WHERE "construction_status" = 'building' AND "construction_completes_at" IS NULL;`)
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
|
||||||
|
await db.execute(sql`
|
||||||
|
ALTER TABLE "structures" RENAME COLUMN "construction_duration_minutes" TO "construction_time";
|
||||||
|
ALTER TABLE "game_structures" ADD COLUMN "construction_progress" numeric DEFAULT 0;
|
||||||
|
ALTER TABLE "game_structures" DROP COLUMN "construction_started_at";
|
||||||
|
ALTER TABLE "game_structures" DROP COLUMN "construction_completes_at";`)
|
||||||
|
|
||||||
|
// Best-effort inverse of the tick-to-minutes conversion.
|
||||||
|
await db.execute(sql`
|
||||||
|
UPDATE "structures"
|
||||||
|
SET "construction_time" = "construction_time" / COALESCE(
|
||||||
|
(SELECT "game_tick_interval_minutes" FROM "game_rules" LIMIT 1),
|
||||||
|
10
|
||||||
|
);`)
|
||||||
|
}
|
||||||
27895
src/migrations/20260916_220224_add_map_labels_and_styling.json
Normal file
27895
src/migrations/20260916_220224_add_map_labels_and_styling.json
Normal file
File diff suppressed because it is too large
Load diff
39
src/migrations/20260916_220224_add_map_labels_and_styling.ts
Normal file
39
src/migrations/20260916_220224_add_map_labels_and_styling.ts
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres'
|
||||||
|
|
||||||
|
export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
|
||||||
|
await db.execute(sql`
|
||||||
|
CREATE TYPE "public"."enum_map_roads_stroke_style" AS ENUM('solid', 'dashed', 'dotted');
|
||||||
|
ALTER TABLE "game_structures" ADD COLUMN "label_visible" boolean DEFAULT true;
|
||||||
|
ALTER TABLE "game_structures" ADD COLUMN "label_priority" numeric DEFAULT 0;
|
||||||
|
ALTER TABLE "map_roads" ADD COLUMN "description" varchar;
|
||||||
|
ALTER TABLE "map_roads" ADD COLUMN "stroke_color" varchar;
|
||||||
|
ALTER TABLE "map_roads" ADD COLUMN "stroke_weight" numeric DEFAULT 2;
|
||||||
|
ALTER TABLE "map_roads" ADD COLUMN "stroke_style" "enum_map_roads_stroke_style" DEFAULT 'solid';
|
||||||
|
ALTER TABLE "map_roads" ADD COLUMN "label_visible" boolean DEFAULT true;
|
||||||
|
ALTER TABLE "map_zones" ADD COLUMN "description" varchar;
|
||||||
|
ALTER TABLE "map_zones" ADD COLUMN "fill_color" varchar;
|
||||||
|
ALTER TABLE "map_zones" ADD COLUMN "stroke_color" varchar;
|
||||||
|
ALTER TABLE "map_zones" ADD COLUMN "fill_opacity" numeric;
|
||||||
|
ALTER TABLE "map_zones" ADD COLUMN "stroke_weight" numeric DEFAULT 1;
|
||||||
|
ALTER TABLE "map_zones" ADD COLUMN "label_visible" boolean DEFAULT true;
|
||||||
|
ALTER TABLE "resource_nodes" ADD COLUMN "description" varchar;`)
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
|
||||||
|
await db.execute(sql`
|
||||||
|
ALTER TABLE "game_structures" DROP COLUMN "label_visible";
|
||||||
|
ALTER TABLE "game_structures" DROP COLUMN "label_priority";
|
||||||
|
ALTER TABLE "map_roads" DROP COLUMN "description";
|
||||||
|
ALTER TABLE "map_roads" DROP COLUMN "stroke_color";
|
||||||
|
ALTER TABLE "map_roads" DROP COLUMN "stroke_weight";
|
||||||
|
ALTER TABLE "map_roads" DROP COLUMN "stroke_style";
|
||||||
|
ALTER TABLE "map_roads" DROP COLUMN "label_visible";
|
||||||
|
ALTER TABLE "map_zones" DROP COLUMN "description";
|
||||||
|
ALTER TABLE "map_zones" DROP COLUMN "fill_color";
|
||||||
|
ALTER TABLE "map_zones" DROP COLUMN "stroke_color";
|
||||||
|
ALTER TABLE "map_zones" DROP COLUMN "fill_opacity";
|
||||||
|
ALTER TABLE "map_zones" DROP COLUMN "stroke_weight";
|
||||||
|
ALTER TABLE "map_zones" DROP COLUMN "label_visible";
|
||||||
|
ALTER TABLE "resource_nodes" DROP COLUMN "description";
|
||||||
|
DROP TYPE "public"."enum_map_roads_stroke_style";`)
|
||||||
|
}
|
||||||
28123
src/migrations/20260917_023028_add_node_and_zone_resources.json
Normal file
28123
src/migrations/20260917_023028_add_node_and_zone_resources.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,52 @@
|
||||||
|
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres'
|
||||||
|
|
||||||
|
export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
|
||||||
|
await db.execute(sql`
|
||||||
|
CREATE TABLE "map_zones_rels" (
|
||||||
|
"id" serial PRIMARY KEY NOT NULL,
|
||||||
|
"order" integer,
|
||||||
|
"parent_id" integer NOT NULL,
|
||||||
|
"path" varchar NOT NULL,
|
||||||
|
"resources_id" integer
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE "resource_nodes_rels" (
|
||||||
|
"id" serial PRIMARY KEY NOT NULL,
|
||||||
|
"order" integer,
|
||||||
|
"parent_id" integer NOT NULL,
|
||||||
|
"path" varchar NOT NULL,
|
||||||
|
"resources_id" integer
|
||||||
|
);
|
||||||
|
|
||||||
|
ALTER TABLE "resource_nodes" DROP CONSTRAINT "resource_nodes_resource_id_resources_id_fk";
|
||||||
|
|
||||||
|
DROP INDEX "resource_nodes_resource_idx";
|
||||||
|
ALTER TABLE "map_zones_rels" ADD CONSTRAINT "map_zones_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."map_zones"("id") ON DELETE cascade ON UPDATE no action;
|
||||||
|
ALTER TABLE "map_zones_rels" ADD CONSTRAINT "map_zones_rels_resources_fk" FOREIGN KEY ("resources_id") REFERENCES "public"."resources"("id") ON DELETE cascade ON UPDATE no action;
|
||||||
|
ALTER TABLE "resource_nodes_rels" ADD CONSTRAINT "resource_nodes_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."resource_nodes"("id") ON DELETE cascade ON UPDATE no action;
|
||||||
|
ALTER TABLE "resource_nodes_rels" ADD CONSTRAINT "resource_nodes_rels_resources_fk" FOREIGN KEY ("resources_id") REFERENCES "public"."resources"("id") ON DELETE cascade ON UPDATE no action;
|
||||||
|
CREATE INDEX "map_zones_rels_order_idx" ON "map_zones_rels" USING btree ("order");
|
||||||
|
CREATE INDEX "map_zones_rels_parent_idx" ON "map_zones_rels" USING btree ("parent_id");
|
||||||
|
CREATE INDEX "map_zones_rels_path_idx" ON "map_zones_rels" USING btree ("path");
|
||||||
|
CREATE INDEX "map_zones_rels_resources_id_idx" ON "map_zones_rels" USING btree ("resources_id");
|
||||||
|
CREATE INDEX "resource_nodes_rels_order_idx" ON "resource_nodes_rels" USING btree ("order");
|
||||||
|
CREATE INDEX "resource_nodes_rels_parent_idx" ON "resource_nodes_rels" USING btree ("parent_id");
|
||||||
|
CREATE INDEX "resource_nodes_rels_path_idx" ON "resource_nodes_rels" USING btree ("path");
|
||||||
|
CREATE INDEX "resource_nodes_rels_resources_id_idx" ON "resource_nodes_rels" USING btree ("resources_id");
|
||||||
|
-- Carry existing single-resource nodes into the new hasMany rel table before
|
||||||
|
-- the old column goes away.
|
||||||
|
INSERT INTO "resource_nodes_rels" ("order", "parent_id", "path", "resources_id")
|
||||||
|
SELECT 0, "id", 'resources', "resource_id" FROM "resource_nodes" WHERE "resource_id" IS NOT NULL;
|
||||||
|
ALTER TABLE "resource_nodes" DROP COLUMN "resource_id";`)
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
|
||||||
|
await db.execute(sql`
|
||||||
|
ALTER TABLE "map_zones_rels" DISABLE ROW LEVEL SECURITY;
|
||||||
|
ALTER TABLE "resource_nodes_rels" DISABLE ROW LEVEL SECURITY;
|
||||||
|
DROP TABLE "map_zones_rels" CASCADE;
|
||||||
|
DROP TABLE "resource_nodes_rels" CASCADE;
|
||||||
|
ALTER TABLE "resource_nodes" ADD COLUMN "resource_id" integer NOT NULL;
|
||||||
|
ALTER TABLE "resource_nodes" ADD CONSTRAINT "resource_nodes_resource_id_resources_id_fk" FOREIGN KEY ("resource_id") REFERENCES "public"."resources"("id") ON DELETE set null ON UPDATE no action;
|
||||||
|
CREATE INDEX "resource_nodes_resource_idx" ON "resource_nodes" USING btree ("resource_id");`)
|
||||||
|
}
|
||||||
|
|
@ -60,6 +60,10 @@ import * as migration_20260912_071740_add_blackjack_minigame_stats from './20260
|
||||||
import * as migration_20260912_231219_add_discord_cancelled_at from './20260912_231219_add_discord_cancelled_at';
|
import * as migration_20260912_231219_add_discord_cancelled_at from './20260912_231219_add_discord_cancelled_at';
|
||||||
import * as migration_20260914_153046_add_chip_bank from './20260914_153046_add_chip_bank';
|
import * as migration_20260914_153046_add_chip_bank from './20260914_153046_add_chip_bank';
|
||||||
import * as migration_20260914_171412_add_respawn_tickets from './20260914_171412_add_respawn_tickets';
|
import * as migration_20260914_171412_add_respawn_tickets from './20260914_171412_add_respawn_tickets';
|
||||||
|
import * as migration_20260916_083158_add_game_map_system from './20260916_083158_add_game_map_system';
|
||||||
|
import * as migration_20260916_185544_construction_timestamp_model from './20260916_185544_construction_timestamp_model';
|
||||||
|
import * as migration_20260916_220224_add_map_labels_and_styling from './20260916_220224_add_map_labels_and_styling';
|
||||||
|
import * as migration_20260917_023028_add_node_and_zone_resources from './20260917_023028_add_node_and_zone_resources';
|
||||||
|
|
||||||
export const migrations = [
|
export const migrations = [
|
||||||
{
|
{
|
||||||
|
|
@ -370,6 +374,26 @@ export const migrations = [
|
||||||
{
|
{
|
||||||
up: migration_20260914_171412_add_respawn_tickets.up,
|
up: migration_20260914_171412_add_respawn_tickets.up,
|
||||||
down: migration_20260914_171412_add_respawn_tickets.down,
|
down: migration_20260914_171412_add_respawn_tickets.down,
|
||||||
name: '20260914_171412_add_respawn_tickets'
|
name: '20260914_171412_add_respawn_tickets',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
up: migration_20260916_083158_add_game_map_system.up,
|
||||||
|
down: migration_20260916_083158_add_game_map_system.down,
|
||||||
|
name: '20260916_083158_add_game_map_system',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
up: migration_20260916_185544_construction_timestamp_model.up,
|
||||||
|
down: migration_20260916_185544_construction_timestamp_model.down,
|
||||||
|
name: '20260916_185544_construction_timestamp_model',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
up: migration_20260916_220224_add_map_labels_and_styling.up,
|
||||||
|
down: migration_20260916_220224_add_map_labels_and_styling.down,
|
||||||
|
name: '20260916_220224_add_map_labels_and_styling',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
up: migration_20260917_023028_add_node_and_zone_resources.up,
|
||||||
|
down: migration_20260917_023028_add_node_and_zone_resources.down,
|
||||||
|
name: '20260917_023028_add_node_and_zone_resources'
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -118,6 +118,9 @@ export interface Config {
|
||||||
releases: Release;
|
releases: Release;
|
||||||
labels: Label;
|
labels: Label;
|
||||||
maps: Map;
|
maps: Map;
|
||||||
|
'map-roads': MapRoad;
|
||||||
|
'map-zones': MapZone;
|
||||||
|
'resource-nodes': ResourceNode;
|
||||||
'narrative-events': NarrativeEvent;
|
'narrative-events': NarrativeEvent;
|
||||||
'story-beats': StoryBeat;
|
'story-beats': StoryBeat;
|
||||||
'story-beat-states': StoryBeatState;
|
'story-beat-states': StoryBeatState;
|
||||||
|
|
@ -197,6 +200,9 @@ export interface Config {
|
||||||
releases: ReleasesSelect<false> | ReleasesSelect<true>;
|
releases: ReleasesSelect<false> | ReleasesSelect<true>;
|
||||||
labels: LabelsSelect<false> | LabelsSelect<true>;
|
labels: LabelsSelect<false> | LabelsSelect<true>;
|
||||||
maps: MapsSelect<false> | MapsSelect<true>;
|
maps: MapsSelect<false> | MapsSelect<true>;
|
||||||
|
'map-roads': MapRoadsSelect<false> | MapRoadsSelect<true>;
|
||||||
|
'map-zones': MapZonesSelect<false> | MapZonesSelect<true>;
|
||||||
|
'resource-nodes': ResourceNodesSelect<false> | ResourceNodesSelect<true>;
|
||||||
'narrative-events': NarrativeEventsSelect<false> | NarrativeEventsSelect<true>;
|
'narrative-events': NarrativeEventsSelect<false> | NarrativeEventsSelect<true>;
|
||||||
'story-beats': StoryBeatsSelect<false> | StoryBeatsSelect<true>;
|
'story-beats': StoryBeatsSelect<false> | StoryBeatsSelect<true>;
|
||||||
'story-beat-states': StoryBeatStatesSelect<false> | StoryBeatStatesSelect<true>;
|
'story-beat-states': StoryBeatStatesSelect<false> | StoryBeatStatesSelect<true>;
|
||||||
|
|
@ -338,6 +344,22 @@ export interface GameStructure {
|
||||||
* The faction that owns this structure.
|
* The faction that owns this structure.
|
||||||
*/
|
*/
|
||||||
faction?: (number | null) | Faction;
|
faction?: (number | null) | Faction;
|
||||||
|
/**
|
||||||
|
* The game map this structure sits on.
|
||||||
|
*/
|
||||||
|
map?: (number | null) | Map;
|
||||||
|
/**
|
||||||
|
* Placed sites start awaiting materials. Once all blueprint materials are delivered construction starts immediately (timestamps below); the game tick flips past-deadline building sites to complete.
|
||||||
|
*/
|
||||||
|
constructionStatus?: ('awaiting_materials' | 'building' | 'complete') | null;
|
||||||
|
/**
|
||||||
|
* When construction began (materials consumed). Empty while awaiting materials.
|
||||||
|
*/
|
||||||
|
constructionStartedAt?: string | null;
|
||||||
|
/**
|
||||||
|
* The exact deadline at which the site becomes operational.
|
||||||
|
*/
|
||||||
|
constructionCompletesAt?: string | null;
|
||||||
/**
|
/**
|
||||||
* Funds charged per base tick for structure upkeep, separate from staff salaries.
|
* Funds charged per base tick for structure upkeep, separate from staff salaries.
|
||||||
*/
|
*/
|
||||||
|
|
@ -381,10 +403,20 @@ export interface GameStructure {
|
||||||
}[]
|
}[]
|
||||||
| null;
|
| null;
|
||||||
/**
|
/**
|
||||||
|
* Map meters [x, y] on the structure's game map (not geographic degrees).
|
||||||
|
*
|
||||||
* @minItems 2
|
* @minItems 2
|
||||||
* @maxItems 2
|
* @maxItems 2
|
||||||
*/
|
*/
|
||||||
coordinates?: [number, number] | null;
|
coordinates?: [number, number] | null;
|
||||||
|
/**
|
||||||
|
* Renders the structure's name on the map. When several structures cluster together, the highest-priority label wins until you zoom in.
|
||||||
|
*/
|
||||||
|
labelVisible?: boolean | null;
|
||||||
|
/**
|
||||||
|
* Label priority for clustering (0-100). Higher wins when structures overlap at low zoom; ties break by stored mass.
|
||||||
|
*/
|
||||||
|
labelPriority?: number | null;
|
||||||
storedResources?:
|
storedResources?:
|
||||||
| {
|
| {
|
||||||
resource: number | Resource;
|
resource: number | Resource;
|
||||||
|
|
@ -466,7 +498,10 @@ export interface Structure {
|
||||||
amount?: number | null;
|
amount?: number | null;
|
||||||
id?: string | null;
|
id?: string | null;
|
||||||
}[];
|
}[];
|
||||||
constructionTime: number;
|
/**
|
||||||
|
* How many real minutes it takes to complete construction of this structure after materials are delivered and building starts.
|
||||||
|
*/
|
||||||
|
constructionDurationMinutes: number;
|
||||||
/**
|
/**
|
||||||
* What research must be done before this can be built.
|
* What research must be done before this can be built.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1165,6 +1200,10 @@ export interface Vehicle {
|
||||||
id?: string | null;
|
id?: string | null;
|
||||||
}[]
|
}[]
|
||||||
| null;
|
| null;
|
||||||
|
/**
|
||||||
|
* Ground vehicles route over the road network and refuse shipments with no connected route. Air and sea vehicles travel straight-line.
|
||||||
|
*/
|
||||||
|
transportMode: 'ground' | 'air' | 'sea';
|
||||||
width?: number | null;
|
width?: number | null;
|
||||||
height?: number | null;
|
height?: number | null;
|
||||||
maxMass?: number | null;
|
maxMass?: number | null;
|
||||||
|
|
@ -1676,6 +1715,12 @@ export interface Role {
|
||||||
| 'maps:update'
|
| 'maps:update'
|
||||||
| 'maps:delete'
|
| 'maps:delete'
|
||||||
| 'admin:maps:manage'
|
| 'admin:maps:manage'
|
||||||
|
| 'map-roads:read'
|
||||||
|
| 'admin:map-roads:manage'
|
||||||
|
| 'map-zones:read'
|
||||||
|
| 'admin:map-zones:manage'
|
||||||
|
| 'resource-nodes:read'
|
||||||
|
| 'admin:resource-nodes:manage'
|
||||||
| 'narrative-events:create'
|
| 'narrative-events:create'
|
||||||
| 'narrative-events:read'
|
| 'narrative-events:read'
|
||||||
| 'narrative-events:update'
|
| 'narrative-events:update'
|
||||||
|
|
@ -1740,6 +1785,51 @@ export interface Role {
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "maps".
|
||||||
|
*/
|
||||||
|
export interface Map {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
/**
|
||||||
|
* Inactive maps are hidden from the map page and cannot receive placements.
|
||||||
|
*/
|
||||||
|
isActive?: boolean | null;
|
||||||
|
/**
|
||||||
|
* Map width in real meters (e.g. Altis is 8192).
|
||||||
|
*/
|
||||||
|
worldSizeWidth: number;
|
||||||
|
/**
|
||||||
|
* Map height in real meters (e.g. Altis is 8192).
|
||||||
|
*/
|
||||||
|
worldSizeHeight: number;
|
||||||
|
/**
|
||||||
|
* Image: a single uploaded map image stretched over the world bounds. Tiles: an external XYZ tile server.
|
||||||
|
*/
|
||||||
|
basemapMode: 'image' | 'tiles';
|
||||||
|
/**
|
||||||
|
* Top-down map image. Rendered stretched across the full world size.
|
||||||
|
*/
|
||||||
|
basemapImage?: (number | null) | Media;
|
||||||
|
/**
|
||||||
|
* XYZ template, e.g. https://tiles.example.com/{z}/{x}/{y}.png
|
||||||
|
*/
|
||||||
|
tileUrlTemplate?: string | null;
|
||||||
|
minZoom?: number | null;
|
||||||
|
maxZoom?: number | null;
|
||||||
|
/**
|
||||||
|
* Defaults to half the world width when empty.
|
||||||
|
*/
|
||||||
|
defaultCenterX?: number | null;
|
||||||
|
/**
|
||||||
|
* Defaults to half the world height when empty.
|
||||||
|
*/
|
||||||
|
defaultCenterY?: number | null;
|
||||||
|
defaultZoom?: number | null;
|
||||||
|
updatedAt: string;
|
||||||
|
createdAt: string;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
* via the `definition` "game-vehicles".
|
* via the `definition` "game-vehicles".
|
||||||
|
|
@ -2691,17 +2781,6 @@ export interface Mission {
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
|
||||||
* via the `definition` "maps".
|
|
||||||
*/
|
|
||||||
export interface Map {
|
|
||||||
id: number;
|
|
||||||
name: string;
|
|
||||||
fileName?: string | null;
|
|
||||||
updatedAt: string;
|
|
||||||
createdAt: string;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
* via the `definition` "mission-files".
|
* via the `definition` "mission-files".
|
||||||
|
|
@ -2823,6 +2902,22 @@ export interface Shipment {
|
||||||
name?: string | null;
|
name?: string | null;
|
||||||
origin: number | GameStructure;
|
origin: number | GameStructure;
|
||||||
destination: number | GameStructure;
|
destination: number | GameStructure;
|
||||||
|
/**
|
||||||
|
* The game map this shipment travels on. Cross-map shipments are not supported.
|
||||||
|
*/
|
||||||
|
map?: (number | null) | Map;
|
||||||
|
/**
|
||||||
|
* Snapshot polyline of the route as [x, y] meter tuples, for map rendering.
|
||||||
|
*/
|
||||||
|
routePath?:
|
||||||
|
| {
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
| unknown[]
|
||||||
|
| string
|
||||||
|
| number
|
||||||
|
| boolean
|
||||||
|
| null;
|
||||||
/**
|
/**
|
||||||
* The vehicle instance transporting this shipment.
|
* The vehicle instance transporting this shipment.
|
||||||
*/
|
*/
|
||||||
|
|
@ -3666,6 +3761,150 @@ export interface WikiTemplate {
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "map-roads".
|
||||||
|
*/
|
||||||
|
export interface MapRoad {
|
||||||
|
id: number;
|
||||||
|
/**
|
||||||
|
* Road or route label (e.g. "Highway 1", "Kavala ridge trail").
|
||||||
|
*/
|
||||||
|
name?: string | null;
|
||||||
|
/**
|
||||||
|
* Shown in the road's tooltip and popup on the map.
|
||||||
|
*/
|
||||||
|
description?: string | null;
|
||||||
|
map: number | Map;
|
||||||
|
surface: 'paved' | 'dirt' | 'trail';
|
||||||
|
/**
|
||||||
|
* Routing weight multiplier. Higher = faster/preferred (1 = neutral). Affects which route Dijkstra picks; fuel is charged on geometric length.
|
||||||
|
*/
|
||||||
|
speedMultiplier: number;
|
||||||
|
/**
|
||||||
|
* Line color as hex (e.g. #cbd5e1). Empty = default color for the surface.
|
||||||
|
*/
|
||||||
|
strokeColor?: string | null;
|
||||||
|
/**
|
||||||
|
* Line thickness in pixels.
|
||||||
|
*/
|
||||||
|
strokeWeight?: number | null;
|
||||||
|
strokeStyle?: ('solid' | 'dashed' | 'dotted') | null;
|
||||||
|
/**
|
||||||
|
* Renders the road's name along the line at zoom-dependent intervals.
|
||||||
|
*/
|
||||||
|
labelVisible?: boolean | null;
|
||||||
|
/**
|
||||||
|
* Array of [x, y] meter tuples in map order.
|
||||||
|
*/
|
||||||
|
points:
|
||||||
|
| {
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
| unknown[]
|
||||||
|
| string
|
||||||
|
| number
|
||||||
|
| boolean
|
||||||
|
| null;
|
||||||
|
updatedAt: string;
|
||||||
|
createdAt: string;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "map-zones".
|
||||||
|
*/
|
||||||
|
export interface MapZone {
|
||||||
|
id: number;
|
||||||
|
/**
|
||||||
|
* Zone label (e.g. "Altis bay", "Flood plain").
|
||||||
|
*/
|
||||||
|
name?: string | null;
|
||||||
|
/**
|
||||||
|
* Shown in the zone's tooltip and popup on the map.
|
||||||
|
*/
|
||||||
|
description?: string | null;
|
||||||
|
map: number | Map;
|
||||||
|
/**
|
||||||
|
* Water zones block land-blueprint placement. Land zones are informational; default terrain is buildable land.
|
||||||
|
*/
|
||||||
|
type: 'water' | 'land';
|
||||||
|
/**
|
||||||
|
* Polygon fill as hex (e.g. #38bdf8). Empty = default color for the type.
|
||||||
|
*/
|
||||||
|
fillColor?: string | null;
|
||||||
|
/**
|
||||||
|
* Outline color as hex. Empty = default color for the type.
|
||||||
|
*/
|
||||||
|
strokeColor?: string | null;
|
||||||
|
/**
|
||||||
|
* Fill opacity 0-1. Empty = default (0.25 water, 0.08 land).
|
||||||
|
*/
|
||||||
|
fillOpacity?: number | null;
|
||||||
|
/**
|
||||||
|
* Outline thickness in pixels. 0 hides the outline.
|
||||||
|
*/
|
||||||
|
strokeWeight?: number | null;
|
||||||
|
/**
|
||||||
|
* Resources contained in this zone (e.g. an oil field). A zone with resources satisfies blueprint resourcesInRange requirements for any site inside it.
|
||||||
|
*/
|
||||||
|
resources?: (number | Resource)[] | null;
|
||||||
|
/**
|
||||||
|
* Renders the zone's name at the polygon's center.
|
||||||
|
*/
|
||||||
|
labelVisible?: boolean | null;
|
||||||
|
/**
|
||||||
|
* Polygon ring as an array of [x, y] meter tuples (need not repeat the first point).
|
||||||
|
*/
|
||||||
|
points:
|
||||||
|
| {
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
| unknown[]
|
||||||
|
| string
|
||||||
|
| number
|
||||||
|
| boolean
|
||||||
|
| null;
|
||||||
|
updatedAt: string;
|
||||||
|
createdAt: string;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "resource-nodes".
|
||||||
|
*/
|
||||||
|
export interface ResourceNode {
|
||||||
|
id: number;
|
||||||
|
/**
|
||||||
|
* Node label (e.g. "North copper deposit").
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
/**
|
||||||
|
* Shown in the node's tooltip and popup on the map.
|
||||||
|
*/
|
||||||
|
description?: string | null;
|
||||||
|
map: number | Map;
|
||||||
|
/**
|
||||||
|
* Every resource this node yields (e.g. copper AND oil).
|
||||||
|
*/
|
||||||
|
resources: (number | Resource)[];
|
||||||
|
/**
|
||||||
|
* [x, y] tuple in meters on the map grid.
|
||||||
|
*/
|
||||||
|
position:
|
||||||
|
| {
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
| unknown[]
|
||||||
|
| string
|
||||||
|
| number
|
||||||
|
| boolean
|
||||||
|
| null;
|
||||||
|
/**
|
||||||
|
* Display-only abundance rating for the map UI.
|
||||||
|
*/
|
||||||
|
richness?: number | null;
|
||||||
|
updatedAt: string;
|
||||||
|
createdAt: string;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
* via the `definition` "narrative-events".
|
* via the `definition` "narrative-events".
|
||||||
|
|
@ -4927,6 +5166,60 @@ export interface PayloadMcpApiKey {
|
||||||
*/
|
*/
|
||||||
delete?: boolean | null;
|
delete?: boolean | null;
|
||||||
};
|
};
|
||||||
|
mapRoads?: {
|
||||||
|
/**
|
||||||
|
* Allow clients to find map-roads.
|
||||||
|
*/
|
||||||
|
find?: boolean | null;
|
||||||
|
/**
|
||||||
|
* Allow clients to create map-roads.
|
||||||
|
*/
|
||||||
|
create?: boolean | null;
|
||||||
|
/**
|
||||||
|
* Allow clients to update map-roads.
|
||||||
|
*/
|
||||||
|
update?: boolean | null;
|
||||||
|
/**
|
||||||
|
* Allow clients to delete map-roads.
|
||||||
|
*/
|
||||||
|
delete?: boolean | null;
|
||||||
|
};
|
||||||
|
mapZones?: {
|
||||||
|
/**
|
||||||
|
* Allow clients to find map-zones.
|
||||||
|
*/
|
||||||
|
find?: boolean | null;
|
||||||
|
/**
|
||||||
|
* Allow clients to create map-zones.
|
||||||
|
*/
|
||||||
|
create?: boolean | null;
|
||||||
|
/**
|
||||||
|
* Allow clients to update map-zones.
|
||||||
|
*/
|
||||||
|
update?: boolean | null;
|
||||||
|
/**
|
||||||
|
* Allow clients to delete map-zones.
|
||||||
|
*/
|
||||||
|
delete?: boolean | null;
|
||||||
|
};
|
||||||
|
resourceNodes?: {
|
||||||
|
/**
|
||||||
|
* Allow clients to find resource-nodes.
|
||||||
|
*/
|
||||||
|
find?: boolean | null;
|
||||||
|
/**
|
||||||
|
* Allow clients to create resource-nodes.
|
||||||
|
*/
|
||||||
|
create?: boolean | null;
|
||||||
|
/**
|
||||||
|
* Allow clients to update resource-nodes.
|
||||||
|
*/
|
||||||
|
update?: boolean | null;
|
||||||
|
/**
|
||||||
|
* Allow clients to delete resource-nodes.
|
||||||
|
*/
|
||||||
|
delete?: boolean | null;
|
||||||
|
};
|
||||||
narrativeEvents?: {
|
narrativeEvents?: {
|
||||||
/**
|
/**
|
||||||
* Allow clients to find narrative-events.
|
* Allow clients to find narrative-events.
|
||||||
|
|
@ -5392,6 +5685,18 @@ export interface PayloadLockedDocument {
|
||||||
relationTo: 'maps';
|
relationTo: 'maps';
|
||||||
value: number | Map;
|
value: number | Map;
|
||||||
} | null)
|
} | null)
|
||||||
|
| ({
|
||||||
|
relationTo: 'map-roads';
|
||||||
|
value: number | MapRoad;
|
||||||
|
} | null)
|
||||||
|
| ({
|
||||||
|
relationTo: 'map-zones';
|
||||||
|
value: number | MapZone;
|
||||||
|
} | null)
|
||||||
|
| ({
|
||||||
|
relationTo: 'resource-nodes';
|
||||||
|
value: number | ResourceNode;
|
||||||
|
} | null)
|
||||||
| ({
|
| ({
|
||||||
relationTo: 'narrative-events';
|
relationTo: 'narrative-events';
|
||||||
value: number | NarrativeEvent;
|
value: number | NarrativeEvent;
|
||||||
|
|
@ -5541,6 +5846,10 @@ export interface GameStructuresSelect<T extends boolean = true> {
|
||||||
name?: T;
|
name?: T;
|
||||||
type?: T;
|
type?: T;
|
||||||
faction?: T;
|
faction?: T;
|
||||||
|
map?: T;
|
||||||
|
constructionStatus?: T;
|
||||||
|
constructionStartedAt?: T;
|
||||||
|
constructionCompletesAt?: T;
|
||||||
maintenanceCost?: T;
|
maintenanceCost?: T;
|
||||||
laborRequirements?:
|
laborRequirements?:
|
||||||
| T
|
| T
|
||||||
|
|
@ -5560,6 +5869,8 @@ export interface GameStructuresSelect<T extends boolean = true> {
|
||||||
id?: T;
|
id?: T;
|
||||||
};
|
};
|
||||||
coordinates?: T;
|
coordinates?: T;
|
||||||
|
labelVisible?: T;
|
||||||
|
labelPriority?: T;
|
||||||
storedResources?:
|
storedResources?:
|
||||||
| T
|
| T
|
||||||
| {
|
| {
|
||||||
|
|
@ -6489,6 +6800,7 @@ export interface VehiclesSelect<T extends boolean = true> {
|
||||||
amount?: T;
|
amount?: T;
|
||||||
id?: T;
|
id?: T;
|
||||||
};
|
};
|
||||||
|
transportMode?: T;
|
||||||
width?: T;
|
width?: T;
|
||||||
height?: T;
|
height?: T;
|
||||||
maxMass?: T;
|
maxMass?: T;
|
||||||
|
|
@ -6536,7 +6848,7 @@ export interface StructuresSelect<T extends boolean = true> {
|
||||||
amount?: T;
|
amount?: T;
|
||||||
id?: T;
|
id?: T;
|
||||||
};
|
};
|
||||||
constructionTime?: T;
|
constructionDurationMinutes?: T;
|
||||||
requiredTech?: T;
|
requiredTech?: T;
|
||||||
requiresUpgrade?: T;
|
requiresUpgrade?: T;
|
||||||
upgradesInto?: T;
|
upgradesInto?: T;
|
||||||
|
|
@ -6625,6 +6937,8 @@ export interface ShipmentsSelect<T extends boolean = true> {
|
||||||
name?: T;
|
name?: T;
|
||||||
origin?: T;
|
origin?: T;
|
||||||
destination?: T;
|
destination?: T;
|
||||||
|
map?: T;
|
||||||
|
routePath?: T;
|
||||||
transportVehicle?: T;
|
transportVehicle?: T;
|
||||||
distance?: T;
|
distance?: T;
|
||||||
cargo?:
|
cargo?:
|
||||||
|
|
@ -7018,7 +7332,68 @@ export interface LabelsSelect<T extends boolean = true> {
|
||||||
*/
|
*/
|
||||||
export interface MapsSelect<T extends boolean = true> {
|
export interface MapsSelect<T extends boolean = true> {
|
||||||
name?: T;
|
name?: T;
|
||||||
fileName?: T;
|
isActive?: T;
|
||||||
|
worldSizeWidth?: T;
|
||||||
|
worldSizeHeight?: T;
|
||||||
|
basemapMode?: T;
|
||||||
|
basemapImage?: T;
|
||||||
|
tileUrlTemplate?: T;
|
||||||
|
minZoom?: T;
|
||||||
|
maxZoom?: T;
|
||||||
|
defaultCenterX?: T;
|
||||||
|
defaultCenterY?: T;
|
||||||
|
defaultZoom?: T;
|
||||||
|
updatedAt?: T;
|
||||||
|
createdAt?: T;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "map-roads_select".
|
||||||
|
*/
|
||||||
|
export interface MapRoadsSelect<T extends boolean = true> {
|
||||||
|
name?: T;
|
||||||
|
description?: T;
|
||||||
|
map?: T;
|
||||||
|
surface?: T;
|
||||||
|
speedMultiplier?: T;
|
||||||
|
strokeColor?: T;
|
||||||
|
strokeWeight?: T;
|
||||||
|
strokeStyle?: T;
|
||||||
|
labelVisible?: T;
|
||||||
|
points?: T;
|
||||||
|
updatedAt?: T;
|
||||||
|
createdAt?: T;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "map-zones_select".
|
||||||
|
*/
|
||||||
|
export interface MapZonesSelect<T extends boolean = true> {
|
||||||
|
name?: T;
|
||||||
|
description?: T;
|
||||||
|
map?: T;
|
||||||
|
type?: T;
|
||||||
|
fillColor?: T;
|
||||||
|
strokeColor?: T;
|
||||||
|
fillOpacity?: T;
|
||||||
|
strokeWeight?: T;
|
||||||
|
resources?: T;
|
||||||
|
labelVisible?: T;
|
||||||
|
points?: T;
|
||||||
|
updatedAt?: T;
|
||||||
|
createdAt?: T;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "resource-nodes_select".
|
||||||
|
*/
|
||||||
|
export interface ResourceNodesSelect<T extends boolean = true> {
|
||||||
|
name?: T;
|
||||||
|
description?: T;
|
||||||
|
map?: T;
|
||||||
|
resources?: T;
|
||||||
|
position?: T;
|
||||||
|
richness?: T;
|
||||||
updatedAt?: T;
|
updatedAt?: T;
|
||||||
createdAt?: T;
|
createdAt?: T;
|
||||||
}
|
}
|
||||||
|
|
@ -7653,6 +8028,30 @@ export interface PayloadMcpApiKeysSelect<T extends boolean = true> {
|
||||||
update?: T;
|
update?: T;
|
||||||
delete?: T;
|
delete?: T;
|
||||||
};
|
};
|
||||||
|
mapRoads?:
|
||||||
|
| T
|
||||||
|
| {
|
||||||
|
find?: T;
|
||||||
|
create?: T;
|
||||||
|
update?: T;
|
||||||
|
delete?: T;
|
||||||
|
};
|
||||||
|
mapZones?:
|
||||||
|
| T
|
||||||
|
| {
|
||||||
|
find?: T;
|
||||||
|
create?: T;
|
||||||
|
update?: T;
|
||||||
|
delete?: T;
|
||||||
|
};
|
||||||
|
resourceNodes?:
|
||||||
|
| T
|
||||||
|
| {
|
||||||
|
find?: T;
|
||||||
|
create?: T;
|
||||||
|
update?: T;
|
||||||
|
delete?: T;
|
||||||
|
};
|
||||||
narrativeEvents?:
|
narrativeEvents?:
|
||||||
| T
|
| T
|
||||||
| {
|
| {
|
||||||
|
|
@ -7842,7 +8241,7 @@ export interface GameRule {
|
||||||
*/
|
*/
|
||||||
intelAssignments?: (number | Assignment)[] | null;
|
intelAssignments?: (number | Assignment)[] | null;
|
||||||
/**
|
/**
|
||||||
* Distance threshold for instant transfers. Structures within this distance can transfer resources instantly. Beyond this, shipments are required.
|
* Distance threshold in real meters for instant transfers. Structures within this distance can transfer resources instantly. Beyond this, shipments are required.
|
||||||
*/
|
*/
|
||||||
proximityThreshold?: number | null;
|
proximityThreshold?: number | null;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue