fix(food): race foods replace a worn-down meal when the stomach is full
Trenta seeds, Draugh raw flesh and Aswid meals each go through an EatFood prefix that, with three slots full and none holding the same food, answered false. Vanilla would replace the most depleted meal past half its time. The UseItem callers also never showed why: EatFood says nothing on a refusal, so the click did nothing at all. That is the Reddit report of a Trenta who could not eat any seeds. The prefixes now hand that case to native EatFood, the Aswid's CanConsumeItem postfix keeps vanilla's answer instead of forcing false, and the Trenta and Draugh callers ask CanEat(item, true) for vanilla's own message when a meal is refused.
This commit is contained in:
parent
557664c41f
commit
eba537fa07
3 changed files with 28 additions and 16 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue