P24-02: 操作と通知の全受入

This commit is contained in:
Agent Control Runner
2026-10-17 14:49:39 +09:00
parent bd3a134051
commit 78f7cba7a9
30 changed files with 4729 additions and 38 deletions
+25
View File
@@ -133,6 +133,31 @@ func _run() -> void:
_expect(not preview.modal_input_blocked, "Modal close unblocks behind-dialog input")
_expect(main.manual_save_path == initial_manual_path, "Modal cancellation preserves existing save identity")
# Defense dialog uses the ordinary visibility callback and real model.
main.call(&"_show_defense_manager")
await process_frame
_expect(preview.modal_input_blocked, "Defense dialog blocks map input on open")
preview.set_build_definition(reception_def, 0)
var defense_before: Dictionary = runtime.create_snapshot()
var defense_selection := [preview.selected_entity_id, staff_panel.selected_staff_id,
main.get("_selected_entity_id"), main.get("_selected_entity_kind")]
var behind_click := InputEventMouseButton.new()
behind_click.button_index = MOUSE_BUTTON_LEFT
behind_click.pressed = true
behind_click.position = Vector2(200, 200)
preview._gui_input(behind_click)
preview._drop_data(Vector2.ZERO, drop_payload)
_expect(SimulationDigest.compute(defense_before) == SimulationDigest.compute(runtime.create_snapshot()),
"Defense modal build/drop attempts preserve complete model including economy ledger")
_expect(defense_selection == [preview.selected_entity_id, staff_panel.selected_staff_id,
main.get("_selected_entity_id"), main.get("_selected_entity_kind")],
"Defense modal build/drop attempts preserve map and staff selections")
preview.clear_build_definition()
var defense_dialog: AcceptDialog = main.get("defense_manager")
defense_dialog.hide()
await process_frame
_expect(not preview.modal_input_blocked, "Defense dialog close unblocks map input")
# Pause freezes simulation via process_real_delta/accumulator; ordinary resume continues exactly once
var clock_paused_before: bool = bool(clock.get("paused"))
clock.set_paused(true)