SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

Track mod instances & manifests via mod registry

Pathoschild opened this issue ยท 1 comments

commented

SMAPI has an internal mod registry which tracks mod assembly names (used to lookup mods from a stack frame). Expand this to track mod instances and manifests, for eventual use by Farmhand (see ClxS/Stardew-Farmhand#156).

commented

Done in the develop branch for the upcoming 1.5 release. The internal mod registry now provides a GetMods() method:

Program.ModRegistry.GetMods().ToArray()
{StardewModdingAPI.IMod[20]}
    [0]: {Entoarox.Framework.EntoFramework}
    [1]: {Billboard_Anywhere.Class1}
    [2]: {Pathoschild.Stardew.ChestsAnywhere.ChestsAnywhereMod}
    [3]: {DailyQuest_Anywhere.Class1}
    [4]: {Pathoschild.Stardew.DataMaps.ModEntry}
    [5]: {Pathoschild.Stardew.DebugMode.ModEntry}
    [6]: {Entoarox.ExtendedMinecart.ExtendedMinecart}
    [7]: {GetDressed.GetDressed}
    [8]: {HarvestWithScytheSMAPI.HarvestWithScytheSMAPI}
    [9]: {HorseWhistle.HorseWhistle}
    [10]: {Pathoschild.Stardew.LookupAnything.LookupAnythingMod}
    [11]: {LovedLabels.LovedLabels}
    [12]: {NoSoilDecay.NoiSoilDecay}
    [13]: {NPCMapLocations.MapModMain}
    [14]: {Pathoschild.Stardew.SkipIntro.SkipIntroMod}
    [15]: {SMAPIHealthBarMod.SMAPIHealthBarModMainClass}
    [16]: {SprinklerMod.SprinklerMod}
    [17]: {StackSplitX.StackSplitX}
    [18]: {teleporting.ModEntry}
    [19]: {TrainerMod.TrainerMod}

Here's the IMod interface:

image