test(@projects/@magic-civilization): 🐛 update stale fog tests (vellum texture + non-gated resource)
- test_fog_renderer: unexplored tiles render the procedural dwarven-vellum
texture with a white modulate (commit 30bcde26d); UNEXPLORED_COLOR is only the
flat fallback. Assert the texture is applied + white verts, not flat colour.
- test_fog_of_war: is_resource_visible_to used iron_ore, which is
visibility:tech_gated (yield_gate "bronze_working") — so it also needs the
tech + a GameState player. Use deer (non-gated) to isolate the visibility gate
the test actually targets.
GUT: fog cluster cleared (716 passing / 11 failing).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
eb833ee9b3
commit
b064f7cd87
2 changed files with 10 additions and 4 deletions
|
|
@ -137,12 +137,16 @@ func test_unseen_tiles_polygon_is_visible_and_unexplored_color() -> void:
|
|||
assert_not_null(node, "missing fog polygon for UNSEEN tile %s" % str(unseen_pos))
|
||||
assert_true(node.visible,
|
||||
"VIS_UNSEEN tile %s must have fog polygon visible" % str(unseen_pos))
|
||||
# Unexplored tiles render the procedural dwarven-vellum texture with a white
|
||||
# modulate so the texture's own tones show (commit 0cfd60124).
|
||||
# UNEXPLORED_COLOR is only the flat fallback when texture generation fails.
|
||||
assert_not_null(node.texture, "interior UNSEEN tile must paint the vellum fog texture")
|
||||
var colors: PackedColorArray = node.vertex_colors
|
||||
assert_eq(colors.size(), 6, "fog polygon must have 6 vertex colors")
|
||||
for i: int in 6:
|
||||
var c: Color = colors[i]
|
||||
assert_eq(c, FogRendererScript.UNEXPLORED_COLOR,
|
||||
"interior UNSEEN tile vertex %d must be UNEXPLORED_COLOR (no neighbor softening)" % i)
|
||||
assert_eq(c, Color(1, 1, 1, 1),
|
||||
"textured UNSEEN vertex %d uses white modulate (texture supplies the colour)" % i)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -146,9 +146,11 @@ func test_vision_memory_layer_persists() -> void:
|
|||
|
||||
func test_resource_visible_to_requires_seen_tile() -> void:
|
||||
## is_resource_visible_to must return false for VIS_UNSEEN tiles,
|
||||
## true for VIS_SEEN_STALE and VIS_VISIBLE (assuming no tech gate).
|
||||
## true for VIS_SEEN_STALE and VIS_VISIBLE. Use a NON-tech-gated resource
|
||||
## (deer) so this isolates the visibility gate; iron_ore is yield_gate=
|
||||
## "bronze_working" (visibility: tech_gated) and would also require the tech.
|
||||
var tile: Tile = TileScript.new()
|
||||
tile.resource_id = "iron_ore"
|
||||
tile.resource_id = "deer"
|
||||
tile.biome_id = "plains"
|
||||
|
||||
# Unseen — should not be visible.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue