Prevent hidden CCS opening overlays
This commit is contained in:
@@ -435,6 +435,7 @@ func on_show(payload: Variant = null) -> void:
|
||||
|
||||
func on_hide() -> void:
|
||||
timer.stop()
|
||||
opening_active = false
|
||||
_dismiss_dialogs()
|
||||
|
||||
|
||||
@@ -458,6 +459,12 @@ func _ccs_dialogs() -> Array[Window]:
|
||||
|
||||
|
||||
func _render() -> void:
|
||||
# This screen stays subscribed to the shared CCS attempt while hidden.
|
||||
# Never allow its Window-based dialogs to appear over CCS Cases 2.
|
||||
if not visible:
|
||||
opening_active = false
|
||||
_dismiss_dialogs()
|
||||
return
|
||||
var attempt: Dictionary = CCSService.attempt
|
||||
if attempt.is_empty():
|
||||
return
|
||||
|
||||
@@ -66,7 +66,15 @@ func _run() -> void:
|
||||
_assert(player.time_dialog.visible, "CCS dialog lifecycle test should begin with an open popup")
|
||||
player.on_hide()
|
||||
_assert(not player.time_dialog.visible, "hiding the CCS screen should dismiss popup windows")
|
||||
player.visible = false
|
||||
ccs_service.attempt.openingCompleted = false
|
||||
player._render()
|
||||
await process_frame
|
||||
_assert(not player.intro_dialog.visible, "a hidden classic player must not open dialogs over CCS Cases 2")
|
||||
_assert(not player.opening_active, "a hidden classic player must not begin its opening sequence")
|
||||
|
||||
player.visible = true
|
||||
ccs_service.attempt.openingCompleted = true
|
||||
ccs_service.attempt.state = "final_orders"
|
||||
player._render()
|
||||
_assert(player.final_orders_notice.visible, "final-orders mode should show instructions")
|
||||
|
||||
Reference in New Issue
Block a user