コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }