Fix Placement-phase move attempts; case-insensitive player ID matching; hand debug
- Block unit selection in Placement phase (prevents sending game.move_unit when opponent hasn't placed yet) - All accountId comparisons now case-insensitive (Guid serialization may differ between auth response and state DTO) - Add debug log in _on_state_updated: phase, player found, hand size Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -238,7 +238,7 @@ func _apply_state_from_payload(p: Variant) -> void:
|
||||
|
||||
func _player_by_id(account_id: String) -> Dictionary:
|
||||
for p: Dictionary in state.get("players", []):
|
||||
if str(p.get("accountId", "")) == account_id:
|
||||
if str(p.get("accountId", "")).to_lower() == account_id.to_lower():
|
||||
return p
|
||||
return {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user