feat(rust): NPC sides, the faction table, an event's escort, ally and tether (runicnpc stage 5)
RunicNPC stage 5 on the site (docs runicnpc/PLAN.md, D253-D272):
- profiles gain the guard role, faction, relations (its own exceptions),
alertRadius, turrets, hurtByPlayers, hurtsPlayers and kitUse, checked in
RunicNPC's order and words, and defaulting to "players only" (D255);
- the faction table: one site-wide table, one row per pair and both ways
(D254, D268), stored in rust_npc_factions, edited on the NPC profiles page
(PUT /admin/rust/npcs/factions), pushed to every server with its
profiles and hashed with them, and a standalone server's own pairs
adopted at its first push with the site's winning (D244, D251);
- the Place NPCs step takes escort (a Steam id or a {placeholder}), an ally
(a clan from the new rust.options.clans source, or the team of a player)
and tether (the zone this event made), for a RunicNPC profile only
(D269, D270, D272);
- a placement may be held inside a zone (tether, D272);
- the bridge's RunicNPC API floor is 4.
Tests: 488 server, 66 client. routes.manifest.json regenerated against the
pinned core (one route added).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
This commit is contained in:
@@ -1305,7 +1305,7 @@ CREATE TABLE IF NOT EXISTS rust_npc_profile_servers (
|
||||
-- server's own profiles were read and imported (D244); until then nothing is
|
||||
-- pushed there. `pushed` is the name → site profile id map of the last push,
|
||||
-- which is how a kill is credited to "this profile only" (D247). `state` is
|
||||
-- `ok`, `failed`, or `absent` (no RunicNPC, or one older than API 3).
|
||||
-- `ok`, `failed`, or `absent` (no RunicNPC, or one older than API 4).
|
||||
CREATE TABLE IF NOT EXISTS rust_npc_sync (
|
||||
server_id VARCHAR(64) NOT NULL PRIMARY KEY,
|
||||
adopted_at DATETIME NULL,
|
||||
@@ -1338,6 +1338,17 @@ CREATE TABLE IF NOT EXISTS rust_npc_kills (
|
||||
KEY idx_rust_npc_kills_site (site_profile_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- The faction table (runicnpc stage 5, D254, D268): how factions treat each
|
||||
-- other, one row per pair and both ways, stored with `a` before `b`. One table
|
||||
-- for the whole site, pushed to every server with its profiles. `scientists`
|
||||
-- and `animals` are Rust's own two; a pair that is not here is neutral.
|
||||
CREATE TABLE IF NOT EXISTS rust_npc_factions (
|
||||
a VARCHAR(40) NOT NULL,
|
||||
b VARCHAR(40) NOT NULL,
|
||||
relation VARCHAR(8) NOT NULL,
|
||||
PRIMARY KEY (a, b)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- A title rule on a profile's kills names the site profile it ranks (runicnpc
|
||||
-- stage 4, D250). Null for every other stat. No foreign key: a deleted profile
|
||||
-- leaves a rule that ranks nobody, which the form shows and an admin removes.
|
||||
|
||||
Reference in New Issue
Block a user