Save The Tree implementation and acceptance work in progress

Preserve production code, regression fixtures, audio assets and provenance, test infrastructure, and the original-completion plan and progress ledger. Final game and Windows acceptance remain pending; excluded local artifacts and native experiments are not part of this snapshot.
This commit is contained in:
Takeshi
2026-10-11 15:58:00 +09:00
parent 39f6068461
commit b84bade045
235 changed files with 495831 additions and 312 deletions
+12 -5
View File
@@ -76,13 +76,14 @@ func drain_ready(current_tick: int) -> Array[SimulationCommand]:
break
_pending.pop_front()
_in_flight[command.command_id] = command
ready.append(command)
ready.append(command.copy())
return ready
func execute_ready(current_tick: int, executor: Callable) -> Array[CommandResult]:
var results: Array[CommandResult] = []
for command in drain_ready(current_tick):
var accepted_command_id := command.command_id
var result: CommandResult
if not executor.is_valid():
result = CommandResult.failed(
@@ -103,10 +104,8 @@ func execute_ready(current_tick: int, executor: Callable) -> Array[CommandResult
"Executor did not return a successful CommandResult."
)
if result.command_id == 0:
result.command_id = command.command_id
complete(command.command_id, result)
results.append(result.copy())
var completed_result := complete(accepted_command_id, result)
results.append(completed_result)
return results
@@ -164,6 +163,14 @@ func processed_count() -> int:
return _processed_results.size()
## Read only pending commands, without serializing the processed history.
func get_pending_commands() -> Array[SimulationCommand]:
var result: Array[SimulationCommand] = []
for command: SimulationCommand in _pending:
result.append(command.copy())
return result
func get_accepted_command_metadata() -> Array[Dictionary]:
var result: Array[Dictionary] = []
var command_ids: Array = _accepted_metadata.keys()