diff options
Diffstat (limited to 'src/SMAPI')
-rw-r--r-- | src/SMAPI/Metadata/CoreAssetPropagator.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs index 5911ba2c..66e6ed14 100644 --- a/src/SMAPI/Metadata/CoreAssetPropagator.cs +++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs @@ -231,6 +231,9 @@ namespace StardewModdingAPI.Metadata CraftingRecipe.craftingRecipes = content.Load<Dictionary<string, string>>(key); return true; + case "data\\farmanimals": // FarmAnimal constructor + return this.ReloadFarmAnimalData(); + case "data\\npcdispositions": // NPC constructor return this.ReloadNpcDispositions(content, key); @@ -599,6 +602,21 @@ namespace StardewModdingAPI.Metadata return critters.Length; } + /// <summary>Reload the data for matching farm animals.</summary> + /// <returns>Returns whether any farm animals were affected.</returns> + /// <remarks>Derived from the <see cref="FarmAnimal"/> constructor.</remarks> + private bool ReloadFarmAnimalData() + { + bool changed = false; + foreach (FarmAnimal animal in this.GetFarmAnimals()) + { + animal.reloadData(); + changed = true; + } + + return changed; + } + /// <summary>Reload the sprites for a fence type.</summary> /// <param name="key">The asset key to reload.</param> /// <returns>Returns whether any textures were reloaded.</returns> |