From c5be446701d4e24a03d8464e9b080ce74d158223 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 6 Jan 2021 00:29:39 -0500 Subject: rework vanilla tilesheet checking to avoid keeping a copy of the vanilla maps in memory --- src/SMAPI/Framework/Content/TilesheetReference.cs | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/SMAPI/Framework/Content/TilesheetReference.cs (limited to 'src/SMAPI/Framework/Content') diff --git a/src/SMAPI/Framework/Content/TilesheetReference.cs b/src/SMAPI/Framework/Content/TilesheetReference.cs new file mode 100644 index 00000000..2ea38430 --- /dev/null +++ b/src/SMAPI/Framework/Content/TilesheetReference.cs @@ -0,0 +1,33 @@ +namespace StardewModdingAPI.Framework.Content +{ + /// Basic metadata about a vanilla tilesheet. + internal class TilesheetReference + { + /********* + ** Accessors + *********/ + /// The tilesheet's index in the list. + public readonly int Index; + + /// The tilesheet's unique ID in the map. + public readonly string Id; + + /// The asset path for the tilesheet texture. + public readonly string ImageSource; + + + /********* + ** Public methods + *********/ + /// Construct an instance. + /// 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) + { + this.Index = index; + this.Id = id; + this.ImageSource = imageSource; + } + } +} -- cgit