update for Stardew Valley 1.9 (#231)
This commit is contained in:
parent
b30d93d0ff
commit
96c7010c1b
|
@ -33,7 +33,7 @@ namespace StardewModdingAPI
|
|||
public static ISemanticVersion ApiVersion => new SemanticVersion(1, 8, 0, null);
|
||||
|
||||
/// <summary>The minimum supported version of Stardew Valley.</summary>
|
||||
public const string MinimumGameVersion = "1.2";
|
||||
public const string MinimumGameVersion = "1.2.9";
|
||||
|
||||
/// <summary>The directory path containing Stardew Valley's app data.</summary>
|
||||
public static string DataPath => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley");
|
||||
|
|
|
@ -923,7 +923,7 @@ namespace StardewModdingAPI.Framework
|
|||
{
|
||||
SpriteBatch spriteBatch = Game1.spriteBatch;
|
||||
SpriteFont smallFont = Game1.smallFont;
|
||||
object[] objArray = new object[8];
|
||||
object[] objArray = new object[10];
|
||||
int index1 = 0;
|
||||
string str1;
|
||||
if (!Game1.panMode)
|
||||
|
@ -938,20 +938,26 @@ namespace StardewModdingAPI.Framework
|
|||
float cursorTransparency = Game1.mouseCursorTransparency;
|
||||
objArray[index3] = (object)cursorTransparency;
|
||||
int index4 = 3;
|
||||
string str3 = " wasMouseVisibleThisFrame: ";
|
||||
string str3 = " mousePosition: ";
|
||||
objArray[index4] = (object)str3;
|
||||
int index5 = 4;
|
||||
string str4 = Game1.wasMouseVisibleThisFrame.ToString();
|
||||
objArray[index5] = (object)str4;
|
||||
int mouseX = Game1.getMouseX();
|
||||
objArray[index5] = (object)mouseX;
|
||||
int index6 = 5;
|
||||
string newLine = Environment.NewLine;
|
||||
objArray[index6] = (object)newLine;
|
||||
string str4 = ",";
|
||||
objArray[index6] = (object)str4;
|
||||
int index7 = 6;
|
||||
string str5 = "debugOutput: ";
|
||||
objArray[index7] = (object)str5;
|
||||
int mouseY = Game1.getMouseY();
|
||||
objArray[index7] = (object)mouseY;
|
||||
int index8 = 7;
|
||||
string newLine = Environment.NewLine;
|
||||
objArray[index8] = (object)newLine;
|
||||
int index9 = 8;
|
||||
string str5 = "debugOutput: ";
|
||||
objArray[index9] = (object)str5;
|
||||
int index10 = 9;
|
||||
string debugOutput = Game1.debugOutput;
|
||||
objArray[index8] = (object)debugOutput;
|
||||
objArray[index10] = (object)debugOutput;
|
||||
string text = string.Concat(objArray);
|
||||
Vector2 position = new Vector2((float)this.GraphicsDevice.Viewport.TitleSafeArea.X, (float)this.GraphicsDevice.Viewport.TitleSafeArea.Y);
|
||||
Color red = Color.Red;
|
||||
|
|
|
@ -97,6 +97,7 @@ namespace StardewModdingAPI
|
|||
// initialise logging
|
||||
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB"); // for consistent log formatting
|
||||
this.Monitor.Log($"SMAPI {Constants.ApiVersion} with Stardew Valley {Game1.version} on {Environment.OSVersion}", LogLevel.Info);
|
||||
Console.Title = $"SMAPI {Constants.ApiVersion} - running Stardew Valley {Game1.version}";
|
||||
|
||||
// read settings
|
||||
{
|
||||
|
@ -252,11 +253,10 @@ namespace StardewModdingAPI
|
|||
this.GameInstance = new SGame(this.Monitor);
|
||||
this.GameInstance.Exiting += (sender, e) => this.IsGameRunning = false;
|
||||
this.GameInstance.Window.ClientSizeChanged += (sender, e) => GraphicsEvents.InvokeResize(this.Monitor, sender, e);
|
||||
this.GameInstance.Window.Title = $"Stardew Valley - Version {Game1.version}";
|
||||
this.GameInstance.Window.Title = $"Stardew Valley {Game1.version}";
|
||||
gameProgramType.GetField("gamePtr").SetValue(gameProgramType, this.GameInstance);
|
||||
|
||||
// configure
|
||||
Game1.version += $" | SMAPI {Constants.ApiVersion}";
|
||||
Game1.graphics.GraphicsProfile = GraphicsProfile.HiDef;
|
||||
}
|
||||
|
||||
|
@ -565,7 +565,7 @@ namespace StardewModdingAPI
|
|||
|
||||
// print result
|
||||
this.Monitor.Log($"Loaded {modsLoaded} mods.");
|
||||
Console.Title = $"Stardew Modding API Console - Version {Constants.ApiVersion} - Mods Loaded: {modsLoaded}";
|
||||
Console.Title = $"SMAPI {Constants.ApiVersion} - running Stardew Valley {Game1.version} with {modsLoaded} mods";
|
||||
}
|
||||
|
||||
// ReSharper disable once FunctionNeverReturns
|
||||
|
|
|
@ -65,6 +65,13 @@ This file contains advanced metadata for SMAPI. You shouldn't change this file.
|
|||
"UpdateUrl": "http://www.nexusmods.com/stardewvalley/mods/518",
|
||||
"Notes": "Crashes with 'Method not found: Void StardewValley.Menus.TextBox.set_Highlighted(Boolean)'."
|
||||
},
|
||||
{
|
||||
"Name": "Chests Anywhere",
|
||||
"ID": "Pathoschild.ChestsAnywhere",
|
||||
"UpperVersion": "1.9-beta",
|
||||
"UpdateUrl": "http://www.nexusmods.com/stardewvalley/mods/518",
|
||||
"Notes": "ID changed in 1.9. Crashes with InvalidOperationException: 'The menu doesn't seem to have a player inventory'."
|
||||
},
|
||||
{
|
||||
"Name": "CJB Automation",
|
||||
"ID": "CJBAutomation",
|
||||
|
@ -184,6 +191,13 @@ This file contains advanced metadata for SMAPI. You shouldn't change this file.
|
|||
"UpdateUrl": "http://www.nexusmods.com/stardewvalley/mods/683",
|
||||
"Notes": "Crashes with 'Method not found: Void StardewModdingAPI.Command.CallCommand(System.String)'."
|
||||
},
|
||||
{
|
||||
"Name": "Teleporter",
|
||||
"ID": "Teleporter",
|
||||
"UpperVersion": "1.0.2",
|
||||
"UpdateUrl": "http://community.playstarbound.com/resources/4374",
|
||||
"Notes": "Crashes with 'InvalidOperationException: The StardewValley.Menus.MapPage object doesn't have a private 'points' instance field'."
|
||||
},
|
||||
{
|
||||
"Name": "Zoryn's Better RNG",
|
||||
"ID": "76b6d1e1-f7ba-4d72-8c32-5a1e6d2716f6",
|
||||
|
|
Loading…
Reference in New Issue