extends Node var emotion: String var dialog_flags : Dictionary = { "history_of_present_illness": [], "appearance": [], "behaviour": [], "speech": [], "thought_process": [], "thought_content": [], "perceptions": [], "insight": [], "sleep": [], "mood": [], "suicidal_ideation": [], } var dialog_tree: Dictionary var marker: Array[int] # Called when the node enters the scene tree for the first time. func _ready() -> void: DialogueManager.got_dialogue.connect(_change_emotion) marker.resize(10) marker.fill(0) func new_patient(dialogue_resource): var Balloon: Resource = preload("res://Dialogues/balloon.tscn") var balloon: Node = Balloon.instantiate() var panel = balloon.get_node("Balloon/Panel") get_tree().current_scene.add_child(balloon) balloon.start(dialogue_resource,"start") panel.size = Vector2(1250, 250) pass func build_dialog_tree(tree_model: Array[int]) -> Dictionary: var branch : Dictionary var tree : Dictionary for branch_id in tree_model: branch = {branch_id: "not_asked"} tree.merge(branch) return tree func _change_emotion(dialogue_line) -> void: var new_emotion = dialogue_line.tags if new_emotion != null: print("Emotion changed to", new_emotion) pass # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: pass