Skip to content
EvilEngine.Mounts

PartPlan record

public sealed record PartPlan

One named piece of a game, in a MountPlan’s Parts: what a Plugin’s [[mounts]] can require, and what two players’ copies are compared by. Name it after what something reads, such as content, map/gm_construct or a workshop item.

Its fingerprint is a hash over its defining files, taken the first time something asks for it.

Assembly
EvilEngine.Mounts
Commit
4ff877b1

Members

PartPlan constructor

public PartPlan(string Name, IReadOnlyList<VirtualPath> DefiningFiles)

Makes a part from its name and the files that define it.

Name property

public string Name { get; init; }

The part’s name, as a Plugin’s manifest names it under parts.

DefiningFiles property

public IReadOnlyList<VirtualPath> DefiningFiles { get; init; }

The files the part is, by path in Files. Their bytes are hashed for the fingerprint, unless the part has claims or is by index. Leave out every file the game writes to itself, or the part changes the first time the game runs.

Files property

public IFileSource? Files { get; init; }

The tree DefiningFiles are read from. Left null, it’s the probe’s Tree. Set it for a part that sits in an external, like a workshop item.

ByIndex property

public bool ByIndex { get; init; }

true to hash the archive’s own index rather than its files’ bytes, through its container’s IIndexedContainer.ReadIndex. An index that holds every file’s checksum, as a GMA’s does, still changes when any file does, so a part over gigabytes compares by reading kilobytes.

Version property

public string? Version { get; init; }

A label for the part shown with it, such as a workshop item’s own version. It’s never compared.

Claims property

public IReadOnlyDictionary<VirtualPath, string> Claims { get; init; }

Hashes the game or its storefront keeps for each file, by path, used with each file’s size in place of hashing its bytes. Steam’s depot manifests give every Steam game’s files a SHA-1 this way. Use them only where you know they change whenever a file’s bytes do.

Sha1Claims property

public bool Sha1Claims { get; init; }

true when the claims are SHA-1s of the files’ bytes. A file with no claim is then hashed by its own SHA-1, so a copy from another storefront fingerprints the same as a Steam copy wherever their files match.