Exemplo n.º 1
0
        public static void IsRecoveringStamina()
        {
            if (Game1.player.IsSitting())
            {
                if (Context.IsMultiplayer)
                {
                    if (ModEntry.data.SittingVerification)
                    {
                        float secretMultiplier = Secrets.CheckForSecrets();
                        if (ModEntry.data.EnableSecrets)
                        {
                            Status.IncreaseStamina(1f, secretMultiplier);
                        }
                        else
                        {
                            Status.IncreaseStamina(1f, 1);
                        }
                    }
                }
                else
                {
                    if (ModEntry.config.SittingVerification)
                    {
                        float secretMultiplier = Secrets.CheckForSecrets();
                        if (ModEntry.config.EnableSecrets)
                        {
                            Status.IncreaseStamina(1f, secretMultiplier);
                        }
                        else
                        {
                            Status.IncreaseStamina(1f, 1);
                        }
                    }
                }
            }

            if (Game1.player.isRidingHorse())
            {
                if (Context.IsMultiplayer)
                {
                    if (ModEntry.data.RidingVerification)
                    {
                        Status.IncreaseStamina(0.25f, 1);
                    }
                }
                else
                {
                    if (ModEntry.config.RidingVerification)
                    {
                        Status.IncreaseStamina(0.25f, 1);
                    }
                }
            }

            if (!Game1.player.isMoving() &&
                !Game1.player.IsSitting() &&
                !Game1.player.isRidingHorse() &&
                !Game1.player.UsingTool)
            {
                if (Context.IsMultiplayer)
                {
                    if (ModEntry.data.StandingVerification)
                    {
                        if (movingTimer > 0)
                        {
                            movingTimer--;
                        }
                        else
                        {
                            Status.IncreaseStamina(0.25f, 1);
                        }
                    }
                }
                else
                {
                    if (ModEntry.config.StandingVerification)
                    {
                        if (movingTimer > 0)
                        {
                            movingTimer--;
                        }
                        else
                        {
                            Status.IncreaseStamina(0.25f, 1);
                        }
                    }
                }
            }
            else
            {
                IsStaying();
            }

            if (Game1.player.isMoving() || Game1.player.usingTool)
            {
                Status.canUpdateQuantity = true;
            }
        }