From 93f00b115e1d8bbd5745c0d1b4416f91550f2d2b Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 20 Dec 2020 22:35:02 -0500 Subject: add mod rewriters for SDV 1.5 --- src/SMAPI/Metadata/InstructionMetadata.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/SMAPI/Metadata/InstructionMetadata.cs') diff --git a/src/SMAPI/Metadata/InstructionMetadata.cs b/src/SMAPI/Metadata/InstructionMetadata.cs index 09a199f9..2c1e14ce 100644 --- a/src/SMAPI/Metadata/InstructionMetadata.cs +++ b/src/SMAPI/Metadata/InstructionMetadata.cs @@ -6,6 +6,7 @@ using StardewModdingAPI.Framework.ModLoading.Finders; using StardewModdingAPI.Framework.ModLoading.RewriteFacades; using StardewModdingAPI.Framework.ModLoading.Rewriters; using StardewValley; +using StardewValley.Locations; namespace StardewModdingAPI.Metadata { @@ -35,6 +36,11 @@ namespace StardewModdingAPI.Metadata if (platformChanged) yield return new MethodParentRewriter(typeof(SpriteBatch), typeof(SpriteBatchFacade)); + // rewrite for Stardew Valley 1.5 + yield return new FieldReplaceRewriter(typeof(DecoratableLocation), "furniture", typeof(GameLocation), nameof(GameLocation.furniture)); + yield return new FieldReplaceRewriter(typeof(Farm), "resourceClumps", typeof(GameLocation), nameof(GameLocation.resourceClumps)); + yield return new FieldReplaceRewriter(typeof(MineShaft), "resourceClumps", typeof(GameLocation), nameof(GameLocation.resourceClumps)); + // heuristic rewrites yield return new HeuristicFieldRewriter(this.ValidateReferencesToAssemblies); yield return new HeuristicMethodRewriter(this.ValidateReferencesToAssemblies); -- cgit