fix(kit): kit extras found by item definition; stage 5 pairs in sight (#20, #22) #24

Merged
whitlocktech merged 2 commits from fix/kit-extras-belt-only into edge 2026-11-02 05:46:21 -06:00
Member

What & why

The staging drill's three failing fight checks (#20, #22), explained and fixed. Plan of record: docs PR (D331, PLAN 9c).

  • s5.kit.heal: Rust changed, and the plugin is fixed. Rust's November 2026 build adds the server variable ItemModEntity.playerOnlyEntityBeltOnly, on by default. An item Rust marks player-only, the medical syringe among them, now has a held entity only while it is in the belt. A kit puts syringes in the main inventory, so the heal (D260) found no MedicalTool and never healed. Without this, every kitUse.heal NPC would stop healing on public Rust at Thursday's wipe.
    • FindHeld now falls back to the item definition's entity prefab when an item has no held entity. That covers every extra: heal, melee, flamethrower, grenade, rocket. The org lead chose all five over heal alone.
    • HasFuel reads the flamethrower's fuel type the same way.
    • Heal() returns false when it cannot hold the item (a full belt); before, it used up an item it never held.
  • s5.fight.shootBack: the harness's spot. On the drill's 3500 map (seed 1234), a cliff rock (cliff_hills_large_e_arid) stands between the fifth fight's victim and the bully 15 m north of it. The bully never saw the victim, so never shot it. In the open, the victim answered within a second.
    • Each fight's second NPC now stands where each one's eyes see the other's centre, both ways, as RunicNPC's own line of sight runs.
    • North is tried first, then the other seven ways round, with a note when it moves.
  • s5.fight.leash: diagnostics only (org lead's choice). It failed once (run 49) and passed in every run on 2026-11-02. The harness now notes how the leashed NPC came to fight the moment the check would fail: its target, its health, and how far it and the scientist are from its home. The 38 m rule for a learned target stays until a failing run says which way it got in.

Harness 0.7.5.

Closes #20
Closes #22

(Merging into edge closes nothing: Gitea acts on these only in a merge into main. The release-day cutover collects them from this body, so both close when the fix ships at the wipe.)

How it was tested

Rust's code was compared between Oxide's public and staging builds, patched against patched. Hurt, OnAttacked, Heal, MaxHealth, NPC targeting, MedicalTool and ItemModConsumable are unchanged. ItemModEntity carries the belt-only change.

Scratch probes on rust-staging (build 26344826, Oxide 2.0.7861 staging, Kits 4.4.10, fresh data) showed:

Check What the probe showed
heal The syringe in main had held=null; NextHeal backed off 15 s per try.
shootBack A line trace from bully to victim hit cliff_hills_large_e_arid after 6.8 m. In the open, the victim targeted its attacker within 1 s.
leash Not reproduced in 3 tries.

The probes are not in this PR.

With this branch on rust-staging, Rust staging 26377229 (out 2026-11-02; swap fields 58/58, added=-):

Run Result
rnt.run s5 47 pass, 0 fail: heal heals 2, syringes left 0, health 145, shootBack answered=True, the bully at 225°.
rnt.run all 266 pass, 0 fail. It includes place, so cf3997b has now run live.

Locally:

  • node scripts/checkPlugin.js: plugin ok, API 6.
  • node --test scripts/checkPlugin.test.js tools/drill/drill.test.js: 33 pass.
  • plugin/RunicNPC.cs and tools/RunicNpcTest.cs compile against both staging's and public's Oxide-patched assemblies.

Not run: a Carbon boot on public Rust. The fallback only acts when an item has no held entity, which public Rust never leaves in main.

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense.
  • My commits are reasonably scoped with clear messages.

AI-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). I have reviewed and understand
    every change, and take responsibility for it. AI-authored commits are
    marked with a Co-Authored-By / Assisted-By trailer.

License

  • I agree that my contribution is licensed under this project's license
    (GNU GPL v3.0 or later), and I have the right to contribute it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What & why The staging drill's three failing fight checks (#20, #22), explained and fixed. Plan of record: docs PR (D331, PLAN 9c). - **`s5.kit.heal`: Rust changed, and the plugin is fixed.** Rust's November 2026 build adds the server variable `ItemModEntity.playerOnlyEntityBeltOnly`, on by default. An item Rust marks player-only, the medical syringe among them, now has a held entity only while it is in the belt. A kit puts syringes in the main inventory, so the heal (D260) found no `MedicalTool` and never healed. Without this, every `kitUse.heal` NPC would stop healing on public Rust at Thursday's wipe. - `FindHeld` now falls back to the item definition's entity prefab when an item has no held entity. That covers every extra: heal, melee, flamethrower, grenade, rocket. The org lead chose all five over heal alone. - `HasFuel` reads the flamethrower's fuel type the same way. - `Heal()` returns false when it cannot hold the item (a full belt); before, it used up an item it never held. - **`s5.fight.shootBack`: the harness's spot.** On the drill's 3500 map (seed 1234), a cliff rock (`cliff_hills_large_e_arid`) stands between the fifth fight's victim and the bully 15 m north of it. The bully never saw the victim, so never shot it. In the open, the victim answered within a second. - Each fight's second NPC now stands where each one's eyes see the other's centre, both ways, as RunicNPC's own line of sight runs. - North is tried first, then the other seven ways round, with a note when it moves. - **`s5.fight.leash`: diagnostics only (org lead's choice).** It failed once (run 49) and passed in every run on 2026-11-02. The harness now notes how the leashed NPC came to fight the moment the check would fail: its target, its health, and how far it and the scientist are from its home. The 38 m rule for a learned target stays until a failing run says which way it got in. Harness 0.7.5. Closes #20 Closes #22 (Merging into `edge` closes nothing: Gitea acts on these only in a merge into `main`. The release-day cutover collects them from this body, so both close when the fix ships at the wipe.) ## How it was tested Rust's code was compared between Oxide's public and staging builds, patched against patched. Hurt, OnAttacked, Heal, MaxHealth, NPC targeting, `MedicalTool` and `ItemModConsumable` are unchanged. `ItemModEntity` carries the belt-only change. Scratch probes on `rust-staging` (build 26344826, Oxide 2.0.7861 staging, Kits 4.4.10, fresh data) showed: | Check | What the probe showed | |---|---| | heal | The syringe in main had `held=null`; `NextHeal` backed off 15 s per try. | | shootBack | A line trace from bully to victim hit `cliff_hills_large_e_arid` after 6.8 m. In the open, the victim targeted its attacker within 1 s. | | leash | Not reproduced in 3 tries. | The probes are not in this PR. With this branch on `rust-staging`, Rust staging **26377229** (out 2026-11-02; swap fields 58/58, `added=-`): | Run | Result | |---|---| | `rnt.run s5` | 47 pass, 0 fail: heal `heals 2, syringes left 0, health 145`, shootBack `answered=True`, the bully at 225°. | | `rnt.run all` | **266 pass, 0 fail**. It includes `place`, so cf3997b has now run live. | Locally: - `node scripts/checkPlugin.js`: plugin ok, API 6. - `node --test scripts/checkPlugin.test.js tools/drill/drill.test.js`: 33 pass. - `plugin/RunicNPC.cs` and `tools/RunicNpcTest.cs` compile against both staging's and public's Oxide-patched assemblies. Not run: a Carbon boot on public Rust. The fallback only acts when an item has no held entity, which public Rust never leaves in main. ## Checklist - [x] I have read [CONTRIBUTING.md](CONTRIBUTING.md). - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. - [x] My commits are reasonably scoped with clear messages. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. ## License - [x] I agree that my contribution is licensed under this project's license (**GNU GPL v3.0 or later**), and I have the right to contribute it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 2 commits 2026-11-02 05:02:58 -06:00
Rust's November 2026 build (staging 26344826) adds the server variable
ItemModEntity.playerOnlyEntityBeltOnly, on by default: an item Rust marks
player-only, the medical syringe among them, has a held entity only while it
is in the belt. A kit puts its syringes in the main inventory, so the heal
(D260) found no item whose held entity is a MedicalTool and never healed
(s5.kit.heal on the staging drill: heals 0, health 75).

FindHeld now asks the item definition's entity prefab when an item has no
held entity, for every extra (heal, melee, flamethrower, grenade, rocket),
and HasFuel reads the flamethrower's fuel type the same way. Holding the item
moves it to the belt, where Rust makes its entity. A heal that cannot hold the
item (a full belt) is now no heal, not a heal of an item never held (D331).

On rust-staging: s5.kit.heal PASS, heals 2, syringes left 0, health 145.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
fix(drill): stage 5's pairs stand in each other's sight; say how the leashed NPC came to fight (#20, #22)
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in 31s
df2a258f64
s5.fight.shootBack failed on every staging drill run because, on the drill's
3500 map (seed 1234), a cliff rock (cliff_hills_large_e_arid) stands between
the fifth fight's victim and the bully 15 m north of it: the bully never saw
the victim, so never shot it. In the open the victim answers within a second.
Each fight's second NPC now stands where each one's eyes see the other's
centre, both ways, as RunicNPC's own line of sight runs: north first, then the
other seven ways round, with a note when it moves.

s5.fight.leash failed once (run 49) and did not come back in three tries. The
first moment the leashed NPC has a target, the harness now notes the target,
its health, and how far it and the scientist are from its home, so the next
failing run says whether it sensed, was shot, or heard an alarm.

Harness 0.7.5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit 1374891251 into edge 2026-11-02 05:46:21 -06:00
whitlocktech deleted branch fix/kit-extras-belt-only 2026-11-02 05:46:23 -06:00
Sign in to join this conversation.
No description provided.