diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-04-24 13:30:49 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-04-24 13:30:49 -0400 |
commit | 22806ab900721a61b142937bc58dd33727d377f9 (patch) | |
tree | bc5062865b0d5d384b6fb13326c1b32313a0038a /src/StardewModdingAPI/Constants.cs | |
parent | dbb9bd84306830456032778fc11fb9a34dd140c7 (diff) | |
parent | fee89a99da3295c6bb35d6543a112db8924057de (diff) | |
download | SMAPI-22806ab900721a61b142937bc58dd33727d377f9.tar.gz SMAPI-22806ab900721a61b142937bc58dd33727d377f9.tar.bz2 SMAPI-22806ab900721a61b142937bc58dd33727d377f9.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/StardewModdingAPI/Constants.cs')
-rw-r--r-- | src/StardewModdingAPI/Constants.cs | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/StardewModdingAPI/Constants.cs b/src/StardewModdingAPI/Constants.cs index 4a036cd0..6ba16935 100644 --- a/src/StardewModdingAPI/Constants.cs +++ b/src/StardewModdingAPI/Constants.cs @@ -33,13 +33,13 @@ namespace StardewModdingAPI ** Public ****/ /// <summary>SMAPI's current semantic version.</summary> - public static ISemanticVersion ApiVersion { get; } = new SemanticVersion(1, 9, 0); + public static ISemanticVersion ApiVersion { get; } = new SemanticVersion(1, 10, 0); /// <summary>The minimum supported version of Stardew Valley.</summary> - public static ISemanticVersion MinimumGameVersion { get; } = new SemanticVersion("1.1"); + public static ISemanticVersion MinimumGameVersion { get; } = new SemanticVersion("1.2.15"); /// <summary>The maximum supported version of Stardew Valley.</summary> - public static ISemanticVersion MaximumGameVersion { get; } = new SemanticVersion("1.1.1"); + public static ISemanticVersion MaximumGameVersion { get; } = null; /// <summary>The path to the game folder.</summary> public static string ExecutionPath { get; } = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); @@ -54,7 +54,7 @@ namespace StardewModdingAPI public static string SavesPath { get; } = Path.Combine(Constants.DataPath, "Saves"); /// <summary>The directory name containing the current save's data (if a save is loaded and the directory exists).</summary> - public static string SaveFolderName => Constants.SavePathReady ? Constants.GetSaveFolderName() : ""; + public static string SaveFolderName => Constants.IsSaveLoaded ? Constants.GetSaveFolderName() : ""; /// <summary>The directory path containing the current save's data (if a save is loaded and the directory exists).</summary> public static string CurrentSavePath => Constants.SavePathReady ? Path.Combine(Constants.SavesPath, Constants.GetSaveFolderName()) : ""; @@ -146,6 +146,9 @@ namespace StardewModdingAPI /**** ** Finders throw an exception when incompatible code is found. ****/ + // changes in Stardew Valley 1.2 (with no rewriters) + new FieldFinder("StardewValley.Item", "set_Name"), + // APIs removed in SMAPI 1.9 new TypeFinder("StardewModdingAPI.Advanced.ConfigFile"), new TypeFinder("StardewModdingAPI.Advanced.IConfigFile"), @@ -169,6 +172,14 @@ namespace StardewModdingAPI // crossplatform new MethodParentRewriter(typeof(SpriteBatch), typeof(SpriteBatchWrapper), onlyIfPlatformChanged: true), + // Stardew Valley 1.2 + new FieldToPropertyRewriter(typeof(Game1), nameof(Game1.activeClickableMenu)), + new FieldToPropertyRewriter(typeof(Game1), nameof(Game1.currentMinigame)), + new FieldToPropertyRewriter(typeof(Game1), nameof(Game1.gameMode)), + new FieldToPropertyRewriter(typeof(Game1), nameof(Game1.player)), + new FieldReplaceRewriter(typeof(Game1), "borderFont", nameof(Game1.smallFont)), + new FieldReplaceRewriter(typeof(Game1), "smoothFont", nameof(Game1.smallFont)), + // SMAPI 1.9 new TypeReferenceRewriter("StardewModdingAPI.Inheritance.ItemStackChange", typeof(ItemStackChange)) }; |