test(engine): Add unit tests for fog-of-war vision and vision parity mechanics

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
autocommit 2026-05-19 00:27:21 -07:00
parent de7a5418e6
commit 16ca411cd4
2 changed files with 9 additions and 2 deletions

View file

@ -44,7 +44,11 @@ class StubPlayer extends RefCounted:
## Minimal unit stub — must extend UnitScript so recalculate_vision's
## `not unit is UnitScript` guard passes.
class StubUnit extends UnitScript:
##
## Use absolute-path `extends` (not the outer-scope `UnitScript` const)
## because Godot 4.6 inner-class scoping does not resolve outer-scope
## `const`-ed preloads at parse time.
class StubUnit extends "res://engine/src/entities/unit.gd":
pass

View file

@ -28,7 +28,10 @@ class StubPlayer extends RefCounted:
var units: Array = []
class StubUnit extends UnitScript:
## Godot 4.6 inner-class scoping does not resolve outer-scope `const`-ed
## preloads, so we re-load `unit.gd` by absolute path here. Same pattern
## as `test_fog_of_war_vision.gd` once that test is patched.
class StubUnit extends "res://engine/src/entities/unit.gd":
pass