|
30 | 30 | using StardewModdingAPI.Framework.ModLoading; |
31 | 31 | using StardewModdingAPI.Framework.Networking; |
32 | 32 | using StardewModdingAPI.Framework.Reflection; |
33 | | -using StardewModdingAPI.Framework.Rendering; |
34 | 33 | using StardewModdingAPI.Framework.Serialization; |
35 | 34 | using StardewModdingAPI.Framework.StateTracking.Snapshots; |
36 | 35 | using StardewModdingAPI.Framework.Utilities; |
|
47 | 46 | using StardewValley.Mods; |
48 | 47 | using StardewValley.Objects; |
49 | 48 | using StardewValley.SDKs; |
50 | | -using xTile.Display; |
51 | 49 | using LanguageCode = StardewValley.LocalizedContentManager.LanguageCode; |
52 | 50 | using MiniMonoModHotfix = MonoMod.Utils.MiniMonoModHotfix; |
53 | 51 | using PathUtilities = StardewModdingAPI.Toolkit.Utilities.PathUtilities; |
@@ -132,9 +130,6 @@ internal class SCore : IDisposable |
132 | 130 | /// <summary>Whether the game has initialized for any custom languages from <c>Data/AdditionalLanguages</c>.</summary> |
133 | 131 | private bool AreCustomLanguagesInitialized; |
134 | 132 |
|
135 | | - /// <summary>Whether the player just returned to the title screen.</summary> |
136 | | - public bool JustReturnedToTitle { get; set; } |
137 | | - |
138 | 133 | /// <summary>The last language set by the game.</summary> |
139 | 134 | private (string Locale, LanguageCode Code) LastLanguage { get; set; } = ("", LanguageCode.en); |
140 | 135 |
|
@@ -492,9 +487,6 @@ private void OnGameInitialized() |
492 | 487 | /// <summary>Raised after an instance finishes loading its initial content.</summary> |
493 | 488 | private void OnInstanceContentLoaded() |
494 | 489 | { |
495 | | - // override map display device |
496 | | - Game1.mapDisplayDevice = new SDisplayDevice(Game1.content, Game1.game1.GraphicsDevice); |
497 | | - |
498 | 490 | // log GPU info |
499 | 491 | #if SMAPI_FOR_WINDOWS |
500 | 492 | this.Monitor.Log($"Running on GPU: {Game1.game1.GraphicsDevice?.Adapter?.Description ?? "<unknown>"}"); |
@@ -611,17 +603,6 @@ private void OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action |
611 | 603 |
|
612 | 604 | try |
613 | 605 | { |
614 | | - /********* |
615 | | - ** Reapply overrides |
616 | | - *********/ |
617 | | - if (this.JustReturnedToTitle) |
618 | | - { |
619 | | - if (Game1.mapDisplayDevice is not SDisplayDevice) |
620 | | - Game1.mapDisplayDevice = this.GetMapDisplayDevice(); |
621 | | - |
622 | | - this.JustReturnedToTitle = false; |
623 | | - } |
624 | | - |
625 | 606 | /********* |
626 | 607 | ** Execute commands |
627 | 608 | *********/ |
@@ -1179,7 +1160,6 @@ internal void OnLoadStageChanged(LoadStage newStage) |
1179 | 1160 | break; |
1180 | 1161 |
|
1181 | 1162 | case LoadStage.None: |
1182 | | - this.JustReturnedToTitle = true; |
1183 | 1163 | this.UpdateWindowTitles(); |
1184 | 1164 | break; |
1185 | 1165 |
|
@@ -2369,13 +2349,6 @@ private IFileLookup GetFileLookup(string rootDirectory) |
2369 | 2349 | : MinimalFileLookup.GetCachedFor(rootDirectory); |
2370 | 2350 | } |
2371 | 2351 |
|
2372 | | - /// <summary>Get the map display device which applies SMAPI features like tile rotation to loaded maps.</summary> |
2373 | | - /// <remarks>This is separate to let mods like PyTK wrap it with their own functionality.</remarks> |
2374 | | - private IDisplayDevice GetMapDisplayDevice() |
2375 | | - { |
2376 | | - return new SDisplayDevice(Game1.content, Game1.game1.GraphicsDevice); |
2377 | | - } |
2378 | | - |
2379 | 2352 | /// <summary>Get the absolute path to the next available log file.</summary> |
2380 | 2353 | private string GetLogPath() |
2381 | 2354 | { |
|
0 commit comments