Fix simulation script diagnostics

This commit is contained in:
hz
2026-07-14 17:23:24 -05:00
parent 206a5c0124
commit 51ce9f2e88
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -277,13 +277,13 @@ func _on_simulation_failed(message: String) -> void:
func _refresh_simulation_state() -> void:
if simulation_button == null:
return
var ready := bool(ExamSimulationService.readiness.get("ready", false))
var simulation_ready := bool(ExamSimulationService.readiness.get("ready", false))
var active := bool(ExamSimulationService.readiness.get("hasActiveSimulation", false)) or not ExamSimulationService.simulation.is_empty() and str(ExamSimulationService.simulation.get("state", "")) in ["between_blocks", "block_active"]
var available := int(ExamSimulationService.readiness.get("availableQuestions", 0))
simulation_button.disabled = pending_simulation_launch or (not ready and not active)
simulation_button.text = "Resume Step 3 Day 1 Simulation\nProgress is saved between blocks" if active else "Step 3 Day 1 Simulation\n232 questions | %s" % ("Available" if ready else "%d/232 ready" % available)
simulation_button.disabled = pending_simulation_launch or (not simulation_ready and not active)
simulation_button.text = "Resume Step 3 Day 1 Simulation\nProgress is saved between blocks" if active else "Step 3 Day 1 Simulation\n232 questions | %s" % ("Available" if simulation_ready else "%d/232 ready" % available)
if simulation_status_label != null and not pending_simulation_launch:
simulation_status_label.text = "Full-length, 12-block simulation. Predicted scores are provisional and exclude CCS." if ready or active else "The simulation unlocks when at least 232 published questions are available."
simulation_status_label.text = "Full-length, 12-block simulation. Predicted scores are provisional and exclude CCS." if simulation_ready or active else "The simulation unlocks when at least 232 published questions are available."
func _refresh_bank_state() -> void: