Skip to content

Class PackageManifest

Namespace: Apogee.Content.Packages
Assembly: Apogee.Content.dll

The mod.xml at the root of a package. Checked against the engine's schema (Packages/mod.xsd) and further: the id is lowercase letters, digits and underscores (and not one the engine uses: engine, self, res, user, mod), versions and ranges parse, and the paths it names are relative and stay inside the package.

public sealed class PackageManifest

Inheritance

object ← PackageManifest

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Fields

EngineApiVersion

The newest API of the engine that packages are written against. A package that needs a newer one is not loaded.

public const int EngineApiVersion = 1

Field Value

int

Properties

ApiVersion

public int ApiVersion { get; }

Property Value

int

Author

public string Author { get; }

Property Value

string

ContentFolders

Folders of definitions, as paths inside the package.

public IReadOnlyList<string> ContentFolders { get; }

Property Value

IReadOnlyList<string>

Dependencies

public IReadOnlyList<PackageDependency> Dependencies { get; }

Property Value

IReadOnlyList<PackageDependency>

Description

public string Description { get; }

Property Value

string

GameVersion

The versions of the game this package works with.

public VersionRange GameVersion { get; }

Property Value

VersionRange

Id

public string Id { get; }

Property Value

string

Name

The name to show; the id when the manifest has none.

public string Name { get; }

Property Value

string

SchemaFolders

Folders of schemas, as paths inside the package.

public IReadOnlyList<string> SchemaFolders { get; }

Property Value

IReadOnlyList<string>

Scripts

Scripts to run, as paths inside the package, in order.

public IReadOnlyList<string> Scripts { get; }

Property Value

IReadOnlyList<string>

Version

public PackageVersion Version { get; }

Property Value

PackageVersion

Methods

TryParse(string, string, out PackageManifest?, out IReadOnlyList<string>)

Reads a manifest. problems lists everything wrong, with lines; the manifest is null when anything is.

public static bool TryParse(string text, string origin, out PackageManifest? manifest, out IReadOnlyList<string> problems)

Parameters

text string

origin string

manifest PackageManifest?

problems IReadOnlyList<string>

Returns

bool