Move simulation history into profile
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
extends SceneTree
|
||||
|
||||
var failures := 0
|
||||
|
||||
|
||||
func _initialize() -> void:
|
||||
var history = load("res://scripts/ui/simulation_history.gd")
|
||||
_assert(history._action_for_state("completed") == "results", "completed simulations should open results")
|
||||
_assert(history._action_for_state("block_active") == "resume", "active blocks should resume")
|
||||
_assert(history._action_for_state("between_blocks") == "resume", "between-block simulations should resume")
|
||||
_assert(history._action_for_state("abandoned") == "none", "abandoned simulations should be read-only")
|
||||
quit(1 if failures > 0 else 0)
|
||||
|
||||
|
||||
func _assert(condition: bool, message: String) -> void:
|
||||
if condition:
|
||||
return
|
||||
failures += 1
|
||||
push_error(message)
|
||||
@@ -0,0 +1 @@
|
||||
uid://babu2x7xudmxc
|
||||
Reference in New Issue
Block a user