Skip to content
EvilEngine.Mounts

ResolvedExternal record

public sealed record ResolvedExternal

One External after the host has looked for it: whether it was found, where the answer came from, and the files it found. An adapter’s Open gets them in Externals, by name.

if (externals[Workshop.External.Name] is not { IsResolved: true, Files: { } files } workshop)
    return mods;

Treat anything but resolved as absent: leave its content out and say so in the plan’s notes if it matters. It prints as one line, as in steamapps = /games/SteamLibrary/steamapps, from hint or portal = missing, from finder (steam:app/400 isn't installed), which is what just mounts lists under externals.

Assembly
EvilEngine.Mounts
Commit
4ff877b1

Members

ResolvedExternal constructor

public ResolvedExternal(External Declared, ExternalState State, ExternalFrom From)

Makes a resolved external from the declared one, its state and where the answer came from. The host makes these. Tests make their own.

Declared property

public External Declared { get; init; }

The External the probe declared, with its title, hint and flags.

State property

public ExternalState State { get; init; }

ExternalState.Resolved when it was found, Off when the game or the pointer turned it off, and Missing when it was looked for and not found. Detail says why it’s missing.

From property

public ExternalFrom From { get; init; }

Where the answer came from, as an ExternalFrom: Player for the pointer’s [externals] table, Game for the game’s own default or config turning it off, Mount for an open mount or a probe on offer that a game external took, Hint for a host path or a path beside the pointer, Finder for a store hint, and Nowhere when it has no hint and the pointer doesn’t name it.

Name property

public string Name { get; }

The Declared external’s name.

Location property

public string? Location { get; init; }

The full host path it resolved to. For a game external taken from a mount it’s that mount’s location. A missing one keeps the path that was tried when there was one, such as a hint’s folder that isn’t there, and is null when there wasn’t. An off one is null.

Files property

public IFileSource? Files { get; init; }

What it holds, when it resolved: the folder as an IFileSource, an archive opened by the container adapter that recognises it, or for a game external the tree the other game was probed from. null otherwise. Files the host opened for it, not a mount’s, belong to the mount that asked and are released when that mount closes.

Mount property

public Mount? Mount { get; init; }

The other game’s mount, for a game external that resolved, or null. The host opens it if it wasn’t open already.

Children property

public IReadOnlyDictionary<string, ExternalSetting> Children { get; init; }

The pointer’s settings under this external’s name, for one that TakesChildren, keyed by what follows <name>/. Each is an absolute path, or on or off. Steam’s workshop reads "workshop/123456789" = false as item 123456789 turned off, and notes a setting for an item that isn’t installed. Empty for an external that takes no children.

Detail property

public string? Detail { get; init; }

Why it’s missing, as in /home/you/.frictionalgames/Amnesia isn't there, or a note on a setting that was left out, or null. A GameSwitches external says here when the pointer’s setting was left out.

IsResolved property

public bool IsResolved { get; }

Whether State is resolved. When it’s true, Files and Location are set.