Class EntityLump
Namespace: ValveResourceFormat.ResourceTypes
Assembly: ValveResourceFormat.dll
Represents an entity lump resource containing entity definitions and their properties.
public class EntityLump : KeyValuesOrNTROInheritance
object ← Block ← KeyValuesOrNTRO ← EntityLump
Inherited Members
KeyValuesOrNTRO.Type, KeyValuesOrNTRO.Data, KeyValuesOrNTRO.Format, KeyValuesOrNTRO.Read(BinaryReader), KeyValuesOrNTRO.Serialize(Stream), KeyValuesOrNTRO.WriteText(IndentedTextWriter), Block.Type, Block.Offset, Block.Size, Block.Resource, Block.Read(BinaryReader), Block.ToString(), Block.WriteText(IndentedTextWriter), Block.Serialize(Stream)
Extension Methods
ResourceDataExtensions.AsKeyValueCollection(Block)
Properties
Name
Gets the name of this entity lump.
public string Name { get; }Property Value
Methods
EntityNameMatches(string, string)
Compares an entity targetname against a target string that may contain wildcards.
public static bool EntityNameMatches(string pattern, string targetName)Parameters
pattern string
Targetname to match against, may contain wildcards: * and ? (e.g. door_*).
targetName string
Entity targetname.
Returns
Whether the targetname matches.
GetChildEntityNames()
Gets the names of child entity lumps.
public string[] GetChildEntityNames()Returns
string[]
An array of child entity lump names.
GetEntities()
Gets all entities contained in this entity lump.
public List<EntityLump.Entity> GetEntities()Returns
A list of entities.
RemoveTargetnamePrefix(string?)
Return a string without [PR#] prefix.
public static string RemoveTargetnamePrefix(string? value)Parameters
value string?
Entity targetname.
Returns
Friendly targetname.
StringifyValue(object?)
Return a string representation of an entity property.
public static string StringifyValue(object? value)Parameters
value object?
Entity property.
Returns
Stringified value.
ToEntityDumpString()
Converts the entity lump to a human-readable string representation.
public string ToEntityDumpString()Returns
A formatted string containing all entities and their properties.
ToForgeGameData()
Converts the entity lump to a Forge Game Data (FGD) format string.
public string ToForgeGameData()Returns
An FGD-formatted string containing entity class definitions.

