Merge branch 'war-vulture' into main

Brings in v1.4.3-v1.4.5 work: Trol's Hammer, Bone Servants, War Vulture
craftability, and the Aswid/Fenrir timed-claws rework, on top of the
bugfixes merged into main since v1.4.2.

Resolved conflicts in 7 files where main's post-v1.4.2 fixes overlapped
war-vulture's claws rework:
- README.md, manifest.json: took war-vulture's v1.4.5 content (main
  hadn't touched either since the v1.4.2 release).
- RacesOfValheim.cs: plugin version -> 1.4.5.
- RaceClaws.cs: kept war-vulture's lazy EnsureRoster() fix for the
  Fenrir claw-registration bug over main's belt-and-suspenders
  Register(this), and dropped the now-stale comment referencing the
  removed static constructor. Main's SetupDragItem race-ownership fix
  carried through untouched.
- AswidConfig.cs/AswidRace.cs/AswidPatches.cs: adopted war-vulture's
  single-key design (I toggles both Vampiric Aura and Devour together)
  to match the documented v1.4.5 trader-safety fix, removing a duplicate
  AuraEnabled field the two branches had each declared independently.
  Kept main's IsDownIgnoringHeldKeys() input fix on top.
- RaceCompendium.cs: kept main's fact-checked Aswid/Fenrir entries
  (war-vulture's copies were pre-fix stubs, one referencing a
  nonexistent variable) and layered in war-vulture's timed-claws
  wording.

Build verified clean (0 errors) after resolution.
This commit is contained in:
kanym 2026-08-18 17:36:42 +02:00
commit c2212df322
38 changed files with 3831 additions and 192 deletions

View file

@ -6,7 +6,7 @@ using UnityEngine;
namespace RacesOfValheim
{
/// <summary>
/// The Maulclaws as a REAL equipped weapon, sitting in the inventory in plain sight and
/// The Chitin Claws as a REAL equipped weapon, sitting in the inventory in plain sight and
/// refusing to be moved.
///
/// WHY THIS REPLACED THE COSMETIC VERSION. Bolting a model to the hand bones worked, but the
@ -36,8 +36,13 @@ namespace RacesOfValheim
/// </summary>
public static class SvermClawSlot
{
/// <summary>
/// The prefab id, and it keeps the old spelling on purpose: it is what every save on disk
/// names the item by, and renaming it would leave a Sverm holding an item ObjectDB can no
/// longer resolve. The display name below is the only half a player ever reads.
/// </summary>
public const string ItemName = "SvermMaulclaws";
public const string ItemDisplayName = "Vilebone Maulclaws";
public const string ItemDisplayName = "Chitin Claws";
/// <summary>Row in the reserved column the claws sit on. The other three await the carapace.</summary>
private const int ClawRow = 0;
@ -84,6 +89,15 @@ namespace RacesOfValheim
shared.m_weight = 0f;
shared.m_maxQuality = 1;
// INDESTRUCTIBLE, and it has to be the flag rather than a big number. The claws are
// never crafted, so no workbench will ever repair them: left on normal durability
// they wear down to zero and Humanoid.EquipItem then refuses to put them back in
// hand, which strands the Sverm bare-fisted for good. m_useDurability = false is the
// single switch every path reads - the attack drain, the broken-item check, the
// inventory bar and the tooltip line all skip the item entirely.
shared.m_useDurability = false;
shared.m_canBeReparied = false;
// No recipe and no station: this item is never crafted, only issued.
}
@ -153,9 +167,14 @@ namespace RacesOfValheim
claws.m_gridPos = corner;
}
Jotunn.Logger.LogInfo("[Sverm] Issued the Maulclaws.");
Jotunn.Logger.LogInfo("[Sverm] Issued the Chitin Claws.");
}
// A pair issued before the claws stopped wearing out is still carrying whatever it had
// ground down to. Nothing reads that number any more, but it is saved with the item, so
// it is put back to full once rather than left as a stale figure in the save file.
if (claws.m_durability < claws.GetMaxDurability()) claws.m_durability = claws.GetMaxDurability();
// Empty-handed means clawed. Anything else in the right hand wins until it is put
// away, which is the whole compromise.
ItemDrop.ItemData held = Traverse.Create((Humanoid)player).Field<ItemDrop.ItemData>("m_rightItem").Value;