minor bug fixes

This commit is contained in:
dingo
2026-04-14 11:07:56 -04:00
parent ad6ae689ed
commit 144ad84cac
2 changed files with 8 additions and 6 deletions
+4 -2
View File
@@ -402,7 +402,8 @@ func _player_by_id(account_id: String) -> Dictionary:
func _apply_delta(delta: Dictionary) -> void:
# Helper: dict.get(key, default) returns null (not default) when the key exists with value null.
# Use 'is Array' / 'is Dictionary' guards so typed assignment never receives null.
print("DELTA: ", delta)
if debug_output:
print("DELTA: ", delta)
# 1. Changed tiles
var changed_tiles = delta.get("changedTiles")
if changed_tiles is Array:
@@ -623,7 +624,8 @@ func _on_server_push(type: String, payload: Variant) -> void:
% [_state_version, v])
_fetch_state()
return
print("[Delta] ", delta)
if debug_output:
print("[Delta] ", delta)
_apply_delta(delta)
"game.over":