fix(client): address PR #47 review — murmur deferral, zone extraction, 6 tests
Remove premature Voice/VoiceConversation from SOUND_EVENT_ASSETS (D-072 defers murmur to end-to-end sprint). Extract current_zone_id in GameState.apply_snapshot() as first-class field, eliminating O(N) tile scan in main.gd (D-020 server-authoritative). Add dir.list_dir_end() after registry scan. Add rapid zone-crossing + _load_prefs() roundtrip tests. Enhance comments on hub/workplace same-asset pattern, station base hum, and confrontation dip replacement semantics. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+3
-11
@@ -254,19 +254,11 @@ func _play_recognition_chimes() -> void:
|
||||
_known_recognition_ids.erase(eid)
|
||||
|
||||
|
||||
# D-073 (#529): Zone ambient crossfade — read zone_id from player's current tile.
|
||||
# D-073 (#529): Zone ambient crossfade — reads zone_id from GameState.current_zone_id
|
||||
# (extracted in apply_snapshot(), server-authoritative per D-020).
|
||||
# Calls AudioManager.set_zone() when zone changes (AudioManager handles crossfade).
|
||||
# zone_id field is server-authoritative; missing field treated as empty (no zone).
|
||||
func _update_zone() -> void:
|
||||
var px := int(GameState.player_position.x)
|
||||
var py := int(GameState.player_position.y)
|
||||
var zone: String = ""
|
||||
for tile in GameState.visible_tiles:
|
||||
if not tile is Dictionary:
|
||||
continue
|
||||
if tile.get("x") == px and tile.get("y") == py:
|
||||
zone = tile.get("zone_id", "")
|
||||
break
|
||||
var zone := GameState.current_zone_id
|
||||
if zone != _current_zone:
|
||||
_current_zone = zone
|
||||
AudioManager.set_zone(zone)
|
||||
|
||||
Reference in New Issue
Block a user