Skip to content
EvilEngine.Conversion

FileLayer record

public sealed record FileLayer

The layer a file in a layered mount comes from, as ConversionContext.LayerOf gives it: the name and role its LayerPlan was given. It’s the layer whose copy wins, so a file a Garry’s Mod addon overrides comes from the addon’s layer.

if (context.LayerOf(entry.Path) is { Role: "addon" or "workshop" } layer)
    context.Warn($"{entry.Path} comes from {layer.Name}.");
Assembly
EvilEngine.Conversion
Commit
4ff877b1

Members

FileLayer constructor

public FileLayer(string Name, string Role)

Makes a layer from its name and role. The pipeline makes them for LayerOf; you only need to make one to test code that takes it.

Name property

public string Name { get; init; }

The layer’s name, as its LayerPlan gives it. It’s the name TryReadCopy takes and Copies lists.

Role property

public string Role { get; init; }

What the layer is to its game, in a word, as its LayerPlan gives it, such as base, dlc, addon or workshop. The map converters tag a map’s origin by it: community for addon, download, workshop or mod, expansion for dlc, official for anything else.