Deprecations

Several features and modules are deprecated, renamed to something else or removed to allow other features.

srctools.bsp

BSP.read_header() None

No longer used.

BSP.read_game_lumps() None

No longer used.

BSP.replace_lump(
new_name: str,
lump: BSP_LUMPS | Lump,
new_data: bytes,
) None

Write out the BSP file, replacing a lump with the given bytes.

Deprecated:

simply assign to the .data attribute of the lump.

BSP.read_ent_data() VMF

Deprecated function to parse the entdata lump.

Use BSP.ents directly.

staticmethod BSP.write_ent_data(vmf: VMF, use_comma_sep: bool = ...)

Generate the entity data lump.

Deprecated, read and write BSP.ents instead.

Parameters:
  • vmf – This accepts a VMF file like that returned from read_ent_data(). Brushes are ignored, so the VMF must use *xx model references.

  • use_comma_sep – This is used to force using either commas, or 0x1D in I/O.

BSP.read_texture_names() Iterator[str]

Iterate through all brush textures in the map.

with BSP.packfile() Iterator[ZipFile] as zipfile

A context manager to allow editing the packed content.

When successfully exited, the zip will be rewritten to the BSP file. Deprecated, use BSP.pakfile to access the cached archive instead.

BSP.static_props() Iterator[StaticProp]

Read in the Static Props lump.

Deprecated, use bsp.props.

BSP.write_static_props(props: list[StaticProp]) None

Remake the static prop lump.

Deprecated, bsp.props is stored and resaved.

property VisTree.plane_norm: Vec
Deprecated:

Alias for tree.plane.normal.

property VisTree.plane_dist: float
Deprecated:

Alias for tree.plane.dist.

srctools.dmx

srctools.dmx.STUB

Call srctools.dmx.StubElement.stub() instead.

class srctools.dmx.AngleTup

Was a named tuple, use the frozen class instead.

class srctools.dmx.Vec3

Was a named tuple, use the frozen class instead.

srctools.filesys

FileSystem.read_prop(path: str, encoding: str = 'utf8') Keyvalues

Read a Keyvalues1 file from the filesystem.

Deprecated:

Use read_kv1().

FileSystem._check_open() None
Deprecated:

filesystems are always valid.

FileSystem.__enter__() Self
Deprecated:

No longer needs to be used as a context manager.

FileSystem.__exit__(*args: object) None
Deprecated:

No longer needs to be used as a context manager.

FileSystem.open_ref() None
Deprecated:

No longer needs to be called.

FileSystem.close_ref() None
Deprecated:

No longer needs to be called.

srctools.fgd

class srctools.fgd.Keyvalues

This was renamed so it is not confused with Keyvalues1 trees.

srctools.property_parser

Deprecated original location of the srctools.keyvalues Keyvalues1 parser.

class srctools.property_parser.Property

Deprecated original name of srctools.keyvalues.Keyvalues.

class srctools.property_parser.KeyValError

Deprecated original name of srctools.keyvalues.KeyValError.

class srctools.property_parser.NoKeyError

Deprecated original name of srctools.keyvalues.NoKeyError.

srctools.vec

Deprecated original location of srctools.math vector code.

class srctools.vec.Vec

Deprecated original name of srctools.math.Vec.

class srctools.vec.Angle

Deprecated original name of srctools.math.Angle.

class srctools.vec.Matrix

Deprecated original name of srctools.math.Matrix.

class srctools.vec.Vec_tuple

Deprecated original name of srctools.math.Vec_tuple.

srctools.vec.parse_vec_str()

Deprecated original name of srctools.math.parse_vec_str.

srctools.vec.to_matrix()

Deprecated original name of srctools.math.to_matrix.

srctools.vec.lerp()

Deprecated original name of srctools.math.lerp.

srctools.vmf

Side.plane_desc() str

Returns all the plane coordinates concatenated together.

This is pretty useless, and will be removed in the future.

property Solid.cordon_solid: int | None

Deprecated old version of is_cordon.