fix: race buildings keep their own message when an item is used on them
Humanoid.UseItem shows the generic $msg_cantuseon whenever the interactable's UseItem returns false, covering the refusal message the building had just shown. Same fix as the Trol totem in v1.4.18, applied to the Servant table, Dvergar barrel and bank, Fenrir trough, Draugr and Skeleton piles, Blood Refinery, Grove and Composter: an item in hand always counts as handled. Empty-handed interactions are unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
c7cbd6bece
commit
5f74c57e72
10 changed files with 55 additions and 9 deletions
|
|
@ -68,7 +68,14 @@ namespace RacesOfValheim
|
|||
/// Empty hands were free to use for this because the pile's own hover already carries the
|
||||
/// status the Draugh needs an empty-handed click to report.
|
||||
/// </summary>
|
||||
// With an item in hand every outcome counts as handled, refusals included: false makes
|
||||
// Humanoid.UseItem cover our own message with the generic "$msg_cantuseon".
|
||||
private bool OnUse(Switch caller, Humanoid user, ItemDrop.ItemData item)
|
||||
{
|
||||
return Use(user, item) || item != null;
|
||||
}
|
||||
|
||||
private bool Use(Humanoid user, ItemDrop.ItemData item)
|
||||
{
|
||||
Player player = user as Player;
|
||||
if (player == null) return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue