extends Node3D

const DIALOG_PATH = "res://dialogs/timelines/2_aqua/2_aqua_arrival.dtl"

func _ready():
    if not Engine.is_editor_hint():
        Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
    
    %AiReceptacle.screen_turned_on = true
    %AiReceptacle.interactable = true
    SteamConnection.unlock_achievement(SteamConnection.ACH_STW_REACH_AQUA_BASE)

func _on_ai_receptacle_clicked():
    %AiReceptacle.screen_turned_on = false
    %AiReceptacle.interactable = false

    Dialogic.start(DIALOG_PATH)

    await Dialogic.timeline_ended
    
    %Exit3dDoor.to_scene = RelayBaseScene.new(
        "AQUA_BASE",
        "005",
    )
    %Exit3dDoor.interactable = true

    AudioManager.play_sfx("DoorOpen")
