Exemplo n.º 1
0
        public static void ApplyRecipeModifications()
        {
            var mymod = StarvationMod.Instance;

            if (mymod.Config.CustomPumpkinPieRecipe)
            {
                StarvationItem.ApplyPumpkinPieRecipeModification();
            }
        }
Exemplo n.º 2
0
        ////

        public override void PostDrawInInventory(Item item, SpriteBatch sb, Vector2 pos, Rectangle _1, Color _2, Color _3, Vector2 _4,
                                                 float scale)
        {
            if (!this.NeedsSaving(item))
            {
                return;
            }
            if (item.type < 0 || item.type >= Main.itemTexture.Length)
            {
                return;
            }

            float freshnessPercent;

            if (!this.ComputeTimeLeftPercent(item, out freshnessPercent))
            {
                return;
            }

            StarvationItem.DrawFreshnessGaugeInventory(sb, Main.itemTexture[item.type], pos, freshnessPercent, scale);
        }
Exemplo n.º 3
0
        ////////////////

        public override bool PreDrawInWorld(Item item, SpriteBatch sb, Color lightColor, Color _1, ref float _2, ref float scale,
                                            int whoAmI)
        {
            if (!this.NeedsSaving(item))
            {
                return(true);
            }

            float freshnessPercent;

            if (!this.ComputeTimeLeftPercent(item, out freshnessPercent))
            {
                return(true);
            }

            if (freshnessPercent <= 0f)
            {
                StarvationItem.DrawSpoilageWorld(sb, item.Center, lightColor, scale);
                return(false);
            }

            return(true);
        }
Exemplo n.º 4
0
        public override bool PreDrawInInventory(Item item, SpriteBatch sb, Vector2 pos, Rectangle frame, Color drawColor, Color itemColor,
                                                Vector2 origin, float scale)
        {
            if (!this.NeedsSaving(item))
            {
                return(true);
            }

            float freshnessPercent;

            if (!this.ComputeTimeLeftPercent(item, out freshnessPercent))
            {
                return(true);
            }

            if (freshnessPercent <= 0f)
            {
                StarvationItem.DrawSpoilageInventory(sb, Main.itemTexture[item.type], pos, drawColor, scale);
                return(false);
            }

            return(true);
        }
Exemplo n.º 5
0
 public override bool NeedsSaving(Item item)
 {
     return(StarvationItem.CanSpoil(item));
 }
Exemplo n.º 6
0
 public override void PostAddRecipes()
 {
     StarvationItem.ApplyRecipeModifications();
 }
Exemplo n.º 7
0
        ////

        public override void AddRecipes()
        {
            StarvationItem.AddNewRecipes();
        }