diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-01-16 18:01:19 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-01-16 18:01:19 -0500 |
commit | 1b9ff9cd101621cacc246fc2b7d936f964ae4b3f (patch) | |
tree | ff742b2a12270b57c28e8ddecdc5322c64f6c2ce /src/SMAPI/Framework/Content | |
parent | 8a2618d812e4e2f36161907af5af5c484eb37abf (diff) | |
parent | ad0e6b315dc7b4e616dcdf6c090cd54a2f3b7499 (diff) | |
download | SMAPI-1b9ff9cd101621cacc246fc2b7d936f964ae4b3f.tar.gz SMAPI-1b9ff9cd101621cacc246fc2b7d936f964ae4b3f.tar.bz2 SMAPI-1b9ff9cd101621cacc246fc2b7d936f964ae4b3f.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/Content')
-rw-r--r-- | src/SMAPI/Framework/Content/TilesheetReference.cs | 15 |
1 files changed, 14 insertions, 1 deletions
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 { /// <summary>Basic metadata about a vanilla tilesheet.</summary> @@ -15,6 +18,12 @@ namespace StardewModdingAPI.Framework.Content /// <summary>The asset path for the tilesheet texture.</summary> public readonly string ImageSource; + /// <summary>The number of tiles in the tilesheet.</summary> + public readonly Size SheetSize; + + /// <summary>The size of each tile in pixels.</summary> + public readonly Size TileSize; + /********* ** Public methods @@ -23,11 +32,15 @@ namespace StardewModdingAPI.Framework.Content /// <param name="index">The tilesheet's index in the list.</param> /// <param name="id">The tilesheet's unique ID in the map.</param> /// <param name="imageSource">The asset path for the tilesheet texture.</param> - public TilesheetReference(int index, string id, string imageSource) + /// <param name="sheetSize">The number of tiles in the tilesheet.</param> + /// <param name="tileSize">The size of each tile in pixels.</param> + 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; } } } |