Advertisement
Guest User

NeverLoseStamina

a guest
Jun 7th, 2019
678
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1. using System;
  2. using Microsoft.Xna.Framework;
  3. using StardewModdingAPI;
  4. using StardewModdingAPI.Events;
  5. using StardewModdingAPI.Utilities;
  6. using StardewValley;
  7.  
  8. namespace NeverLoseStamina
  9. {
  10.     public class ModEntry : Mod
  11.     {
  12.  
  13.         public override void Entry(IModHelper helper)
  14.         {
  15.            helper.Events.GameLoop.UpdateTicked  += this.GE_UT;
  16.         }
  17.  
  18.         private void GE_UT(object sender, EventArgs e)
  19.         {
  20.             if (!Context.IsWorldReady)
  21.             {
  22.                 return;
  23.             }
  24.  
  25.             if (Game1.player.stamina < Game1.player.maxStamina) {
  26.                 Game1.player.stamina = Game1.player.maxStamina;
  27.             }
  28.  
  29.         }
  30.  
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement