Fix clam spurt origin artifact (#118)

This commit is contained in:
Alexander Sellite 2026-08-29 17:41:10 -04:00
parent f910e6bdbb
commit ae802493a0
2 changed files with 42 additions and 4 deletions

View file

@ -16,6 +16,10 @@ const CalendarSeasonType = preload("res://world/calendar_season.gd")
func _initialize() -> void:
call_deferred(&"_run")
func _run() -> void:
assert(NetworkProtocol.PROTOCOL_VERSION == 11)
assert(
NetworkWorldSpawnProtocol.CAPABILITY
@ -23,7 +27,7 @@ func _initialize() -> void:
)
assert(NetworkWorldSpawnProtocol.SNAPSHOT_ENTITIES_PER_ENVELOPE <= 4)
_validate_catalog_statuses()
_validate_billboard_presentation()
await _validate_billboard_presentation()
_validate_envelopes()
print("World spawn protocol validation: PASS")
quit()
@ -148,8 +152,27 @@ func _validate_billboard_presentation() -> void:
assert(not sprite.shaded)
gatherable.free()
var unconfigured_hotspot := WorldGatherableType.new()
unconfigured_hotspot.call("_ensure_water_spurt_visual")
assert(
unconfigured_hotspot.get_node_or_null(
"WaterSpurt/WaterDroplets"
) == null
)
unconfigured_hotspot.free()
var clam: GatherableData = Gatherables.get_entry(&"clam_manila")
assert(clam != null)
var hotspot := WorldGatherableType.new()
hotspot.call("_ensure_water_spurt_visual")
root.add_child(hotspot)
var configured_position := Vector3(24.0, 0.3, -11.0)
hotspot.configure(
"world:clam-presentation-regression",
clam,
configured_position,
0.0,
)
assert(hotspot.global_position.is_equal_approx(configured_position))
var hole := hotspot.get_node("WaterSpurt/BurrowMark") as MeshInstance3D
assert(hole != null)
assert(hole.cast_shadow == GeometryInstance3D.SHADOW_CASTING_SETTING_OFF)
@ -158,6 +181,18 @@ func _validate_billboard_presentation() -> void:
assert(hole_material.shading_mode == BaseMaterial3D.SHADING_MODE_UNSHADED)
assert(hole_material.transparency == BaseMaterial3D.TRANSPARENCY_DISABLED)
assert(is_equal_approx(hole_material.albedo_color.a, 1.0))
var particles := hotspot.get_node(
"WaterSpurt/WaterDroplets"
) as CPUParticles3D
assert(particles != null and particles.emitting)
assert(particles.local_coords)
assert(particles.global_position.is_equal_approx(
configured_position + Vector3.UP * 0.035
))
hotspot.set_process(false)
await create_timer(0.6).timeout
await process_frame
assert(hotspot.get_node_or_null("WaterSpurt/WaterDroplets") == null)
hotspot.queue_free()