warvulture
This commit is contained in:
parent
8580d65a56
commit
0aa1dc4dc8
19 changed files with 2432 additions and 24 deletions
|
|
@ -8,7 +8,7 @@ namespace RacesOfValheim
|
|||
/// <summary>
|
||||
/// Claws that are part of the body, for the races that grow a pair.
|
||||
///
|
||||
/// This is SvermClawSlot generalised, not reinvented: the Sverm's Vilebone Maulclaws worked out
|
||||
/// This is SvermClawSlot generalised, not reinvented: the Sverm's Chitin Claws worked out
|
||||
/// the whole shape of the problem, and the Aswid and the Fenrir are asking for the same object
|
||||
/// with a different face. So the machinery moved here and each race supplies only what is
|
||||
/// genuinely its own - the item name, the model to wear, and whether it is currently a wolf.
|
||||
|
|
@ -178,6 +178,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 race 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.
|
||||
}
|
||||
|
||||
|
|
@ -375,6 +384,11 @@ namespace RacesOfValheim
|
|||
Jotunn.Logger.LogInfo($"[{RaceId}] Issued the {DisplayName}.");
|
||||
}
|
||||
|
||||
// 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