diff --git a/Art/Patients/patient_564/patient_564.xcf b/Art/Patients/patient_564/patient_564.xcf index 23a30e2..eb46cbc 100644 Binary files a/Art/Patients/patient_564/patient_564.xcf and b/Art/Patients/patient_564/patient_564.xcf differ diff --git a/Art/Patients/patient_564/patient_564_full.png b/Art/Patients/patient_564/patient_564_full.png new file mode 100644 index 0000000..06f8d9d Binary files /dev/null and b/Art/Patients/patient_564/patient_564_full.png differ diff --git a/Art/Patients/patient_564/patient_564_full.png.import b/Art/Patients/patient_564/patient_564_full.png.import new file mode 100644 index 0000000..bbbe064 --- /dev/null +++ b/Art/Patients/patient_564/patient_564_full.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cfh3kumh31oqu" +path="res://.godot/imported/patient_564_full.png-427197587e8d779d455b567f7c735561.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Art/Patients/patient_564/patient_564_full.png" +dest_files=["res://.godot/imported/patient_564_full.png-427197587e8d779d455b567f7c735561.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Art/Patients/patient_564/patient_564_full.xcf b/Art/Patients/patient_564/patient_564_full.xcf new file mode 100644 index 0000000..85a3289 Binary files /dev/null and b/Art/Patients/patient_564/patient_564_full.xcf differ diff --git a/Art/Patients/patient_564/patient_564_neutral.png b/Art/Patients/patient_564/patient_564_neutral.png index 62052a9..0ebee73 100644 Binary files a/Art/Patients/patient_564/patient_564_neutral.png and b/Art/Patients/patient_564/patient_564_neutral.png differ diff --git a/Art/Patients/patient_564/patient_564_smiling.png b/Art/Patients/patient_564/patient_564_smiling.png new file mode 100644 index 0000000..b496e82 Binary files /dev/null and b/Art/Patients/patient_564/patient_564_smiling.png differ diff --git a/Art/Patients/patient_564/patient_564_smiling.png.import b/Art/Patients/patient_564/patient_564_smiling.png.import new file mode 100644 index 0000000..b566c90 --- /dev/null +++ b/Art/Patients/patient_564/patient_564_smiling.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://uau6f4jn3v7j" +path="res://.godot/imported/patient_564_smiling.png-89f34e1d6e52c0aa632dfb7d9c380d76.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Art/Patients/patient_564/patient_564_smiling.png" +dest_files=["res://.godot/imported/patient_564_smiling.png-89f34e1d6e52c0aa632dfb7d9c380d76.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Art/ScreeningDesk.png b/Art/ScreeningDesk.png new file mode 100644 index 0000000..193c805 Binary files /dev/null and b/Art/ScreeningDesk.png differ diff --git a/Art/ScreeningDesk.png.import b/Art/ScreeningDesk.png.import new file mode 100644 index 0000000..ce48f1c --- /dev/null +++ b/Art/ScreeningDesk.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dc2nmwcscjig4" +path="res://.godot/imported/ScreeningDesk.png-b7e3d5e6ea1b84ff18d02e5badc4df09.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Art/ScreeningDesk.png" +dest_files=["res://.godot/imported/ScreeningDesk.png-b7e3d5e6ea1b84ff18d02e5badc4df09.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Art/ScreeningDesk.xcf b/Art/ScreeningDesk.xcf new file mode 100644 index 0000000..df0556e Binary files /dev/null and b/Art/ScreeningDesk.xcf differ diff --git a/Dialogues/Patients/patient_564.dialogue b/Dialogues/Patients/patient_564.dialogue index 3c139a4..4c7cb20 100644 --- a/Dialogues/Patients/patient_564.dialogue +++ b/Dialogues/Patients/patient_564.dialogue @@ -1,240 +1,7 @@ ~ start -do CurrentPatient.marker.fill(0) -set CurrentPatient.dialog_tree = CurrentPatient.build_dialog_tree([1100,1200,1210,1220, 1300, 1400, 1500, 1610, 1620]) +The patient remains still, watching you expectantly. -: The patient remains still, watching you expectantly. - -Psychiatrist: Greetings Mr Orleg. You shall be my in care for the duration of your stay in this facility. - -Mr Orleg: Greetings Doctor. I need your help, i don't know why i'm here, there must have been a mistake ! - -~ day_1_choice_1 - -- Tell me why you were brought here. [if CurrentPatient.dialog_tree[1100] == "not_asked"] - - set CurrentPatient.dialog_tree[1100] = "asked" - do CurrentPatient.marker[0] += 1 - do CurrentPatient.change_emotion("neutral") - do CurrentPatient.dialog_flags["insight"].append("Anosognosia") - - Mr Orleg: Sure. I was at the usual grocery store next door, and there was that cashier who was threatening me. I was busy explaining her nobody can talk to Mr Orleg this way, when these damned cops came out of nowhere and brutally restrained me ! Can you imagine ?! - - => day_1_choice_1 - -- Do you feel safe in this room ? [if CurrentPatient.dialog_tree[1200] == "not_asked"] - - set CurrentPatient.dialog_tree[1200] = "asked" - do CurrentPatient.marker[0] += 1 - do CurrentPatient.change_emotion("scared") - do CurrentPatient.dialog_flags["thought_content"].append("Persecutory delusions") - - Mr Orleg: Honestly ? I don't. Some of your colleagues have been giving me the heeby jeebies. Gotta stay sharp, i'm pretty sure he's here. - - ~ day_1_choice_1_2 - - - Who's "he" ? [if CurrentPatient.dialog_tree[1210] == "not_asked"] - - set CurrentPatient.dialog_tree[1210] = "asked" - do CurrentPatient.marker[1] += 1 - do CurrentPatient.dialog_flags["thought_content"].append("Mystical delusions") - - Mr Orleg: Shhh... you musntn't speak his name aloud. "He" is the Harbinger. The Prophet and the Reaper. The Messiah and the Deceiver. - - if CurrentPatient.marker[1] == 2 - set CurrentPatient.marker[1] = 0 - => day_1_choice_1 - else - => day_1_choice_1_2 - - - Which of my colleagues are you talking about ? [if CurrentPatient.dialog_tree[1220] == "not_asked"] - - set CurrentPatient.dialog_tree[1220] = "asked" - do CurrentPatient.marker[1] += 1 - do CurrentPatient.dialog_flags["perceptions"].append("Mystical delusions") - - Mr Orleg: Every single one of them... He's been using their shapes to contact me. I need to remain strong, Doctor. - - if CurrentPatient.marker[1] == 2 - set CurrentPatient.marker[1] = 0 - => day_1_choice_1 - else - => day_1_choice_1_2 - -- How has your sleep been recently ? [if CurrentPatient.dialog_tree[1300] == "not_asked"] - - set CurrentPatient.dialog_tree[1300] = "asked" - do CurrentPatient.marker[0] += 1 - do CurrentPatient.change_emotion("neutral") - do CurrentPatient.dialog_flags["sleep"].append("Insomnia") - - Mr Orleg: Hard to keep my eyes shut lately, i'll admit. I definitely could use some rest. - - => day_1_choice_1 - -- How are you feeling lately ? [if CurrentPatient.dialog_tree[1400] == "not_asked"] - - set CurrentPatient.dialog_tree[1400] = "asked" - do CurrentPatient.marker[0] += 1 - do CurrentPatient.change_emotion("neutral") - do CurrentPatient.dialog_flags["mood"].append("Euthymia") - - Mr Orleg: I'm feeling rather fine, actually. My life's quite enjoyable, except for the whole "i'm locked in here cause people think i'm crazy" situation. You've got to help me Doctor. - - - Have you had any thoughts about wanting to end your life ? - - do CurrentPatient.dialog_flags["suicidal_ideation"].append("None") - - Mr Orleg: I would never dare end the life God has given me. - - => day_1_choice_1 - -- Examine [if CurrentPatient.dialog_tree[1500] == "not_asked"] - - set CurrentPatient.dialog_tree[1500] = "asked" - do CurrentPatient.marker[0] += 1 - do CurrentPatient.dialog_flags["appearance"].append("Fixed gaze") - - : The patient appears to be calm and collected. His garment is clean, if a bit crumpled. His gaze switches back and forth between a wide-eyed focus on your face, and vacantly staring at the wall. - - => day_1_choice_1 - -- Don't you feel anxious about this otherwordly being targeting you ? [if CurrentPatient.marker[0] == 5] - - set CurrentPatient.marker[0] = 0 - do CurrentPatient.change_emotion("happy") - do CurrentPatient.dialog_flags["thought_process"].append("Ideo-affective dissociation") - do CurrentPatient.dialog_flags["thought_content"].append("Megalomaniac delusions") - - Mr Orleg: Not really. I'm protected by God. No one can hurt me. - - ~ day_1_choice_1_6 - - - How do you know God protects you ? [if CurrentPatient.dialog_tree[1610] == "not_asked"] - - set CurrentPatient.dialog_tree[1610] = "asked" - set CurrentPatient.marker[2] += 1 - do CurrentPatient.dialog_flags["perceptions"].append("Intra-psychic auditory hallucinations") - - Mr Orleg: He shares his Will with me directly inside my head. We have a special connection. - - if CurrentPatient.marker[2] == 2 - set CurrentPatient.marker[2] = 0 - => day_1_choice_2 - else - => day_1_choice_1_6 - - - Have you ever seen God or this evil being with your own eyes ? [if CurrentPatient.dialog_tree[1620] == "not_asked"] - - set CurrentPatient.dialog_tree[1620] = "asked" - set CurrentPatient.marker[2] += 1 - - Mr Orleg: Never. I don't need to see them to know they're here. - - if CurrentPatient.marker[2] == 2 - set CurrentPatient.marker[2] = 0 - => day_1_choice_2 - else - => day_1_choice_1_6 - -~ day_1_choice_2 - -- Send to Reset - - Psychiatrist: You are in need of psychiatric care, Mr Orleg. My colleagues here will take you to the resetting room for adequate treatment. - - do CurrentPatient.change_emotion("scared") - - Mr Orleg: You can't do that Doctor ! This is a mistake ! - - Mr Orleg: I swear i'm not crazy ! - - do CurrentPatient.send_to_reset() - - => END - -- Send to Isolation - - Psychiatrist: I have assessed that you are currently unstable, Mr Orleg. You may be dangerous to other people, and even to yourself. We are going to Isolate you to ensure your safety. - - do CurrentPatient.change_emotion("scared") - - Mr Orleg: What ?? Th- This can't be... - - Mr Orleg: Please, have mercy... - - do CurrentPatient.send_to_isolation - - => END - -- End the evaluation - - Psychiatrist: Thank you for answering my questions, Mr Orleg. You are to remain here for further observation. - - do CurrentPatient.change_emotion("angry") - - Mr Orleg: I knew it. You are just like the others, faking compassion for profit. You disgust me. - - Psychiatrist: I am here to help you, I just need more time to make the right decision. Please be patient, sir. - - Mr Orleg: This whole thing's a joke... - - => END - -=> END - - - -~ mr_orleg_day_2_dialogue_start - -do CurrentPatient.marker.fill(0) -set CurrentPatient.dialog_tree = CurrentPatient.build_dialog_tree([1100,1200,1210,1220, 1300, 1400, 1500, 1610, 1620]) - -: The patient is hurriedly mumbling something to himself in hushed tones. He abruptly stops as you step in, fixing you with an unnerving stare. - -Mr Orleg: Back for round 2, I presume ? Ask away, Doc. - -~ day_2_choice_1 - -- How was your first night here ? [if CurrentPatient.dialog_tree[1100] == "not_asked"] - - set CurrentPatient.dialog_tree[1100] = "asked" - do CurrentPatient.marker[0] += 1 - do CurrentPatient.change_emotion("scared") - do CurrentPatient.dialog_flags["insight"].append("Insomnia") - do CurrentPatient.dialog_flags["thought_content"].append("Persecutory delusions") - - Mr Orleg: I couldn't get my eyes shut. The Deceiver never rests. I could feel him breathing on my skin in the dark. It felt cold, so cold... - - ~ day_2_choice_1_1 - - - You told me you felt safe under God's protection. Is it still the case ? [if CurrentPatient.dialog_tree[1110] == "not_asked"] - - set CurrentPatient.dialog_tree[1110] = "asked" - do CurrentPatient.marker[1] += 1 - do CurrentPatient.dialog_flags["thought_content"].append("Mystical delusions") - - Mr Orleg: Yes, I still feel his Holy Presence within me, but it's getting fainter and fainter... This place is cursed. I need to get out of here fast. - - if CurrentPatient.marker[1] == 2 - set CurrentPatient.marker[1] = 0 - => day_2_choice_1 - else - => day_2_choice_1_1 - - - Were you able to see the Deceiver ? How did you know it was Him in your room last night ? [if CurrentPatient.dialog_tree[1120] == "not_asked"] - - set CurrentPatient.dialog_tree[1120] = "asked" - do CurrentPatient.marker[1] += 1 - do CurrentPatient.dialog_flags["perceptions"].append("Mystical delusions") - - Mr Orleg: Because I KNOW it ! It starts with yellow water dripping from the ceilings, flowing more and more... the smell ! Gods, the smell... - - if CurrentPatient.marker[1] == 2 - set CurrentPatient.marker[1] = 0 - => day_2_choice_1 - else - => day_2_choice_1_1 - - => day_2_choice_1 +Vladislav Orleg: [#smiling] Hello, i'm patient #564, nice to meet you ! +=> END \ No newline at end of file diff --git a/Dialogues/Patients/patient_564_file.txt b/Dialogues/Patients/patient_564_file.txt index bcbcd60..57396a9 100644 --- a/Dialogues/Patients/patient_564_file.txt +++ b/Dialogues/Patients/patient_564_file.txt @@ -1,15 +1,12 @@ -NAME: Sigur, Sigurdsson +NAME: Orleg, Vladislav -AGE: 54 +AGE: 59 -PROFESSION: Botanist +PROFESSION: Gardener ADMISSION REASON: Delirium Verbal agression Homicidal threats - - - diff --git a/Dialogues/balloon.tscn b/Dialogues/balloon.tscn index 30dbb00..ac33f56 100644 --- a/Dialogues/balloon.tscn +++ b/Dialogues/balloon.tscn @@ -72,24 +72,23 @@ script = ExtResource("1_36de5") [node name="Balloon" type="Control" parent="."] unique_name_in_owner = true layout_mode = 3 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 +anchors_preset = 0 +offset_top = 820.0 +offset_right = 1920.0 +offset_bottom = 1070.0 size_flags_horizontal = 0 size_flags_vertical = 0 mouse_filter = 2 +mouse_force_pass_scroll_events = false theme = SubResource("Theme_qq3yp") [node name="Panel" type="Panel" parent="Balloon"] clip_children = 2 layout_mode = 1 offset_left = 10.0 -offset_top = 820.0 offset_right = 1910.0 -offset_bottom = 1070.0 -mouse_filter = 1 +offset_bottom = 250.0 +mouse_force_pass_scroll_events = false [node name="Dialogue" type="MarginContainer" parent="Balloon/Panel"] layout_mode = 1 @@ -98,6 +97,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +mouse_filter = 2 [node name="VBoxContainer" type="VBoxContainer" parent="Balloon/Panel/Dialogue"] layout_mode = 2 @@ -157,4 +157,5 @@ layout_mode = 2 text = "Response example" [connection signal="gui_input" from="Balloon" to="." method="_on_balloon_gui_input"] +[connection signal="gui_input" from="Balloon/Panel" to="." method="_on_balloon_gui_input"] [connection signal="response_selected" from="Balloon/Responses/ResponsesMenu" to="." method="_on_responses_menu_response_selected"] diff --git a/MainHub.tscn b/MainHub.tscn index 73c77d0..74cf9c1 100644 --- a/MainHub.tscn +++ b/MainHub.tscn @@ -3,7 +3,7 @@ [ext_resource type="Script" path="res://main_hub.gd" id="1_rvfpd"] [ext_resource type="PackedScene" uid="uid://cahspuhi43bx7" path="res://title_screen.tscn" id="2_3wmv1"] [ext_resource type="PackedScene" uid="uid://chytk2cctjk3x" path="res://screening_desk.tscn" id="3_whctb"] -[ext_resource type="PackedScene" uid="uid://dcjhx2g4d056v" path="res://Bedroom.tscn" id="4_4fm57"] +[ext_resource type="PackedScene" uid="uid://dcjhx2g4d056v" path="res://bedroom.tscn" id="4_4fm57"] [ext_resource type="PackedScene" uid="uid://igkl2384rxt1" path="res://text_screens.tscn" id="5_85o5j"] [ext_resource type="PackedScene" uid="uid://dixsxwodxuf0b" path="res://dialogue_screens.tscn" id="6_60wm2"] diff --git a/current_patient.gd b/current_patient.gd index 2c984db..49e1bcb 100644 --- a/current_patient.gd +++ b/current_patient.gd @@ -1,6 +1,5 @@ extends Node -var emotion: String var dialog_tree: Dictionary var marker: Array[int] var patient_file_content: String @@ -9,8 +8,6 @@ var patient_file_content: String # 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) @@ -27,13 +24,6 @@ func build_dialog_tree(tree_model: Array[int]) -> Dictionary: 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: diff --git a/main_hub.gd b/main_hub.gd index f771249..d70012a 100644 --- a/main_hub.gd +++ b/main_hub.gd @@ -70,7 +70,7 @@ func _on_new_game_pressed(): #Skips the introduction func skip_intro(): - transition("big", [$TitleScreen], [$ScreeningDesk, UI, UI.get_node("UI/UpperContainer")]) + TransitionScreen.transition("big", [$TitleScreen], [$ScreeningDesk, UI, UI.get_node("UI/UpperContainer")]) await TransitionScreen.transition_finished $ScreeningDesk.gameplay_loop("564") @@ -82,39 +82,24 @@ func play_intro(): var text_container = $TextScreens/MarginContainer/IntroBoxContainer/TextContainer #Introduction first slides - transition("big", [$TitleScreen], [$TextScreens, text_container.get_child(0), UI, UI.get_node("UI/SkipContainer")]) + TransitionScreen.transition("big", [$TitleScreen], [$TextScreens, text_container.get_child(0), UI, UI.get_node("UI/SkipContainer")]) await UI.next_slide for i in 4: - transition("small", [text_container.get_child(i)], [text_container.get_child(i+1)]) + TransitionScreen.transition("small", [text_container.get_child(i)], [text_container.get_child(i+1)]) await UI.next_slide #Dialogue in the Meeting Room - transition("big", [$TextScreens, text_container.get_child(4), UI, UI.get_node("UI/SkipContainer")], [$DialogueScreens]) + TransitionScreen.transition("big", [$TextScreens, text_container.get_child(4), UI, UI.get_node("UI/SkipContainer")], [$DialogueScreens]) await TransitionScreen.transition_finished DialogueManager.show_dialogue_balloon(dialogue_intro, "start") await DialogueManager.dialogue_ended #Transition to the Screening Desk - transition("big", [$DialogueScreens], [$ScreeningDesk, UI, UI.get_node("UI/UpperContainer")]) + TransitionScreen.transition("big", [$DialogueScreens], [$ScreeningDesk, UI, UI.get_node("UI/UpperContainer")]) await TransitionScreen.transition_finished $ScreeningDesk.gameplay_loop("564") - - -# Takes care of fading transitions between scenes -func transition(fading_screen_size, scenes_to_hide, scenes_to_show): - - TransitionScreen.transition(fading_screen_size) - - await TransitionScreen.fading_finished - - for scene in scenes_to_hide: - scene.hide() - for scene in scenes_to_show: - scene.show() - - diff --git a/project.godot b/project.godot index ac7bd35..f341ae4 100644 --- a/project.godot +++ b/project.godot @@ -55,4 +55,4 @@ ui_select={ [internationalization] -locale/translations_pot_files=PackedStringArray("res://Dialogues/intro.dialogue", "res://Dialogues/mr_orleg.dialogue", "res://Dialogues/patient_1.dialogue", "res://Dialogues/intro_stash.dialogue", "res://Dialogues/Patients/patient_1.dialogue", "res://Dialogues/Patients/patient_564.dialogue") +locale/translations_pot_files=PackedStringArray("res://Dialogues/intro.dialogue", "res://Dialogues/mr_orleg.dialogue", "res://Dialogues/intro_stash.dialogue", "res://Dialogues/Patients/patient_1.dialogue", "res://Dialogues/Patients/patient_564.dialogue") diff --git a/screening_desk.gd b/screening_desk.gd index 7d2e456..6d1d573 100644 --- a/screening_desk.gd +++ b/screening_desk.gd @@ -7,6 +7,7 @@ extends Control @onready var face_zoom = $Background/HBoxContainer/MarginContainer/VBoxContainer/FaceMarginContainer/FaceZoom @onready var alone_controls = $Background/HBoxContainer/MarginContainer/VBoxContainer/ControlsMarginContainer/Alone @onready var patient_controls = $Background/HBoxContainer/MarginContainer/VBoxContainer/ControlsMarginContainer/Patient +@onready var patient_texture = $Background/HBoxContainer/Desk/PatientTextureRect @onready var dialogue_resource: Resource @onready var balloon: Node @onready var patient_emotions : Dictionary @@ -29,7 +30,7 @@ func _ready() -> void: patient_controls.get_node("Examine").pressed.connect(self._examine) #Instantiating a custom balloon - var Balloon: Resource = load("res://Dialogues/balloon.tscn") + var Balloon: Resource = preload("res://Dialogues/balloon.tscn") balloon = Balloon.instantiate() var panel = balloon.get_node("Balloon/Panel") @@ -44,6 +45,7 @@ func _ready() -> void: panel_container.hide() face_zoom.hide() patient_controls.hide() + patient_texture.hide() @@ -53,9 +55,6 @@ func gameplay_loop(patient_id): - - - func new_patient(patient_id): #Loading Patient Files @@ -70,13 +69,28 @@ PATIENT FILE #" + String(patient_id) file.close() + #Loading Patient Texture + file_path = "res://Art/Patients/patient_" + String(patient_id) + "/patient_" + String(patient_id) + "_full.png" + patient_texture.texture = load(file_path) + #Loading Face Emotions - #Neutral + var face: Resource + var emotion: Dictionary + + #Neutral file_path = "res://Art/Patients/patient_" + String(patient_id) + "/patient_" + String(patient_id) + "_neutral.png" - var face = load(file_path) - var emotion = {"neutral": face} + face = load(file_path) + emotion = {"neutral": face} patient_emotions.merge(emotion) + #Smiling + file_path = "res://Art/Patients/patient_" + String(patient_id) + "/patient_" + String(patient_id) + "_smiling.png" + face = load(file_path) + emotion = {"smiling": face} + patient_emotions.merge(emotion) + + + #Loading Default Face face = patient_emotions["neutral"] face_zoom.texture = face @@ -109,9 +123,21 @@ func _guidebook(): func _call_next_patient(): + #Hiding and Showing appropriate scenes + + #alone_controls.hide() + #patient_controls.show() + #patient_texture.show() + #_examine() + + var scenes_to_hide = margin_container.get_children() + scenes_to_hide.append_array([alone_controls,panel_container]) + TransitionScreen.transition("big", scenes_to_hide, [patient_controls,patient_texture,face_zoom]) + await TransitionScreen.transition_finished + + #Starting Dialogue + DialogueManager.got_dialogue.connect(_change_emotion) balloon.start(dialogue_resource, "start") - alone_controls.hide() - patient_controls.show() @@ -134,6 +160,23 @@ func _examine(): +func _change_emotion(dialogue_line) -> void: + + var line_tag = dialogue_line.tags + var new_emotion + + if line_tag.is_empty() == false: + new_emotion = line_tag[0] + print("Emotion changed to ", new_emotion) + face_zoom.texture = patient_emotions[new_emotion] + + + + + pass + + + # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: pass diff --git a/screening_desk.tscn b/screening_desk.tscn index 440c427..70e1669 100644 --- a/screening_desk.tscn +++ b/screening_desk.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://screening_desk.gd" id="1_1s7k3"] [ext_resource type="Texture2D" uid="uid://c3je4gir1qlot" path="res://Art/BlackScreen.png" id="1_r2ji1"] -[ext_resource type="Texture2D" uid="uid://cppnad2sauulq" path="res://Art/Office.png" id="3_vcj7d"] +[ext_resource type="Texture2D" uid="uid://dc2nmwcscjig4" path="res://Art/ScreeningDesk.png" id="3_xhvwd"] [ext_resource type="FontFile" uid="uid://ckg5x0oonnjtn" path="res://Art/XanhMono-Regular.ttf" id="4_uvrsh"] [ext_resource type="FontFile" uid="uid://mi5v1uq78g7o" path="res://Art/XanhMono-Italic.ttf" id="5_sybh5"] @@ -49,7 +49,15 @@ layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 size_flags_stretch_ratio = 2.0 -texture = ExtResource("3_vcj7d") +texture = ExtResource("3_xhvwd") +expand_mode = 1 + +[node name="PatientTextureRect" type="TextureRect" parent="Background/HBoxContainer/Desk"] +layout_mode = 0 +offset_left = 491.0 +offset_top = 314.0 +offset_right = 771.0 +offset_bottom = 632.0 expand_mode = 1 [node name="MarginContainer" type="MarginContainer" parent="Background/HBoxContainer"] diff --git a/transition_screen.gd b/transition_screen.gd index abe6187..1302486 100644 --- a/transition_screen.gd +++ b/transition_screen.gd @@ -33,7 +33,7 @@ func _on_animation_finished(anim_name): #Handles fading transitions -func transition(size): +func fading(size): Globals.is_transitioning = true @@ -43,4 +43,18 @@ func transition(size): elif size == "small": small_fading.visible = true small_animation.play("fade_to_black") + + + +#Transitions the scenes +func transition(fading_screen_size, scenes_to_hide, scenes_to_show): + + fading(fading_screen_size) + + await self.fading_finished + + for scene in scenes_to_hide: + scene.hide() + for scene in scenes_to_show: + scene.show()