summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-10-24 18:28:43 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-10-24 18:28:43 -0400
commitf9f3db7db03e969bde33f417d66f259a3d3e6006 (patch)
tree9f9c4ba621c9caa46445d0ebfc722bc3bcdb5a4e /src
parent7c652b0924476cea8dc89faa30983e01c0c66fec (diff)
downloadSMAPI-f9f3db7db03e969bde33f417d66f259a3d3e6006.tar.gz
SMAPI-f9f3db7db03e969bde33f417d66f259a3d3e6006.tar.bz2
SMAPI-f9f3db7db03e969bde33f417d66f259a3d3e6006.zip
add character-customization-only shirts to item repo
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs
index a96a842c..5884d28a 100644
--- a/src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs
@@ -61,8 +61,25 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework
yield return this.TryCreate(ItemType.Tool, this.CustomIDOffset + 3, _ => new Wand());
// clothing
- foreach (int id in Game1.clothingInformation.Keys)
- yield return this.TryCreate(ItemType.Clothing, id, p => new Clothing(p.ID));
+ {
+ // items
+ HashSet<int> clothingIds = new HashSet<int>();
+ foreach (int id in Game1.clothingInformation.Keys)
+ {
+ if (id < 0)
+ continue; // placeholder data for character customization clothing below
+
+ clothingIds.Add(id);
+ yield return this.TryCreate(ItemType.Clothing, id, p => new Clothing(p.ID));
+ }
+
+ // character customization shirts (some shirts in this range have no data, but game has special logic to handle them)
+ for (int id = 1000; id <= 1111; id++)
+ {
+ if (!clothingIds.Contains(id))
+ yield return this.TryCreate(ItemType.Clothing, id, p => new Clothing(p.ID));
+ }
+ }
// wallpapers
for (int id = 0; id < 112; id++)