model/vbsp: Source BSP 19-21 (L4D2 header, LZMA lumps): faces, displacements, static props v4-v13, brush entities, lights, entities, the pak lump as an Archive; KeyValues bench

This commit is contained in:
4DBug committed 2026-11-01 18:53:15 -06:00
1 parent 1c79609ecb
commit 52d2d7ebf9
11 files changed
+1459 -2

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
# Docs inputs for the Source engine sections of the scene page (tools/fixtures.py; tools/docs_check.py explains the
# inputs): the CS:GO-style VBSP of tools/fixtures/vbsp.py (srctools-saved, static props v11).
# tests/gen/docs_source.luau { files = { [name] = bytes }, vars = { vbspBytes = "room.bsp", ... } }
import importlib.util, json, os
INPUTS = ["tools/docs_check.py", "tools/fixtures/vbsp.py"]
def mod(ctx, name):
spec = importlib.util.spec_from_file_location("fx_" + name, os.path.join(ctx.root, "tools", name + ".py") if name == "docs_check" else os.path.join(ctx.root, "tools", "fixtures", name + ".py"))
m = importlib.util.module_from_spec(spec)
spec.loader.exec_module(m)
return m
def generate(ctx):
res = json.loads(ctx.python(["srctools"], mod(ctx, "vbsp").CODE))
files = {"room.bsp": next(bytes.fromhex(c["data"]) for c in res["cases"] if c["name"] == "csgo")}
mod(ctx, "docs_check").emit_inputs(ctx, files, {"vbspBytes": "room.bsp"})