fix(client): address PR review warnings — field guard + public API rename

- main.gd: add has("entity_id") guard to _play_recognition_chimes()
  (matches defensive pattern in _play_close_sound_events and update_sound_events)
- sound_indicator_renderer.gd: rename _color_for_type → color_for_type
  (public testable API, not an internal-only method)
- test_rendering.gd: update test calls to match rename

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 15:03:10 +01:00
co-authored by Claude Opus 4.6
parent f337bb3ca8
commit e1a1a9cfc2
3 changed files with 13 additions and 11 deletions
+2
View File
@@ -220,6 +220,8 @@ func _play_close_sound_events() -> void:
func _play_recognition_chimes() -> void:
var active_ids: Dictionary = {}
for rec in GameState.pending_recognitions:
if not rec is Dictionary or not rec.has("entity_id"):
continue
var eid: int = rec.entity_id
active_ids[eid] = true
if not _known_recognition_ids.has(eid):