Ejemplo n.º 1
0
 public override void Entry(IModHelper helper)
 {
     VersionChecker.AddCheck("FasterPaths", Version, "https://raw.githubusercontent.com/Entoarox/Stardew-SMAPI-mods/master/Projects/VersionChecker/FasterPaths.json");
     cfg = Helper.ReadConfig <ConfigFP>();
     GameEvents.UpdateTick += UpdateTick;
     helper.ConsoleCommands.Add("fp_info", "Gives info about the path you are currently standing on", this.CommandInfo);
     Modifiers = new FarmerModifier[10] {
         new FarmerModifier()
         {
             WalkSpeedModifier = cfg.woodFloorBoost, RunSpeedModifier = cfg.woodFloorBoost
         },
         new FarmerModifier()
         {
             WalkSpeedModifier = cfg.stoneFloorBoost, RunSpeedModifier = cfg.stoneFloorBoost
         },
         new FarmerModifier()
         {
             WalkSpeedModifier = cfg.weatheredFloorBoost, RunSpeedModifier = cfg.weatheredFloorBoost
         },
         new FarmerModifier()
         {
             WalkSpeedModifier = cfg.crystalFloorBoost, RunSpeedModifier = cfg.crystalFloorBoost
         },
         new FarmerModifier()
         {
             WalkSpeedModifier = cfg.strawFloorBoost, RunSpeedModifier = cfg.strawFloorBoost
         },
         new FarmerModifier()
         {
             WalkSpeedModifier = cfg.gravelPathBoost, RunSpeedModifier = cfg.gravelPathBoost
         },
         new FarmerModifier()
         {
             WalkSpeedModifier = cfg.woodPathBoost, RunSpeedModifier = cfg.woodPathBoost
         },
         new FarmerModifier()
         {
             WalkSpeedModifier = cfg.crystalPathBoost, RunSpeedModifier = cfg.crystalPathBoost
         },
         new FarmerModifier()
         {
             WalkSpeedModifier = cfg.cobblePathBoost, RunSpeedModifier = cfg.cobblePathBoost
         },
         new FarmerModifier()
         {
             WalkSpeedModifier = cfg.steppingStoneBoost, RunSpeedModifier = cfg.steppingStoneBoost
         }
     };
     PlayerHelper = EntoFramework.GetPlayerHelper();
     PlayerHelper.AddModifier(new FarmerModifier()
     {
         WalkSpeedModifier = cfg.walkSpeedBoost, RunSpeedModifier = cfg.runSpeedBoost
     });
 }
Ejemplo n.º 2
0
 public override void Entry(IModHelper helper)
 {
     this.Helper.RequestUpdateCheck("https://raw.githubusercontent.com/Entoarox/StardewMods/master/FasterPaths/update.json");
     this.cfg = this.Helper.ReadConfig <ConfigFP>();
     GameEvents.UpdateTick += this.UpdateTick;
     helper.ConsoleCommands.Add("fp_info", "Gives info about the path you are currently standing on", this.CommandInfo);
     this.Modifiers = new PlayerModifier[10] {
         new PlayerModifier()
         {
             WalkSpeedModifier = this.cfg.woodFloorBoost, RunSpeedModifier = this.cfg.woodFloorBoost
         },
         new PlayerModifier()
         {
             WalkSpeedModifier = this.cfg.stoneFloorBoost, RunSpeedModifier = this.cfg.stoneFloorBoost
         },
         new PlayerModifier()
         {
             WalkSpeedModifier = this.cfg.weatheredFloorBoost, RunSpeedModifier = this.cfg.weatheredFloorBoost
         },
         new PlayerModifier()
         {
             WalkSpeedModifier = this.cfg.crystalFloorBoost, RunSpeedModifier = this.cfg.crystalFloorBoost
         },
         new PlayerModifier()
         {
             WalkSpeedModifier = this.cfg.strawFloorBoost, RunSpeedModifier = this.cfg.strawFloorBoost
         },
         new PlayerModifier()
         {
             WalkSpeedModifier = this.cfg.gravelPathBoost, RunSpeedModifier = this.cfg.gravelPathBoost
         },
         new PlayerModifier()
         {
             WalkSpeedModifier = this.cfg.woodPathBoost, RunSpeedModifier = this.cfg.woodPathBoost
         },
         new PlayerModifier()
         {
             WalkSpeedModifier = this.cfg.crystalPathBoost, RunSpeedModifier = this.cfg.crystalPathBoost
         },
         new PlayerModifier()
         {
             WalkSpeedModifier = this.cfg.cobblePathBoost, RunSpeedModifier = this.cfg.cobblePathBoost
         },
         new PlayerModifier()
         {
             WalkSpeedModifier = this.cfg.steppingStoneBoost, RunSpeedModifier = this.cfg.steppingStoneBoost
         }
     };
     this.Helper.Player().Modifiers.Add(new PlayerModifier()
     {
         WalkSpeedModifier = this.cfg.walkSpeedBoost, RunSpeedModifier = this.cfg.runSpeedBoost
     });
 }