feat: API 5, bosses, passive NPCs and the example profiles (stage 6) #10

Merged
whitlocktech merged 4 commits from feat/stage-6 into edge 2026-10-06 00:45:58 +00:00

4 Commits

Author SHA1 Message Date
3be2c54260 fix: an event's teardown removes a boss's adds (D287)
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in -1m33s
The walk found an event run's boss adds outliving the run: teardown
removes what a step placed by net id, and the adds RunicNPC spawned for
a boss's phase are in no step's ledger. RunicNPC now keeps each boss's
live adds by the boss's net id, after the boss dies too, and
RunicNpc_Despawn(<boss net id>) removes them with it, which is the call
the bridge's teardown makes. An add leaves the set when it dies.

Walked on the Oxide rig: event 36, run 65 placed the boss, its phase
summoned two adds owned by run:65, the boss was killed, the event
advanced on rust.boss.killed, and the run's cleanup removed both adds.
New harness check s6.boss.despawnTakesAdds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-05 13:06:19 -05:00
cf7f9cd38d test(harness): stage 6 group, and two checks fixed after the Rust update
The s6 group (41 checks): profile refusals, the passive role (never
fights, unhurtable by default, press E through OnPlayerInput once a
second, a window, wandering), the boss (three phases: damage, adds,
kit swap, speed, aim and ranges; its own copy of the profile; the death
hook's contributors; adds that fight on) and the example kits.

After Rust 2634.289.1 (buildid 25681086) rebuilt the navmesh,
sentry.shoots's first spot had a rock between the sentry and its
stand-in: it now uses a clear line, as the stage 5 tests do (28 hits).
move.monument.roams: the military tunnel's own 30 scientists no longer
move with no real player near, so ours standing too is the same
behaviour, and the check says both.

Two probes for that: rnt.stockprobe and rnt.monprobe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-05 12:48:09 -05:00
1e927f6a66 fix: the example kits' permission is kits.runicnpc (stage 6)
Kits registers a kit's RequiredPermission, and Oxide warns on every Kits
load that a permission a plugin registers must start with that plugin's
name: "Missing plugin name prefix 'kits' for permission
'runicnpc.examplekits'". The org lead chose Kits' prefix. Nobody is
granted it, so no player can claim an example kit by name; RunicNPC's
GiveKit call skips it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-05 12:14:51 -05:00
3972bccf34 feat: API 5, bosses, passive NPCs and the example profiles (stage 6)
The boss box on any role but passive (D273): a health bar for players
within its distance and everyone who hurt it, redrawn in place at most
four times a second (D274); phases at health fractions that change its
own copy of the profile (damage, aim, speed, ranges), swap its kit,
summon adds one per frame and say a line (D275); spawn and death lines
to everyone, phase lines to players near it (D277, D286); adds fight on
after it dies (D287). Hooks OnRunicNpcBossSpawned, _BossPhase and
_BossDied.

The passive role (D278, D279, D288): never fights (GetBestTarget and
AttackTick refuse, since Rust's design picks targets from every sensed
player), cannot be hurt unless its profile says so, moves as its profile
says including the new `stand`, and answers E through OnPlayerInput
with a chat line or a window. Hook OnRunicNpcUsed.

The four example profiles and their kits, written into Kits' data file
on the first load only (D280, D284, D289), each kit needing a
permission nobody holds. Kits' return re-checks the profiles.

The swap's field list regenerated for Rust 2634.289.1: two new fields,
eleven now [NonSerialized].

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-05 10:47:00 -05:00