public bool CombineFilter(InvItem other) { if (other.itemType != ItemTypes.Food || other.healthChange is 0 || !other.Categories.Contains(RogueCategories.Food)) { return(false); } SpicedHook hook = other.GetHook <SpicedHook>(); return(hook is null || hook.Spiciness < 3); }
public bool CombineItems(InvItem other) { if (!CombineFilter(other)) { return(false); } SpicedHook hook = other.GetHook <SpicedHook>() ?? other.AddHook <SpicedHook>(); hook.IncreaseSpiciness(); Count--; gc.audioHandler.Play(Owner, VanillaAudio.CombineItem); return(true); }