summaryrefslogtreecommitdiff
path: root/src/SMAPI/Metadata
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Metadata')
-rw-r--r--src/SMAPI/Metadata/CoreAssetPropagator.cs13
-rw-r--r--src/SMAPI/Metadata/InstructionMetadata.cs10
2 files changed, 6 insertions, 17 deletions
diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs
index 7efd99a0..552bc000 100644
--- a/src/SMAPI/Metadata/CoreAssetPropagator.cs
+++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs
@@ -226,13 +226,8 @@ namespace StardewModdingAPI.Metadata
** Buildings
****/
case "buildings\\houses": // Farm
- {
- var field = reflection.GetField<Texture2D>(typeof(Farm), nameof(Farm.houseTextures));
- field.SetValue(
- this.LoadAndDisposeIfNeeded(field.GetValue(), key)
- );
- return true;
- }
+ Farm.houseTextures = this.LoadAndDisposeIfNeeded(Farm.houseTextures, key);
+ return true;
case "buildings\\houses_paintmask": // Farm
{
@@ -447,10 +442,6 @@ namespace StardewModdingAPI.Metadata
Game1.objectSpriteSheet = content.Load<Texture2D>(key);
return true;
- case "maps\\walls_and_floors": // Wallpaper
- Wallpaper.wallpaperTexture = content.Load<Texture2D>(key);
- return true;
-
/****
** Content\Minigames
****/
diff --git a/src/SMAPI/Metadata/InstructionMetadata.cs b/src/SMAPI/Metadata/InstructionMetadata.cs
index 76371e50..232e54ce 100644
--- a/src/SMAPI/Metadata/InstructionMetadata.cs
+++ b/src/SMAPI/Metadata/InstructionMetadata.cs
@@ -36,9 +36,6 @@ namespace StardewModdingAPI.Metadata
// rewrite for crossplatform compatibility
if (rewriteMods)
{
- 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));
@@ -48,9 +45,10 @@ namespace StardewModdingAPI.Metadata
yield return new HeuristicFieldRewriter(this.ValidateReferencesToAssemblies);
yield return new HeuristicMethodRewriter(this.ValidateReferencesToAssemblies);
- // rewrite for 64-bit mode
- // re-enable in Stardew Valley 1.5.5
- //yield return new ArchitectureAssemblyRewriter();
+ // rewrite for Stardew Valley 1.5.5
+ if (platformChanged)
+ yield return new MethodParentRewriter(typeof(SpriteBatch), typeof(SpriteBatchFacade));
+ yield return new ArchitectureAssemblyRewriter();
// detect Harmony & rewrite for SMAPI 3.12 (Harmony 1.x => 2.0 update)
yield return new HarmonyRewriter();