Restrict progression features to UAT

This commit is contained in:
hz
2026-08-04 08:08:47 -05:00
parent c140b9a96c
commit 976cb70d4a
13 changed files with 216 additions and 37 deletions
+10 -3
View File
@@ -1,6 +1,7 @@
extends VBoxContainer
const Style := preload("res://scripts/ui/ui_style.gd")
const FeatureFlags := preload("res://scripts/config/feature_flags.gd")
var main: Control
var selected_system := "All Systems"
@@ -14,6 +15,7 @@ var targeted_setup := false
var goal_option: OptionButton
var target_label: Label
var pending_launch := false
var goal_row: HBoxContainer
func _ready() -> void:
set_anchors_preset(Control.PRESET_FULL_RECT)
@@ -32,7 +34,8 @@ func _ready() -> void:
Style.set_label(system_label, 22, Style.CYAN)
add_child(system_label)
var goal_row := HBoxContainer.new()
goal_row = HBoxContainer.new()
goal_row.visible = FeatureFlags.progression_enabled()
var goal_label := Label.new()
goal_label.text = "Finish line"
goal_row.add_child(goal_label)
@@ -88,7 +91,7 @@ func _ready() -> void:
func on_show(payload: Variant = null) -> void:
if typeof(payload) == TYPE_DICTIONARY:
if typeof(payload) == TYPE_DICTIONARY and FeatureFlags.progression_enabled():
targeted_setup = bool(payload.get("mastery_target", false))
selected_system = str(payload.get("step3_system", "All Systems"))
requested_count = int(payload.get("question_count", 10))
@@ -102,7 +105,7 @@ func on_show(payload: Variant = null) -> void:
else:
goal_option.set_meta("mastery_target", false)
targeted_setup = false
selected_system = str(payload) if payload != null else "All Systems"
selected_system = str(payload.get("step3_system", "All Systems")) if typeof(payload) == TYPE_DICTIONARY else (str(payload) if payload != null else "All Systems")
_refresh_setup()
@@ -130,6 +133,10 @@ func _start_block() -> void:
if not QuestionBankService.has_questions():
status_label.text = "Questions have not loaded from the API yet."
return
if not FeatureFlags.progression_enabled():
BlockSessionService.start_block(selected_system, int(size_spin.value), mode_option.get_item_text(mode_option.selected))
main.show_screen("player")
return
pending_launch = true
start_button.disabled = true
status_label.text = "Preparing your study goal..."