srctools.surfaceprop
Parse surfaceproperties files, to determine surface physics.
- class srctools.surfaceprop.SurfChar(
- value,
- names=None,
- *,
- module=None,
- qualname=None,
- type=None,
- start=1,
- boundary=None,
Bases:
Enum
Code classification for this material.
This is a single ASCII character.
- ANTLION = 'A'
- BLOODYFLESH = 'B'
- CONCRETE = 'C'
- DIRT = 'D'
- EGGSHELL = 'E'
The egg sacs in the tunnels in EP2.
- FLESH = 'F'
- GRATE = 'G'
- ALIENFLESH = 'H'
- CLIP = 'I'
- GRASS = 'J'
L4D addition
- MUD_ASW = 'K'
Alias:
SNOW
In ASW, this is mud. In CSGO it’s snow.
- PLASTIC = 'L'
- METAL = 'M'
- SAND = 'N'
- FOLIAGE = 'O'
- COMPUTER = 'P'
- ASPHALT = 'Q'
L4D addition
- REFLECTIVE = 'R'
Alias:
BRICK
2013 and P2 assigns this to reflective, brick in L4D+
- SLOSH = 'S'
- TILE = 'T'
- CARDBOARD = 'U'
L4D addition
- VENT = 'V'
- WOOD = 'W'
- NOFX = 'X'
“fake” materials use this (ladders, wading, clips, etc)
- GLASS = 'Y'
- WARPSHIELD = 'Z'
Weird-looking jello effect for advisor shield.
- CLAY = '1'
L4D adds these:
- PLASTER = '2'
- ROCK = '3'
- RUBBER = '4'
- SHEETROCK = '5'
- CLOTH = '6'
- CARPET = '7'
- PAPER = '8'
- UPHOLSTERY = '9'
- PUDDLE = '10'
- MUD_L4D = '11'
Alias:
STEAM_PIPE
- SANDBARREL = '12'
CSGO
- class srctools.surfaceprop.SurfaceProp(
- name: str,
- parent: SurfaceProp | None = None,
- **kwargs: object,
A material surface type.
- copy() SurfaceProp
Duplicate this surfaceprop.
- static parse_file(
- props: Keyvalues,
- prev: Dict[str, SurfaceProp] | None = None,
Parse surfaceproperties from a file.
- Parameters:
props – The keyvalues block to parse.
prev – If passed, this is used to read parent properties from.
A blank “default” surfaceprop will be generated if not already present.
- static parse_manifest(
- fsys: FileSystem[T],
- file: File[FileSystem[T]] | None = None,
Load surfaceproperties from a manifest.
scripts/surfaceproperties_manifest.txt
will be used if a file is not specified.