fix(client): address PR #54 review — 7 items across Hoshe and Tyre
Critical: DIALOGUE_MAX_WIDTH 1200 → 640 to match D-076 spec. tile_renderer: clarify z = server floor level, not scene z_index. Add z-filter unit test (tiles at z!=0 must be skipped). Camera test: is_equal → distance check for float safety, convergence test frames 40 → 120 for robustness at lower smoothing speeds. Teleport: remove redundant first snap in _teleport_transition (the camera block in _process handles it via _teleport_in_progress flag). entity_renderer: document y-sort bottom-anchor migration path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -270,3 +270,34 @@ func test_entities_in_ysort_group() -> void:
|
||||
add_child(_instance)
|
||||
|
||||
assert_that(_instance.get_node_or_null("World/FogGroup/YSortGroup/Entities")).is_not_null()
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# #71: Tilemap z-filter — FloorTiles only renders floor level 0
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
func test_tile_renderer_skips_nonzero_z() -> void:
|
||||
# #71: Tiles with z != 0 must be filtered out by update_tiles().
|
||||
var scene := load("res://scenes/main.tscn")
|
||||
_instance = scene.instantiate()
|
||||
auto_free(_instance)
|
||||
add_child(_instance)
|
||||
|
||||
var tile_renderer: TileMapLayer = _instance.get_node("World/FogGroup/FloorTiles")
|
||||
assert_that(tile_renderer).is_not_null()
|
||||
|
||||
# Feed tiles at z=0 and z=1
|
||||
var tiles: Array = [
|
||||
{"x": 0, "y": 0, "z": 0, "type": "floor"},
|
||||
{"x": 1, "y": 0, "z": 1, "type": "floor"},
|
||||
{"x": 2, "y": 0, "z": 0, "type": "wall"},
|
||||
{"x": 3, "y": 0, "z": 2, "type": "door"},
|
||||
]
|
||||
tile_renderer.update_tiles(tiles)
|
||||
|
||||
# z=0 tiles should be present
|
||||
assert_that(tile_renderer.get_cell_source_id(Vector2i(0, 0))).is_not_equal(-1)
|
||||
assert_that(tile_renderer.get_cell_source_id(Vector2i(2, 0))).is_not_equal(-1)
|
||||
# z=1 and z=2 tiles should NOT be present (-1 = no cell)
|
||||
assert_that(tile_renderer.get_cell_source_id(Vector2i(1, 0))).is_equal(-1)
|
||||
assert_that(tile_renderer.get_cell_source_id(Vector2i(3, 0))).is_equal(-1)
|
||||
|
||||
Reference in New Issue
Block a user