Skip to content

Commit 86993db

Browse files
committed
Switch to a Copy
This is pretty much just as efficient as all the old overhead was in the TileIndexProperties logic, but means its always a copy and wont have cache mutability problems
1 parent 4655ae3 commit 86993db

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/SMAPI/Framework/Content/AssetDataForMap.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using xTile;
99
using xTile.Dimensions;
1010
using xTile.Layers;
11-
using xTile.ObjectModel;
1211
using xTile.Tiles;
1312
using Rectangle = Microsoft.Xna.Framework.Rectangle;
1413

@@ -91,7 +90,7 @@ public void PatchMap(Map source, Rectangle? sourceArea = null, Rectangle? target
9190

9291
// add tilesheet
9392
targetSheet = new TileSheet(id, target, sourceSheet.ImageSource, sourceSheet.SheetSize, sourceSheet.TileSize);
94-
this.Reflection.GetField<PropertyCollection>(targetSheet, "m_propertyCollection").SetValue((PropertyCollection)sourceSheet.Properties);
93+
targetSheet.Properties.CopyFrom(sourceSheet.Properties);
9594
target.AddTileSheet(targetSheet);
9695
}
9796

0 commit comments

Comments
 (0)