Record original-alignment implementation and traceability checkpoint
Capture current source, content data, tests, asset licenses, and original-specification traceability. Original implementation remains incomplete. The accepted matching UI generation passed 154 suites and 12,253 checks, with eight rendered staff-contract screens reviewed. Latest native Windows and full-original acceptance remain outstanding.
This commit is contained in:
+22
-3
@@ -9,6 +9,7 @@ func _initialize() -> void:
|
||||
func _run() -> void:
|
||||
print("The Tree: automated checks")
|
||||
_test_game_clock()
|
||||
_test_original_clock_scale()
|
||||
_test_game_state()
|
||||
_test_facility_data()
|
||||
load("res://tests/s0/test_kernel_and_save.gd").run(Callable(self, "_expect"))
|
||||
@@ -25,14 +26,32 @@ func _test_game_clock() -> void:
|
||||
clock.advance_minutes(4 * 60)
|
||||
_expect(clock.get_hour() == 10, "clock advances to 10:00")
|
||||
_expect(clock.get_phase() == clock.Phase.DAY, "10:00 is day phase")
|
||||
clock.set_speed(4)
|
||||
_expect(clock.speed == 4, "clock accepts the specified x4 speed")
|
||||
clock.set_speed(3)
|
||||
_expect(clock.speed == 4, "clock rejects unsupported speed values")
|
||||
_expect(clock.speed == 3, "clock accepts the original x3 speed")
|
||||
clock.set_speed(4)
|
||||
_expect(clock.speed == 3, "clock rejects unsupported x4")
|
||||
_expect(clock.REAL_SECONDS_PER_GAME_HOUR == 10.0, "original scale is ten seconds per game hour")
|
||||
clock.advance_minutes(14 * 60)
|
||||
_expect(clock.day == 2 and clock.get_hour() == 0, "midnight starts the next day")
|
||||
clock.free()
|
||||
|
||||
func _test_original_clock_scale() -> void:
|
||||
var clock := SimulationKernel.new()
|
||||
for multiplier: int in [1, 2, 3]:
|
||||
clock.reset()
|
||||
clock.set_speed(multiplier)
|
||||
for frame in 600:
|
||||
clock.process_real_delta(1.0 / 60.0)
|
||||
_expect(clock.absolute_minute == 360 + 60 * multiplier, "ten real seconds produce one hour at x%d" % multiplier)
|
||||
clock.set_paused(true)
|
||||
var minute := clock.absolute_minute
|
||||
clock.process_real_delta(10.0)
|
||||
_expect(clock.absolute_minute == minute, "pause preserves game time")
|
||||
var legacy := clock.clock_snapshot()
|
||||
legacy[&"speed"] = 4
|
||||
_expect(clock.restore_clock(legacy) and clock.speed == 3, "legacy x4 resumes at x3")
|
||||
clock.free()
|
||||
|
||||
func _test_game_state() -> void:
|
||||
var state = load("res://autoload/game_state.gd").new()
|
||||
state.reset()
|
||||
|
||||
Reference in New Issue
Block a user