using StardewValley;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DebugSandBoxAndReferences.Framework.Commands
{
class TimeCommands
{
///
/// Registers all time modifying commands.
///
///
public static void registerCommands(StardewModdingAPI.IModHelper helper)
{
helper.ConsoleCommands.Add("debug_world_settime", "Sets the in-game time to be any valid int. Allows for setting time to be early in the morning, i.e. 3 A.M", world_settime);
helper.ConsoleCommands.Add("debug_world_modifytimetick", "Sets the time interval in seconds between 10-minute in-game update ticks.", world_modifyTimeTick);
}
///
/// Sets the time of day to the first argument passed into this command. This argument should be an integer value.
///
/// The name of the command.
/// The parameters to pass in. Only the first one is read as that should be the integer valuve for time.
public static void world_settime(string name, string[] args)
{
Game1.timeOfDay = Convert.ToInt32(args[0]);
}
///
/// Sets the time interval in seconds between 10-minute in-game update ticks.
///
///
///
public static void world_modifyTimeTick(string name, string[] args)
{
Game1.gameTimeInterval = Convert.ToInt32(args[0]);
}
}
}