feat: complete playtest parity improvements

This commit is contained in:
goose
2026-10-08 19:06:19 -04:00
parent cce25a1908
commit eca098b4b9
139 changed files with 3001 additions and 982 deletions
+15 -11
View File
@@ -12,24 +12,28 @@ func before_each() -> void:
func test_minimap_crops_to_player_camera_fov_and_never_reveals_hidden_threats() -> void:
var minimap := game.get_node_or_null("HUD/Minimap") as Minimap
var state := game.get_game_state()
var hidden_threat_cell := Vector2i(24, 8)
var enemy := ActorState.new(&"goblin", hidden_threat_cell, 6, 2)
state.enemies[enemy.id] = enemy
game.sync_presentation_for_testing()
assert_not_null(minimap)
assert_eq(minimap.get_camera_cell(), state.player.cell)
assert_true(minimap.get_displayed_cells().has(state.player.cell))
assert_false(minimap.get_displayed_cells().has(Vector2i(29, 19)))
assert_eq(minimap.get_cell_visibility_state(Vector2i(29, 19)), &"unknown")
assert_false(minimap.get_threat_marker_cells().has(Vector2i(24, 8)))
assert_false(minimap.get_displayed_cells().has(Vector2i(41, 15)))
assert_eq(minimap.get_cell_visibility_state(Vector2i(41, 15)), &"unknown")
assert_false(minimap.get_threat_marker_cells().has(hidden_threat_cell))
state.player.cell = Vector2i(24, 8)
state.player.cell = hidden_threat_cell
state.update_exploration()
game.sync_presentation_for_testing()
assert_eq(minimap.get_camera_cell(), Vector2i(24, 8))
assert_true(minimap.get_displayed_cells().has(Vector2i(24, 8)))
assert_false(minimap.get_displayed_cells().has(Vector2i(4, 12)))
assert_true(minimap.get_threat_marker_cells().has(Vector2i(24, 8)))
assert_eq(minimap.get_camera_cell(), hidden_threat_cell)
assert_true(minimap.get_displayed_cells().has(hidden_threat_cell))
assert_false(minimap.get_displayed_cells().has(Vector2i(4, 7)))
assert_true(minimap.get_threat_marker_cells().has(hidden_threat_cell))
state.visible_cells.erase(Vector2i(24, 8))
state.explored_cells[Vector2i(24, 8)] = true
state.visible_cells.erase(hidden_threat_cell)
state.explored_cells[hidden_threat_cell] = true
game.sync_presentation_for_testing()
assert_false(minimap.get_threat_marker_cells().has(Vector2i(24, 8)))
assert_false(minimap.get_threat_marker_cells().has(hidden_threat_cell))