add character-customization-only shirts to item repo

This commit is contained in:
Jesse Plamondon-Willard 2020-10-24 18:28:43 -04:00
parent 7c652b0924
commit f9f3db7db0
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
2 changed files with 22 additions and 2 deletions

View File

@ -11,6 +11,9 @@
* For modders: * For modders:
* Fixed error when heuristically rewriting a property for a type that no longer exists. * Fixed error when heuristically rewriting a property for a type that no longer exists.
* For the Console Commands mod:
* `player_add` can now spawn shirts normally only available during character customization.
## 3.7.5 ## 3.7.5
Released 16 October 2020 for Stardew Valley 1.4.1 or later. Released 16 October 2020 for Stardew Valley 1.4.1 or later.

View File

@ -61,8 +61,25 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework
yield return this.TryCreate(ItemType.Tool, this.CustomIDOffset + 3, _ => new Wand()); yield return this.TryCreate(ItemType.Tool, this.CustomIDOffset + 3, _ => new Wand());
// clothing // clothing
{
// items
HashSet<int> clothingIds = new HashSet<int>();
foreach (int id in Game1.clothingInformation.Keys) 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)); 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 // wallpapers
for (int id = 0; id < 112; id++) for (int id = 0; id < 112; id++)