Skip to content

LoadedMods class ​

Namespace Lustral · Assembly Lustral.Api

The mods Lustral has loaded in the current session, including libraries, in load order. A mod's dependencies and optional dependencies are always loaded before it, so from the mod's constructor onward, Mods.IsLoaded("other.mod") indicates whether an optional dependency is present.

csharp
public sealed class LoadedMods : IReadOnlyList<ModInfo>

Properties ​

Count ​

csharp
public int Count { get; }

The number of loaded mods.

this[int] ​

csharp
public ModInfo this[int index] { get; }

The loaded mod at the specified position in the load order.

Methods ​

Find(string) ​

csharp
public ModInfo? Find(string id);

Returns the loaded mod with the specified ID, or null.

GetEnumerator() ​

csharp
public IEnumerator<ModInfo> GetEnumerator();

Returns an enumerator over the loaded mods in load order.

IsLoaded(string) ​

csharp
public bool IsLoaded(string id);

Returns whether the mod with the specified ID has been loaded.

Mods are third-party software. Lustral does not verify their behavior and is not responsible for any damage they cause.