fix(swap): give our NPC the prefab's id again (Rust 11/25) #34

Merged
whitlocktech merged 1 commits from fix/swap-prefab-id into main 2026-11-30 23:16:53 -06:00

1 Commits

Author SHA1 Message Date
f21a468863 fix(swap): give our NPC the prefab's id again (Rust 11/25)
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in 9s
Rust's 11/25 public patch made BaseNetworkable.prefabID a property over an
encrypted value that only Unity's deserialisation fills (from
serializedPrefabID). The swap's AddComponent never deserialises, so every
RunicNPC NPC on public Rust has had prefab id 0 (ShortPrefabName empty) on
Oxide and Carbon. The swap now sets npc.prefabID = stock.prefabID after the
field copy (D398). The same lines are on edge, so the wipe-day cutover merges
cleanly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014HJEmd5sBSpNXicS4gmT1t
2026-11-30 23:09:44 -06:00