From 0d7d4476004d33b395d6df81386e4159d8898027 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 20 Dec 2021 22:18:09 -0500 Subject: auto-fix maps broken due to missing vanilla tilesheet --- src/SMAPI/Framework/Content/TilesheetReference.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/SMAPI/Framework/Content') diff --git a/src/SMAPI/Framework/Content/TilesheetReference.cs b/src/SMAPI/Framework/Content/TilesheetReference.cs index 2ea38430..0919bb44 100644 --- a/src/SMAPI/Framework/Content/TilesheetReference.cs +++ b/src/SMAPI/Framework/Content/TilesheetReference.cs @@ -1,3 +1,6 @@ +using System.Numerics; +using xTile.Dimensions; + namespace StardewModdingAPI.Framework.Content { /// Basic metadata about a vanilla tilesheet. @@ -15,6 +18,12 @@ namespace StardewModdingAPI.Framework.Content /// The asset path for the tilesheet texture. public readonly string ImageSource; + /// The number of tiles in the tilesheet. + public readonly Size SheetSize; + + /// The size of each tile in pixels. + public readonly Size TileSize; + /********* ** Public methods @@ -23,11 +32,15 @@ namespace StardewModdingAPI.Framework.Content /// The tilesheet's index in the list. /// The tilesheet's unique ID in the map. /// The asset path for the tilesheet texture. - public TilesheetReference(int index, string id, string imageSource) + /// The number of tiles in the tilesheet. + /// The size of each tile in pixels. + public TilesheetReference(int index, string id, string imageSource, Size sheetSize, Size tileSize) { this.Index = index; this.Id = id; this.ImageSource = imageSource; + this.SheetSize = sheetSize; + this.TileSize = tileSize; } } } -- cgit