Skip to content
EvilEngine.Mounts

External record

public sealed record External

Something a game reads from outside its own folder, declared by name in its probe’s Externals: Steam’s steamapps folder, a workshop, a save folder, another game. The host resolves each into a ResolvedExternal before it calls Open, which reads them from Externals by the same name.

public static readonly External Steamapps =
    External.Folder("steamapps", new ExternalHint.Beside("../..")) with { Shallow = true };

The player’s pointer can set each one in its [externals] table, by name: an absolute path to use instead of the Hint, false to turn it off, or true to turn on one that’s off by default. A path set there is used as it is, and a missing one stays missing rather than falling back to the hint.

Assembly
EvilEngine.Mounts
Commit
4ff877b1

Members

External constructor

public External(string Name, ExternalKind Kind)

Makes an external from its name and kind, on, with no hint. Folder and Game are shorter.

Name property

public string Name { get; init; }

The name the game uses for it, such as steamapps, workshop or userdata. It’s the key in the pointer’s [externals] table and in Externals. Keep it unique among one probe’s externals.

Kind property

public ExternalKind Kind { get; init; }

The ExternalKind: a folder, or another game’s mount.

Title property

public string? Title { get; init; }

A name for a person, or null. Garry’s Mod’s depot games set it, as Portal or Counter-Strike: Source, and the game’s page in Content Mounts lists the titles of those that resolved under Mounts.

Licence property

public MountLicence? Licence { get; init; }

The MountLicence for the product the content comes with, or null. Garry’s Mod’s depot games carry their Steam app. Nothing reads it yet.

Hint property

public ExternalHint? Hint { get; init; }

Where the host looks when the pointer doesn’t say, an ExternalHint. Left null, the external is missing unless the pointer names a path.

Requirement property

public MountRequirement? Requirement { get; init; }

The MountRequirement a game external is found by, or null for a folder. A game external needs one.

On property

public bool On { get; init; }

Whether the game reads it unless told otherwise, true by default. One that’s off resolves as off, from the game, unless the pointer sets it to true or a path.

GameSwitches property

public bool GameSwitches { get; init; }

Whether only the game’s own config turns it on or off, so the pointer can’t. Garry’s Mod’s depot games set it, with On read from garrysmod/cfg/mountdepots.txt. When the game has it off, it’s off whatever the pointer says. When the game has it on, a false in the pointer is left out and the resolved Detail says so, though a path there is still used.

TakesChildren property

public bool TakesChildren { get; init; }

Whether the pointer can set things under it, as "<name>/<child>" entries. Those reach the adapter in the resolved Children, keyed by the child’s name, rather than counting as Unknown. Steam’s workshop takes them, so "workshop/123456789" = false turns one item off.

Shallow property

public bool Shallow { get; init; }

Whether a folder lists only the files directly in it, never its subfolders. Steam’s steamapps and depotcache are shallow, so reading their manifests never walks every game under common/.

Folder method

public static External Folder(string name, ExternalHint? hint)

Makes a folder external from its name and hint, which can be null.

Game method

public static External Game(string name, MountRequirement requirement, ExternalHint? hint)

Makes a game external from its name, the requirement it’s found by and its hint, which can be null. No adapter the engine ships declares one yet.