Class MapExtract
Namespace: ValveResourceFormat.IO
Assembly: ValveResourceFormat.dll
Extracts map data from Source 2 resources into editable formats.
public sealed class MapExtractInheritance
object ← MapExtract
Constructors
MapExtract(Resource, IFileLoader?)
Extract a map from a resource. Accepted types include ResourceType.Map, ResourceType.World. TODO: ResourceType.WorldNode and ResourceType.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>> ToolTextureMultiTagsField Value
Dictionary<string, HashSet<string>>
Properties
LumpFolder
Gets the folder containing map lumps.
public string LumpFolder { get; }Property Value
string
PhysTriangleMatcher
Gets the physics vertex matcher used for physics mesh processing.
public PhysicsTriangleMatcher? PhysTriangleMatcher { get; }Property Value
ProgressReporter
Gets or sets the progress reporter.
public IProgress<string>? ProgressReporter { get; set; }Property Value
IProgress<string>?
ReconstructSoftbody
Gets or sets whether the models extracted with the map reconstruct their soft-body (cloth) physics.
public bool ReconstructSoftbody { get; set; }Property Value
bool
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(SurfaceTagCombo combo)Parameters
combo 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
ToContentFile()
Converts the map extract to a content file with all dependencies.
public ContentFile ToContentFile()Returns
ToValveMap()
Converts the map to a Valve map format as a byte array.
public byte[] ToValveMap()Returns
byte[]

