diff --git a/JotunnModStub/Aswid/AswidPatches.cs b/JotunnModStub/Aswid/AswidPatches.cs index 6931d80..6e1609e 100644 --- a/JotunnModStub/Aswid/AswidPatches.cs +++ b/JotunnModStub/Aswid/AswidPatches.cs @@ -341,14 +341,11 @@ namespace RacesOfValheim } } - if (canRefresh) - { - __result = true; - } - else - { - __result = false; // Nessuno spazio disponibile, cibo si disintegra - } + // Otherwise vanilla's answer stands: it already allows replacing the + // most depleted meal past half its time, and already showed its "too + // full" message when it refused. Forcing false here used to block + // that replacement, silently. + if (canRefresh) __result = true; } } else @@ -426,9 +423,9 @@ namespace RacesOfValheim return false; } - // Se pieno e senza 4° slot disponibile, fallisce e disintegra - __result = false; - return false; + // Full, no fourth slot free, no slot holding this meal. Native EatFood + // replaces the most depleted meal past half its time, or refuses. + return true; } else { diff --git a/JotunnModStub/Draugh/DraughFoodPatches.cs b/JotunnModStub/Draugh/DraughFoodPatches.cs index f4a9ce2..ea56d5c 100644 --- a/JotunnModStub/Draugh/DraughFoodPatches.cs +++ b/JotunnModStub/Draugh/DraughFoodPatches.cs @@ -90,6 +90,11 @@ namespace RacesOfValheim var zanim = Traverse.Create(player).Field("m_zanim").GetValue(); if (zanim != null) zanim.SetTrigger("eat"); } + else + { + // Vanilla's refusal message, which EatFood never shows by itself + player.CanEat(customItemDrop.m_itemData, true); + } return false; // Skip native UseItem } } @@ -154,9 +159,10 @@ namespace RacesOfValheim return false; // Skip native EatFood } - // Inventory full - __result = false; - return false; + // Full, and no slot holds this flesh. Native EatFood replaces the most + // depleted meal past half its time, or refuses - vanilla's own rule. This + // used to refuse outright, with no message. + return true; } else { diff --git a/JotunnModStub/Trenta/TrentaFoodPatches.cs b/JotunnModStub/Trenta/TrentaFoodPatches.cs index bc17d19..43bd5c5 100644 --- a/JotunnModStub/Trenta/TrentaFoodPatches.cs +++ b/JotunnModStub/Trenta/TrentaFoodPatches.cs @@ -71,6 +71,12 @@ namespace RacesOfValheim var zanim = Traverse.Create(player).Field("m_zanim").GetValue(); if (zanim != null) zanim.SetTrigger("eat"); } + else + { + // Vanilla's "can't eat more" / "too full" message, from vanilla's own + // check. EatFood itself never says why it refused. + player.CanEat(customDrop.m_itemData, true); + } return false; // Skip native UseItem either way } @@ -172,8 +178,11 @@ namespace RacesOfValheim } } - __result = false; // Full, and nothing in it worth topping up: the seed stays. - return false; + // Full, and no slot holds this seed. Native EatFood takes it from here with + // vanilla's own rule: it replaces the most depleted meal past half its time, + // or refuses. This used to refuse outright, so a Trenta with three meals going + // could not eat a seed at all, and saw no message saying why. + return true; } // Temporarily hide any existing slot with the same name to force native EatFood