fix(client): address PR #30 review — 9 items from Hoshe and Tyre
- Add SimBridge._last_snapshot = null to P3 before_test() (contamination risk) - Clarify mono.is_visible is custom property, not CanvasItem builtin - Camera smoothing test uses approximate equality instead of exact - Propagate inner _encode_message errors in array/dict encoding - Add explanatory comment on int_64 encoder branch - Document unfalsifiable gauntlet guard as intentional future-proof - Remove loose D-053 citation from LERP_SPEED pin - Assert FogOverlay is sibling of FogGroup under World - Add CANVAS_MODAL=30 (ModalLayer) assertion in P3-Z04 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -80,7 +80,10 @@ func test_camera_smoothing_convergence() -> void:
|
||||
for i in 5:
|
||||
inst._process(0.016)
|
||||
var expected := GameState.player_position * Constants.TILE_SIZE
|
||||
assert_that(camera.global_position).is_equal(expected)
|
||||
var dist := camera.global_position.distance_to(expected)
|
||||
assert_that(dist < 0.1).override_failure_message(
|
||||
"Camera should converge to player position (dist: %.4f)" % dist
|
||||
).is_true()
|
||||
|
||||
|
||||
func test_camera_viewport_tracks_player_position() -> void:
|
||||
@@ -191,6 +194,10 @@ func test_entity_player_color_regardless_of_sector() -> void:
|
||||
|
||||
func test_monologue_display_visible_hidden() -> void:
|
||||
# P2-U01: MonologueDisplay starts hidden, becomes visible after show_monologue.
|
||||
# Note: mono.is_visible is a custom bool property on MonologueDisplay
|
||||
# (monologue_display.gd:11), not the built-in CanvasItem.is_visible() method.
|
||||
# The monologue uses tween alpha for visual hide/show, so the built-in
|
||||
# .visible stays true — we test the script's own state tracking.
|
||||
var inst := _make_scene()
|
||||
var mono = inst.get_node("UILayer/MonologueDisplay")
|
||||
assert_that(mono.is_visible).override_failure_message(
|
||||
|
||||
Reference in New Issue
Block a user