feat(sonar): add SAND terrain material
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
41c86a408e
commit
fdbfd773e2
2 files changed
+17
-2
No files matched your search
@@ -20,7 +20,7 @@ const SonarAcquisitionPort = preload(
|
||||
)
|
||||
const SonarService = preload("res://game/application/sonar/sonar_service.gd")
|
||||
|
||||
const TEST_COUNT := 32
|
||||
const TEST_COUNT := 34
|
||||
|
||||
var _failures: Array[String] = []
|
||||
|
||||
@@ -76,6 +76,16 @@ func _test_sample_buffer_contract() -> void:
|
||||
true
|
||||
)
|
||||
_expect(sample.validation_error().is_empty(), "observed typed sample is valid")
|
||||
var sand_sample := SonarSample.new(
|
||||
Vector3(2.0, -4.0, 9.0),
|
||||
Vector3.UP,
|
||||
0.4,
|
||||
-4.0,
|
||||
SonarMaterial.Value.SAND,
|
||||
true
|
||||
)
|
||||
_expect(sand_sample.validation_error().is_empty(), "sand is a valid terrain material")
|
||||
_expect(SonarMaterial.is_valid(SonarMaterial.Value.SAND), "sand is inside the material range")
|
||||
var buffer := SonarSampleBuffer.new(3, 2)
|
||||
_expect(buffer.set_sample(1, 2, sample).is_empty(), "sample writes inside buffer bounds")
|
||||
_expect(buffer.observed_count() == 1, "buffer counts observed cells")
|
||||
|
||||
Reference in new issue
Block a user