Improve nearby water recovery and camera prompts

Recover players on generated worlds to the nearest safe grass or sand surface. Use the active gameplay camera when positioning shop and storage prompts.
This commit is contained in:
Alexander Sellite 2026-08-29 17:43:11 -04:00
parent ae802493a0
commit 4575830857
10 changed files with 396 additions and 25 deletions

View file

@ -100,6 +100,14 @@ func _validate_world_switching() -> void:
assert(world.get_fishing_shop() != null)
assert(world.get_player_storage() != null)
assert(not world.get_fishable_water_regions().is_empty())
var starter_safe_points := world.get_safe_respawn_points()
assert(not starter_safe_points.is_empty())
var authored_safe_point: SafeRespawnPoint = starter_safe_points.back()
assert(
world.get_water_recovery_position(
authored_safe_point.global_position
).is_equal_approx(authored_safe_point.global_position)
)
assert(world.activate_world(WorldLayout.GENERATED, 24680))
assert(world.get_world_layout() == WorldLayout.GENERATED)
assert(world.get_generation_seed() == 24680)