warvulture
This commit is contained in:
parent
8580d65a56
commit
0aa1dc4dc8
19 changed files with 2432 additions and 24 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue