Table of Contents

Class MapExtract

Namespace
ValveResourceFormat.IO
Assembly
ValveResourceFormat.dll

Extracts map data from Source 2 resources into editable formats.

public sealed class MapExtract

Inheritance

Inherited Members

Constructors

MapExtract(Resource, IFileLoader?)

Extract a map from a resource. Accepted types include Map, World. TODO: WorldNode and EntityLump.

public MapExtract(Resource resource, IFileLoader? fileLoader)

Parameters

resource Resource
fileLoader IFileLoader?

Fields

ToolTextureMultiTags

Maps tool texture names to their associated collision tag sets.

public static readonly Dictionary<string, HashSet<string>> ToolTextureMultiTags

Field Value

Dictionary<string, HashSet<string>>

Properties

LumpFolder

Gets the folder containing map lumps.

public string LumpFolder { get; }

Property Value

string

PhysVertexMatcher

Gets the physics vertex matcher used for physics mesh processing.

public PhysicsVertexMatcher? PhysVertexMatcher { get; }

Property Value

PhysicsVertexMatcher?

ProgressReporter

Gets or sets the progress reporter.

public IProgress<string>? ProgressReporter { get; set; }

Property Value

IProgress<string>?

Methods

GetLumpFolderFromVmapRERL(ResourceExtRefList?)

Extracts the lump folder path from a vmap's external resource list.

public static string GetLumpFolderFromVmapRERL(ResourceExtRefList? rerl)

Parameters

rerl ResourceExtRefList?

Returns

string

GetToolTextureForEntity(string?)

Gets the auto-applied tool texture material for an entity class name.

public static string? GetToolTextureForEntity(string? entityClassName)

Parameters

entityClassName string?

Returns

string?

GetToolTextureNameForCollisionTags(SurfaceTagCombo)

Gets the tool texture material path for a given surface tag combination.

public static string GetToolTextureNameForCollisionTags(ModelExtract.SurfaceTagCombo combo)

Parameters

combo ModelExtract.SurfaceTagCombo

Returns

string

GetToolTextureShortenedName_ForInteractStrings(HashSet<string>)

Gets the shortened tool texture name for a set of interact-as strings.

public static string GetToolTextureShortenedName_ForInteractStrings(HashSet<string> interactAsStrings)

Parameters

interactAsStrings HashSet<string>

Returns

string

LoadWorldPhysics()

Loads the world physics collision data.

public PhysAggregateData? LoadWorldPhysics()

Returns

PhysAggregateData?

ToContentFile()

Converts the map extract to a content file with all dependencies.

public ContentFile ToContentFile()

Returns

ContentFile

ToValveMap()

Converts the map to a Valve map format as a byte array.

public byte[] ToValveMap()

Returns

byte[]