usingSystem;usingSystem.Collections;usingSystem.Collections.Generic;usingSystem.Diagnostics;usingSystem.Diagnostics.CodeAnalysis;usingSystem.Linq;usingSystem.Threading;usingSystem.Threading.Tasks;usingMicrosoft.Xna.Framework;usingMicrosoft.Xna.Framework.Graphics;usingMicrosoft.Xna.Framework.Input;usingStardewModdingAPI.Events;usingStardewModdingAPI.Framework.Reflection;usingStardewModdingAPI.Framework.Utilities;usingStardewModdingAPI.Utilities;usingStardewValley;usingStardewValley.BellsAndWhistles;usingStardewValley.Locations;usingStardewValley.Menus;usingStardewValley.Tools;usingxTile.Dimensions;usingxTile.Layers;#if SMAPI_1_xusingSFarmer=StardewValley.Farmer;#endifnamespaceStardewModdingAPI.Framework{/// <summary>SMAPI's extension of the game's core <see cref="Game1"/>, used to inject events.</summary>internalclassSGame:Game1{/********* ** Properties *********//**** ** SMAPI state ****//// <summary>Encapsulates monitoring and logging.</summary>privatereadonlyIMonitorMonitor;/// <summary>The maximum number of consecutive attempts SMAPI should make to recover from a draw error.</summary>privatereadonlyCountdownDrawCrashTimer=newCountdown(60);// 60 ticks = roughly one second/// <summary>The maximum number of consecutive attempts SMAPI should make to recover from an update error.</summary>privatereadonlyCountdownUpdateCrashTimer=