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:
parent
de7a5418e6
commit
16ca411cd4
2 changed files with 9 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue