Endless location generation
All checks were successful
Deploy Promiscuity Auth API / deploy (push) Successful in 45s
Deploy Promiscuity Character API / deploy (push) Successful in 45s
Deploy Promiscuity Locations API / deploy (push) Successful in 46s
k8s smoke test / test (push) Successful in 7s

This commit is contained in:
Zeeshaun 2026-03-13 21:55:18 -05:00
parent e79f473ce4
commit 9809869cbe

View File

@ -29,6 +29,8 @@ var _character_id := ""
var _persisted_coord := Vector2i.ZERO var _persisted_coord := Vector2i.ZERO
var _coord_sync_in_flight := false var _coord_sync_in_flight := false
var _queued_coord_sync: Variant = null var _queued_coord_sync: Variant = null
var _locations_refresh_in_flight := false
var _queued_locations_refresh := false
func _ready() -> void: func _ready() -> void:
@ -63,8 +65,8 @@ func _process(_delta: float) -> void:
if target_coord == _center_coord: if target_coord == _center_coord:
return return
_center_coord = target_coord _center_coord = target_coord
_rebuild_tiles(_center_coord)
_queue_coord_sync(_center_coord) _queue_coord_sync(_center_coord)
_queue_locations_refresh()
func _get_stream_position() -> Vector3: func _get_stream_position() -> Vector3:
@ -208,6 +210,7 @@ func _selected_location_name(coord: Vector2i) -> String:
func _load_existing_locations() -> void: func _load_existing_locations() -> void:
_locations_refresh_in_flight = true
_locations_loaded = false _locations_loaded = false
_known_locations.clear() _known_locations.clear()
@ -268,6 +271,28 @@ func _load_existing_locations() -> void:
push_warning("Visible locations request succeeded but returned 0 locations for character %s." % _character_id) push_warning("Visible locations request succeeded but returned 0 locations for character %s." % _character_id)
_locations_loaded = true _locations_loaded = true
_locations_refresh_in_flight = false
_rebuild_tiles(_center_coord)
if _queued_locations_refresh:
_queued_locations_refresh = false
_queue_locations_refresh()
func _queue_locations_refresh() -> void:
if _locations_refresh_in_flight:
_queued_locations_refresh = true
return
_refresh_visible_locations()
func _refresh_visible_locations() -> void:
if _character_id.is_empty():
return
_refresh_visible_locations_async()
func _refresh_visible_locations_async() -> void:
await _load_existing_locations()
func _queue_coord_sync(coord: Vector2i) -> void: func _queue_coord_sync(coord: Vector2i) -> void: