-
-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
138 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"Name": "Console Commands", | ||
"Author": "SMAPI", | ||
"Version": "4.1.6", | ||
"Version": "4.1.7", | ||
"Description": "Adds SMAPI console commands that let you manipulate the game.", | ||
"UniqueID": "SMAPI.ConsoleCommands", | ||
"EntryDll": "ConsoleCommands.dll", | ||
"MinimumApiVersion": "4.1.6" | ||
"MinimumApiVersion": "4.1.7" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"Name": "Save Backup", | ||
"Author": "SMAPI", | ||
"Version": "4.1.6", | ||
"Version": "4.1.7", | ||
"Description": "Automatically backs up all your saves once per day into its folder.", | ||
"UniqueID": "SMAPI.SaveBackup", | ||
"EntryDll": "SaveBackup.dll", | ||
"MinimumApiVersion": "4.1.6" | ||
"MinimumApiVersion": "4.1.7" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/SMAPI/Framework/ModLoading/Rewriters/StardewValley_1_6/ItemQueryContextFacade.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using StardewModdingAPI.Framework.ModLoading.Framework; | ||
using StardewValley; | ||
using StardewValley.Internal; | ||
|
||
namespace StardewModdingAPI.Framework.ModLoading.Rewriters.StardewValley_1_6; | ||
|
||
/// <summary>Maps Stardew Valley 1.6's <see cref="ItemQueryContext"/> methods to their newer form in 1.6.14 to avoid breaking older mods.</summary> | ||
/// <remarks>This is public to support SMAPI rewriting and should never be referenced directly by mods. See remarks on <see cref="ReplaceReferencesRewriter"/> for more info.</remarks> | ||
public class ItemQueryContextFacade : ItemQueryContext, IRewriteFacade | ||
{ | ||
/********* | ||
** Public methods | ||
*********/ | ||
public static ItemQueryContext Constructor(ItemQueryContext parentContext) | ||
{ | ||
return new ItemQueryContext(parentContext, null); | ||
} | ||
|
||
public static ItemQueryContext Constructor(GameLocation location, Farmer player, Random random) | ||
{ | ||
return new ItemQueryContext(location, player, random, null); | ||
} | ||
|
||
|
||
/********* | ||
** Private methods | ||
*********/ | ||
private ItemQueryContextFacade() | ||
{ | ||
RewriteHelper.ThrowFakeConstructorCalled(); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
src/SMAPI/Framework/ModLoading/Rewriters/StardewValley_1_6/WorldMapManagerFacade.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using Microsoft.Xna.Framework; | ||
using StardewModdingAPI.Framework.ModLoading.Framework; | ||
using StardewValley; | ||
using StardewValley.Internal; | ||
using StardewValley.WorldMaps; | ||
|
||
namespace StardewModdingAPI.Framework.ModLoading.Rewriters.StardewValley_1_6; | ||
|
||
/// <summary>Maps Stardew Valley 1.'s <see cref="WorldMapManager"/> methods to their newer form in 1.6.14 to avoid breaking older mods.</summary> | ||
/// <remarks>This is public to support SMAPI rewriting and should never be referenced directly by mods. See remarks on <see cref="ReplaceReferencesRewriter"/> for more info.</remarks> | ||
public class WorldMapManagerFacade : IRewriteFacade | ||
{ | ||
/********* | ||
** Public methods | ||
*********/ | ||
/// <summary>Get the map position which contains a given location and tile coordinate, if any.</summary> | ||
/// <param name="location">The in-game location.</param> | ||
/// <param name="tile">The tile coordinate within the location.</param> | ||
public static MapAreaPosition? GetPositionData(GameLocation location, Point tile) | ||
{ | ||
return WorldMapManager.GetPositionData(location, tile, null)?.Data; | ||
} | ||
|
||
/// <summary>Get the map position which contains a given location and tile coordinate, if any.</summary> | ||
/// <param name="location">The in-game location.</param> | ||
/// <param name="tile">The tile coordinate within the location.</param> | ||
/// <param name="log">The detailed log to update with the steps used to match the position, if set.</param> | ||
internal static MapAreaPosition? GetPositionData(GameLocation location, Point tile, LogBuilder log) | ||
{ | ||
return WorldMapManager.GetPositionData(location, tile, log)?.Data; | ||
} | ||
|
||
|
||
/********* | ||
** Private methods | ||
*********/ | ||
private WorldMapManagerFacade() | ||
{ | ||
RewriteHelper.ThrowFakeConstructorCalled(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters