feat(rust): Dynamic PVP's zones on the feed and the map (PLAN_REDESIGNS §14.3.3)
Stage 4 of the §14.3 integration plan, on protocol 14 (docs rust-link/PROTOCOL.md §20.7). - pvp.zone.created is a public kind, pvp.zone.deleted a staff kind. Each row is read per viewer by the new dynamicPvp.js: grid for everyone, the event's name only for Dynamic PVP's own vanilla events, position and zone id for staff only. - The feed's world filter carries the opening: "A PvP zone opened around the downed patrol helicopter · G7 · for 10 min". It names nobody. - The map gains a fifth layer, `pvp` (PvP zones), public by default with its own audience in Admin → Rust visibility, drawn as a red ring with its event's name. - Server settings' plugin line names Dynamic PVP; the swagger schemas and route descriptions carry the layer and the integration (fragment regenerated); ci/bundle.json ships dynamicPvp.js; README lists it. Tests: server 611/611 (dynamicPvp.test.js new, catalogue and map extended) and every check; client 89/89 (feed and map tooltip), build and externals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
This commit is contained in:
@@ -153,6 +153,10 @@ test('the classification covers exactly the event kinds the protocol defines, th
|
||||
// Protocol 14 (§20.5): Rust's own world events, one kind told apart by
|
||||
// `event`. Public as a kind; `worldEvents.js` filters per type and per viewer.
|
||||
'world.event',
|
||||
// Protocol 14 (§20.7): Dynamic PVP's zones. The opening is public and names
|
||||
// nobody; the closing is a staff line (PLAN_REDESIGNS §14.3.3).
|
||||
'pvp.zone.created',
|
||||
'pvp.zone.deleted',
|
||||
]
|
||||
|
||||
assert.deepEqual([...catalogue.ALL_KINDS].sort(), [...PROTOCOL_4].sort())
|
||||
@@ -172,6 +176,9 @@ test('the classification covers exactly the event kinds the protocol defines, th
|
||||
// audience — the names come off per viewer, so the kind is not a presence kind.
|
||||
assert.equal(catalogue.isPublic('world.event'), true)
|
||||
assert.equal(catalogue.isPresence('world.event'), false)
|
||||
assert.equal(catalogue.isPublic('pvp.zone.created'), true)
|
||||
assert.equal(catalogue.isPresence('pvp.zone.created'), false)
|
||||
assert.equal(catalogue.isPublic('pvp.zone.deleted'), false, 'a zone closing is a staff line')
|
||||
})
|
||||
|
||||
test('every kind that names a player who was on is behind the presence setting', () => {
|
||||
@@ -196,5 +203,6 @@ test('every kind that names a player who was on is behind the presence setting',
|
||||
|
||||
// And what is left names nobody — a world event included, once `worldEvents.shapeFor`
|
||||
// has taken its names off for a viewer below the presence audience (D376).
|
||||
assert.deepEqual(catalogue.kindsFor({}).sort(), ['npc.boss.spawned', 'server.initialized', 'server.shutdown', 'server.wipe', 'world.event'])
|
||||
// Dynamic PVP's opening names nobody at all.
|
||||
assert.deepEqual(catalogue.kindsFor({}).sort(), ['npc.boss.spawned', 'pvp.zone.created', 'server.initialized', 'server.shutdown', 'server.wipe', 'world.event'])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user