feat(rust): chat titles rank twenty-three conditions, and admins name the categories (PLAN_REDESIGNS §5, D172-D175, D209)
- Schema: fourteen title columns on rust_player_wipe_stats (the two best_* distances move by GREATEST, the rest are sums), rust_weapon_kills (kills by weapon prefab name) and rust_title_categories (the admin's title per category). purge.sql drops the two tables. - Ingest: player.tally's new fields, in one statement per frame, none for an older plugin's frame. - Titles: 23 categories plus playtime, each naming where it is read from (a sum, a MAX, npc_kills - animal_kills in signed arithmetic, or a named list). The bow/melee/blade/revolver/wood/ore/plants lists are one file, applied when a title is read. "NPC kills" ranks human NPCs only (D209). - A rule's text may be empty, meaning the category's title: the rule's own, then the admin's, then the default. Typed-only-markup is still refused. A rename forgets every server's cached answer. - Admin API: GET /admin/rust/title-categories and PUT /admin/rust/title-categories/:stat (empty text resets); the server list returns them too. Swagger fragment and routes.manifest.json regenerated (63 routes, against the pinned core). - Screen: every category in the rule form, the category's title as a placeholder, and a Category titles section with Save and Reset. The weapon lists are unverified until the rig probe runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
This commit is contained in:
72
server/model/titles/lists.js
Normal file
72
server/model/titles/lists.js
Normal file
@@ -0,0 +1,72 @@
|
||||
// ── The named lists behind five title categories (PLAN_REDESIGNS §5.3, D174) ──
|
||||
//
|
||||
// "In one place, so a Rust update adds a weapon by editing a list." The plugin
|
||||
// sends every credited kill by weapon SHORT PREFAB NAME — the name the killfeed
|
||||
// already shows (`bow_hunting.entity`) — and every gathered resource by item
|
||||
// shortname (`sulfur.ore`). These lists are applied when a title is READ, so
|
||||
// editing one corrects the whole wipe and no plugin release is needed.
|
||||
//
|
||||
// Melee is a list too: the site cannot ask the game whether a prefab is a
|
||||
// `BaseMelee`. A blade is a melee weapon, so every blade is in both.
|
||||
//
|
||||
// UNVERIFIED: the weapon names below are from knowledge of the game, not yet
|
||||
// read off the rig's own item list (the RgWeapons probe). Replace them with the
|
||||
// probe's output before this ships.
|
||||
|
||||
const BLADES = [
|
||||
'machete.weapon',
|
||||
'salvaged_sword.entity',
|
||||
'longsword.entity',
|
||||
'salvaged_cleaver.entity',
|
||||
'knife_bone.entity',
|
||||
'knife.combat.entity',
|
||||
'butcherknife.entity',
|
||||
]
|
||||
|
||||
const lists = {
|
||||
bow: ['bow_hunting.entity', 'compound_bow.entity', 'crossbow.entity'],
|
||||
blade: BLADES,
|
||||
melee: [
|
||||
...BLADES,
|
||||
'bone_club.entity',
|
||||
'mace.entity',
|
||||
'spear_wooden.entity',
|
||||
'spear_stone.entity',
|
||||
'hatchet.entity',
|
||||
'stonehatchet.entity',
|
||||
'pickaxe.entity',
|
||||
'stone_pickaxe.entity',
|
||||
'salvaged_axe.entity',
|
||||
'salvaged_hammer.entity',
|
||||
'salvaged_icepick.entity',
|
||||
'rock.entity',
|
||||
'torch.entity',
|
||||
'paddle.entity',
|
||||
'pitchfork.entity',
|
||||
'sickle.entity',
|
||||
],
|
||||
revolver: ['revolver.entity', 'python.entity'],
|
||||
|
||||
// Gathering (D159: all three sources, already in `rust_gather_totals`).
|
||||
wood: ['wood'],
|
||||
ore: ['metal.ore', 'sulfur.ore', 'hq.metal.ore'],
|
||||
// Hemp picks up as cloth; a seed that comes with a plant is not the plant.
|
||||
plants: [
|
||||
'cloth',
|
||||
'corn',
|
||||
'pumpkin',
|
||||
'potato',
|
||||
'mushroom',
|
||||
'red.berry',
|
||||
'blue.berry',
|
||||
'green.berry',
|
||||
'yellow.berry',
|
||||
'white.berry',
|
||||
'black.berry',
|
||||
'rose',
|
||||
'orchid',
|
||||
'sunflower',
|
||||
],
|
||||
}
|
||||
|
||||
module.exports = lists
|
||||
Reference in New Issue
Block a user