jotunn 2.30 compatibility + minor bugs

This commit is contained in:
Ferdinando 2026-09-10 19:14:05 +02:00
commit ce671e7124
14 changed files with 107 additions and 49 deletions

View file

@ -54,7 +54,11 @@ namespace RacesOfValheim
{
if (__instance == Player.m_localPlayer && TrolRace.IsTrol())
{
if (item != null && item.m_shared != null && item.m_shared.m_itemType == ItemDrop.ItemData.ItemType.Consumable)
// Only real food goes through the stomach check. Meads and potions have m_food == 0 and
// vanilla never sends them to CanEat - only to the status-effect cooldown below it. Catching
// every Consumable here refused potions whenever the extra stomachs were full, and
// skipped that cooldown the rest of the time.
if (item != null && item.m_shared != null && item.m_shared.m_itemType == ItemDrop.ItemData.ItemType.Consumable && item.m_shared.m_food > 0f)
{
__result = CanTrolEat(__instance, item);
return false;