Table of Contents

Class NuGetPackageMod

Namespace
MonkeyLoader.Meta
Assembly
MonkeyLoader.dll

Contains all the metadata and references to loaded patchers from a .nupkg mod file.

public sealed class NuGetPackageMod : Mod, IConfigOwner, IIdentifiableOwner<IConfigOwner, Config>, IIdentifiableOwner<Config>, IShutdown, ILoadedNuGetPackage, IComparable<Mod>, INestedIdentifiableOwner<ConfigSection>, INestedIdentifiableOwner<IDefiningConfigKey>, IIdentifiableOwner<Mod, IMonkey>, IIdentifiableOwner<IMonkey>, IIdentifiableOwner<Mod, IEarlyMonkey>, IIdentifiableOwner<IEarlyMonkey>, IIdentifiable, IAuthorable
Inheritance
NuGetPackageMod
Implements
Inherited Members
Extension Methods

Constructors

NuGetPackageMod(MonkeyLoader, string, bool)

Creates a new NuGetPackageMod instance for the given loader, loading a .nupkg into memory from the given location.
The metadata gets loaded from a .nuspec file, which must be at the root of the file system.

public NuGetPackageMod(MonkeyLoader loader, string location, bool isGamePack)

Parameters

loader MonkeyLoader

The loader instance that loaded this mod.

location string

The absolute file path to the mod's file.

isGamePack bool

Whether this mod is a game pack.

Fields

SearchPattern

The search pattern for mod files supported by this mod-type.

public const string SearchPattern = "*.nupkg"

Field Value

string

Properties

Description

Gets the description of this mod.

public override string Description { get; }

Property Value

string

FileSystem

Gets the readonly file system of this mod's file.

public override IFileSystem FileSystem { get; }

Property Value

IFileSystem

IconPath

Gets the path to the mod's icon inside the mod's FileSystem.
null if it wasn't given or doesn't exist.

public override UPath? IconPath { get; }

Property Value

UPath?

IconUrl

Gets the Url to the mod's icon on the web.
null if it wasn't given or was invalid.

public override Uri? IconUrl { get; }

Property Value

Uri

Identity

Gets the identity of this mod.

public override PackageIdentity Identity { get; }

Property Value

PackageIdentity

PatcherAssemblyPaths

Gets the paths inside this mod's FileSystem that point to patcher assemblies that should be loaded.

public IEnumerable<UPath> PatcherAssemblyPaths { get; }

Property Value

IEnumerable<UPath>

PrePatcherAssemblyPaths

Gets the paths inside this mod's FileSystem that point to pre-patcher assemblies that should be loaded.

public IEnumerable<UPath> PrePatcherAssemblyPaths { get; }

Property Value

IEnumerable<UPath>

ProjectUrl

Gets the Url to this mod's project website.
null if it wasn't given or was invalid.

public override Uri? ProjectUrl { get; }

Property Value

Uri

ReleaseNotes

Gets the release notes for this mod's version.

public override string? ReleaseNotes { get; }

Property Value

string

SupportsHotReload

Gets whether this type of mod supports hot reloading.

public override bool SupportsHotReload { get; }

Property Value

bool

TargetFramework

Gets the framework targeted by this mod.

public override NuGetFramework TargetFramework { get; }

Property Value

NuGetFramework

Title

Gets the nice identifier of this mod.

public override string Title { get; }

Property Value

string

Methods

OnLoadEarlyMonkeys()

Loads the mod's early monkeys.

protected override bool OnLoadEarlyMonkeys()

Returns

bool

true if it ran successfully; otherwise, false.

OnLoadMonkeys()

Loads the mod's monkeys.

protected override bool OnLoadMonkeys()

Returns

bool

true if it ran successfully; otherwise, false.