summaryrefslogtreecommitdiff
path: root/src/SMAPI/Metadata/CoreAssetPropagator.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-06-16 23:16:35 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-09-14 18:05:04 -0400
commit660e8087a1885fcf48b7d34b4ec726eda0e732d1 (patch)
treee91fd9c8566749f02b05f8697ddf509535bd3f1b /src/SMAPI/Metadata/CoreAssetPropagator.cs
parent480b307e6220e5a503f02ed857873ec8a0720e91 (diff)
downloadSMAPI-660e8087a1885fcf48b7d34b4ec726eda0e732d1.tar.gz
SMAPI-660e8087a1885fcf48b7d34b4ec726eda0e732d1.tar.bz2
SMAPI-660e8087a1885fcf48b7d34b4ec726eda0e732d1.zip
update for location change in SDV 1.4 (#638)
Diffstat (limited to 'src/SMAPI/Metadata/CoreAssetPropagator.cs')
-rw-r--r--src/SMAPI/Metadata/CoreAssetPropagator.cs23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs
index 186cd4ee..9e84c67f 100644
--- a/src/SMAPI/Metadata/CoreAssetPropagator.cs
+++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs
@@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using StardewModdingAPI.Framework.Reflection;
using StardewValley;
@@ -15,7 +14,6 @@ using StardewValley.Objects;
using StardewValley.Projectiles;
using StardewValley.TerrainFeatures;
using xTile;
-using xTile.ObjectModel;
using xTile.Tiles;
namespace StardewModdingAPI.Metadata
@@ -150,26 +148,9 @@ namespace StardewModdingAPI.Metadata
foreach (var entry in new InteriorDoorDictionary(location))
location.interiorDoors.Add(entry);
- // update doors (derived from GameLocation.loadObjects)
+ // update doors
location.doors.Clear();
- for (int x = 0; x < location.map.Layers[0].LayerWidth; ++x)
- {
- for (int y = 0; y < location.map.Layers[0].LayerHeight; ++y)
- {
- if (location.map.GetLayer("Buildings").Tiles[x, y] != null)
- {
- location.map.GetLayer("Buildings").Tiles[x, y].Properties.TryGetValue("Action", out PropertyValue action);
- if (action != null && action.ToString().Contains("Warp"))
- {
- string[] strArray = action.ToString().Split(' ');
- if (strArray[0] == "WarpCommunityCenter")
- location.doors.Add(new Point(x, y), "CommunityCenter");
- else if ((location.Name != "Mountain" || x != 8 || y != 20) && strArray.Length > 2)
- location.doors.Add(new Point(x, y), strArray[3]);
- }
- }
- }
- }
+ location.updateDoors();
anyChanged = true;
}