using System;
using Omegasis.AutoSpeed.Framework;
using StardewModdingAPI;
using StardewModdingAPI.Events;
using StardewValley;
namespace Omegasis.AutoSpeed
{
/// The mod entry point.
public class AutoSpeed : Mod
{
/*********
** Properties
*********/
/// The mod configuration.
private ModConfig Config;
/*********
** Public methods
*********/
/// The mod entry point, called after the mod is first loaded.
/// Provides simplified APIs for writing mods.
public override void Entry(IModHelper helper)
{
GameEvents.UpdateTick += this.GameEvents_UpdateTick;
this.Config = helper.ReadConfig();
}
/*********
** Private methods
*********/
/// The method invoked when the game updates (roughly 60 times per second).
/// The event sender.
/// The event data.
private void GameEvents_UpdateTick(object sender, EventArgs e)
{
if (Context.IsPlayerFree)
Game1.player.addedSpeed = this.Config.Speed;
}
}
}