RacesOfValheim/JotunnModStub/Sverm
kanym da602a9b44 fix(sverm): take the carapace off a player who is no longer a Sverm
ApplyCarapace had no removal path - it returned early for a non-Sverm
without restoring anything - and its only caller sat behind an
`if (isSverm)`, so the removal branch could not have run even if it had
existed. The carapace is a plain visual override written with
SetChestItem and friends, and nothing in the game corrects that on its
own, so the chitin stayed on after a race change. Equipping anything
only appeared to fix it: that was Valheim's own refresh writing the real
gear back over ours.

ApplyCarapace now restores the three slots from what the player actually
has equipped - the same values Humanoid.SetupVisEquipment writes, but
only for the slots we overrode, so it cannot disturb another race's
visuals or a weapon mid-swap. A CarapaceMark component tracks who is
wearing it so the restore fires once rather than every tick, and dies
with the GameObject so it cannot leak. The caller is unconditional now,
matching ApplyEyes/ApplyClaws/ApplySpines, which all already strip
themselves from whoever is not a Sverm.
2026-08-12 17:55:10 +02:00
..
SvermAntennae.cs warvulture 2026-08-11 16:30:20 +02:00
SvermBeehive.cs warvulture 2026-08-11 16:30:20 +02:00
SvermBiomass.cs warvulture 2026-08-11 16:30:20 +02:00
SvermBlisterTick.cs warvulture 2026-08-11 16:30:20 +02:00
SvermBrood.cs warvulture 2026-08-11 16:30:20 +02:00
SvermCarapace.cs warvulture 2026-08-11 16:30:20 +02:00
SvermClaws.cs warvulture 2026-08-11 19:29:58 +02:00
SvermClawSlot.cs fix(claws): stop permanent claws from getting stuck in inventory after a race switch 2026-08-12 13:04:40 +02:00
SvermConfig.cs warvulture 2026-08-11 16:30:20 +02:00
SvermConfigManagement.cs warvulture 2026-08-11 16:30:20 +02:00
SvermFood.cs warvulture 2026-08-11 16:30:20 +02:00
SvermHive.cs warvulture 2026-08-11 16:30:20 +02:00
SvermHiveGoods.cs warvulture 2026-08-11 16:30:20 +02:00
SvermHiveStage.cs warvulture 2026-08-11 16:30:20 +02:00
SvermHiveStore.cs warvulture 2026-08-11 16:30:20 +02:00
SvermHiveVfx.cs warvulture 2026-08-11 16:30:20 +02:00
SvermMedicine.cs warvulture 2026-08-11 16:30:20 +02:00
SvermPatches.cs fix(sverm): take the carapace off a player who is no longer a Sverm 2026-08-12 17:55:10 +02:00
SvermProgression.cs warvulture 2026-08-11 16:30:20 +02:00
SvermRace.cs warvulture 2026-08-11 16:30:20 +02:00
SvermStatusEffects.cs warvulture 2026-08-11 16:30:20 +02:00
SvermStingerForm.cs warvulture 2026-08-11 16:30:20 +02:00
SvermVisuals.cs fix(sverm): take the carapace off a player who is no longer a Sverm 2026-08-12 17:55:10 +02:00
SvermWorker.cs warvulture 2026-08-11 16:30:20 +02:00