big
This commit is contained in:
@@ -106,6 +106,22 @@ func _process(_delta: float) -> bool:
|
||||
_check(Acoustics.classify(crate) == "wood", "name-based classify: crate -> wood")
|
||||
crate.free()
|
||||
|
||||
# An UNKNOWN acoustic_material must degrade to concrete, not throw.
|
||||
# Sakura Crossing tagged its ballast "gravel" before gravel existed in
|
||||
# MATERIALS, and every hitscan impact on it took down occlusion() from
|
||||
# inside the audio path — a level builder's typo must never be able to
|
||||
# stop the game making sound.
|
||||
var odd := StaticBody3D.new()
|
||||
odd.name = "OddSurface"
|
||||
odd.set_meta("acoustic_material", "unobtainium")
|
||||
_check(Acoustics.classify(odd) == "concrete",
|
||||
"unknown acoustic_material falls back to concrete")
|
||||
odd.free()
|
||||
|
||||
# And every material the level builders actually use must resolve.
|
||||
for m in ["concrete", "wood", "metal", "glass", "brick", "gravel", "grass"]:
|
||||
_check(Acoustics.MATERIALS.has(m), "MATERIALS defines '%s'" % m)
|
||||
|
||||
print("=== Acoustics results: %s ===" % ("ALL PASSED" if _fails == 0 else "%d FAILED" % _fails))
|
||||
return true
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user