usingSystem;usingSystem.Collections;usingSystem.Collections.Generic;usingSystem.Diagnostics;usingSystem.Diagnostics.CodeAnalysis;usingSystem.Linq;usingSystem.Threading.Tasks;usingMicrosoft.Xna.Framework;usingMicrosoft.Xna.Framework.Graphics;usingMicrosoft.Xna.Framework.Input;usingStardewModdingAPI.Events;usingStardewModdingAPI.Framework.Reflection;usingStardewValley;usingStardewValley.BellsAndWhistles;usingStardewValley.Locations;usingStardewValley.Menus;usingStardewValley.Tools;usingxTile.Dimensions;usingxTile.Layers;usingSFarmer=StardewValley.Farmer;namespaceStardewModdingAPI.Framework{/// <summary>SMAPI's extension of the game's core <see cref="Game1"/>, used to inject events.</summary>internalclassSGame:Game1{/********* ** Properties *********//**** ** SMAPI state ****//// <summary>The number of ticks until SMAPI should notify mods when <see cref="Game1.hasLoadedGame"/> is set.</summary>/// <remarks>Skipping a few frames ensures the game finishes initialising the world before mods try to change it.</remarks>privateintAfterLoadTimer=5;/// <summary>Whether the player has loaded a save and the world has finished initialising.</summary>privateboolIsWorldReady=>this.AfterLoadTimer<0;/// <summary>Whether the game is returning to the menu.</summary>privateboolIsExiting=false;/// <summary>The debug messages to add to the next debug output.</summary>internalstaticQueue<string>DebugMessageQueue{get;privateset;}/// <summary>Whether the game's zoom level is at 100% (i.e. nothing should be scaled).</summary>publicboolZoomLevelIsOne=>Game1.options.zoomLevel.Equals(1.0f);/// <summary>Encapsulates monitoring and logging.</summary>privatereadonlyIMonitorMonitor;/**** ** Private wrappers ****/// ReSharper disable ArrangeStaticMemberQualifier, ArrangeThisQualifier, InconsistentNaming/// <summary>Used to access private fields and methods.</summary>privatestaticreadonlyIReflectionHelperReflection=