diff --git a/Art/Patients/patient_its_00/patient_its_00.aseprite b/Art/Patients/patient_its_00/patient_its_00.aseprite index a444d5f..72a3f58 100644 Binary files a/Art/Patients/patient_its_00/patient_its_00.aseprite and b/Art/Patients/patient_its_00/patient_its_00.aseprite differ diff --git a/Art/Patients/patient_its_00/patient_its_00_angry.png b/Art/Patients/patient_its_00/patient_its_00_angry.png index f1e99ef..0934dd7 100644 Binary files a/Art/Patients/patient_its_00/patient_its_00_angry.png and b/Art/Patients/patient_its_00/patient_its_00_angry.png differ diff --git a/Art/Patients/patient_its_00/patient_its_00_elated.png b/Art/Patients/patient_its_00/patient_its_00_elated.png index 6ca6361..1273757 100644 Binary files a/Art/Patients/patient_its_00/patient_its_00_elated.png and b/Art/Patients/patient_its_00/patient_its_00_elated.png differ diff --git a/Art/Patients/patient_its_00/patient_its_00_happy.png b/Art/Patients/patient_its_00/patient_its_00_happy.png index 3586c4b..754150a 100644 Binary files a/Art/Patients/patient_its_00/patient_its_00_happy.png and b/Art/Patients/patient_its_00/patient_its_00_happy.png differ diff --git a/Art/Patients/patient_its_00/patient_its_00_laughing.png b/Art/Patients/patient_its_00/patient_its_00_laughing.png index bf8b724..e80b998 100644 Binary files a/Art/Patients/patient_its_00/patient_its_00_laughing.png and b/Art/Patients/patient_its_00/patient_its_00_laughing.png differ diff --git a/Art/Rooms/screening_room/its_game_over.aseprite b/Art/Rooms/screening_room/its_game_over.aseprite deleted file mode 100644 index 5a59b36..0000000 Binary files a/Art/Rooms/screening_room/its_game_over.aseprite and /dev/null differ diff --git a/Art/Rooms/screening_room/its_game_over.png b/Art/Rooms/screening_room/its_game_over.png deleted file mode 100644 index abea40f..0000000 Binary files a/Art/Rooms/screening_room/its_game_over.png and /dev/null differ diff --git a/Art/UI/its_game_over.aseprite b/Art/UI/its_game_over.aseprite new file mode 100644 index 0000000..9619ba3 Binary files /dev/null and b/Art/UI/its_game_over.aseprite differ diff --git a/Art/UI/its_game_over.png b/Art/UI/its_game_over.png new file mode 100644 index 0000000..8a4eeec Binary files /dev/null and b/Art/UI/its_game_over.png differ diff --git a/Art/Rooms/screening_room/its_game_over.png.import b/Art/UI/its_game_over.png.import similarity index 72% rename from Art/Rooms/screening_room/its_game_over.png.import rename to Art/UI/its_game_over.png.import index c8c9624..a3f5027 100644 --- a/Art/Rooms/screening_room/its_game_over.png.import +++ b/Art/UI/its_game_over.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://ocg21oes1wsk" -path="res://.godot/imported/its_game_over.png-c86779225fe540da92581c43211a3318.ctex" +uid="uid://qodbgs7d5mqs" +path="res://.godot/imported/its_game_over.png-775d28b92d681a701b67f36a5c2621d1.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://Art/Rooms/screening_room/its_game_over.png" -dest_files=["res://.godot/imported/its_game_over.png-c86779225fe540da92581c43211a3318.ctex"] +source_file="res://Art/UI/its_game_over.png" +dest_files=["res://.godot/imported/its_game_over.png-775d28b92d681a701b67f36a5c2621d1.ctex"] [params] diff --git a/Saves/save_1.json b/Saves/save_1.json index 778e002..a2de553 100644 --- a/Saves/save_1.json +++ b/Saves/save_1.json @@ -1 +1 @@ -{"day_count":1,"patient_count":1,"patient_id":"564","save_date":"06/15/2025, 20:48"} \ No newline at end of file +{"daily_patient_limit":6,"day_count":1,"diagnoses_quota":2,"floor_count":-2,"its_patients_seen":[],"patient_count":0,"patient_id":"43","patient_list":["42","43","44","45","46","47","48","49","50","51"],"patients_seen":["43"],"save_date":"03/01/2026, 13:35"} \ No newline at end of file diff --git a/Saves/save_2.json b/Saves/save_2.json index 4642317..5e6ff1b 100644 --- a/Saves/save_2.json +++ b/Saves/save_2.json @@ -1 +1 @@ -{"day_count":2,"patient_count":2,"patient_id":"564","save_date":"06/15/2025, 18:28"} \ No newline at end of file +{"daily_patient_limit":6,"day_count":1,"diagnoses_quota":2,"floor_count":-2,"its_patients_seen":[],"patient_count":1,"patient_id":"its_00","patient_list":["42","43","44","45","46","47","48","49","50","51"],"patients_seen":["43","its_00"],"save_date":"03/01/2026, 13:36"} \ No newline at end of file diff --git a/Saves/save_3.json b/Saves/save_3.json deleted file mode 100644 index 2573a6f..0000000 --- a/Saves/save_3.json +++ /dev/null @@ -1 +0,0 @@ -{"day_count":3,"patient_count":1,"patient_id":"564","save_date":"06/15/2025, 18:28"} \ No newline at end of file diff --git a/Saves/save_4.json b/Saves/save_4.json deleted file mode 100644 index 3c6629a..0000000 --- a/Saves/save_4.json +++ /dev/null @@ -1 +0,0 @@ -{"day_count":4,"patient_count":1,"patient_id":"564","save_date":"06/15/2025, 18:29"} \ No newline at end of file diff --git a/Scenes/transition_screen/fading_mask.gd b/Scenes/UI/fading_mask.gd similarity index 100% rename from Scenes/transition_screen/fading_mask.gd rename to Scenes/UI/fading_mask.gd diff --git a/Scenes/transition_screen/fading_mask.gd.uid b/Scenes/UI/fading_mask.gd.uid similarity index 100% rename from Scenes/transition_screen/fading_mask.gd.uid rename to Scenes/UI/fading_mask.gd.uid diff --git a/Scenes/UI/its_game_over_control.gd b/Scenes/UI/its_game_over_control.gd index e2c49b2..b6e176b 100644 --- a/Scenes/UI/its_game_over_control.gd +++ b/Scenes/UI/its_game_over_control.gd @@ -8,12 +8,7 @@ extends Control # Called when the node enters the scene tree for the first time. func _ready() -> void: - - #Hiding everything - hide() - for node in [background, back_to_menu, reload_checkpoint, message]: - node.hide() - + reset() #Reveals the game over screen @@ -30,4 +25,10 @@ func reveal(): node.modulate.a = 0.0 node.show() animation_player.play("fade_in") - + + +#Resets to initial state +func reset(): + for node in [background, back_to_menu, reload_checkpoint, message]: + node.hide() + hide() diff --git a/Scenes/transition_screen/transition_screen.gd b/Scenes/UI/masks.gd similarity index 90% rename from Scenes/transition_screen/transition_screen.gd rename to Scenes/UI/masks.gd index 7d20867..b0139d0 100644 --- a/Scenes/transition_screen/transition_screen.gd +++ b/Scenes/UI/masks.gd @@ -1,7 +1,6 @@ -extends CanvasLayer +extends Control @onready var fading_mask = $FadingMask -@onready var its_game_over = $ITSGameOver @onready var mask = $Mask signal transition_finished diff --git a/Scenes/UI/masks.gd.uid b/Scenes/UI/masks.gd.uid new file mode 100644 index 0000000..e26b3ff --- /dev/null +++ b/Scenes/UI/masks.gd.uid @@ -0,0 +1 @@ +uid://be2ypveoa0hf5 diff --git a/Scenes/UI/ui.gd b/Scenes/UI/ui.gd index e07ed0d..4567d41 100644 --- a/Scenes/UI/ui.gd +++ b/Scenes/UI/ui.gd @@ -1,12 +1,14 @@ extends CanvasLayer +#UI Elements @onready var next = $UI/SkipContainer/NextButton @onready var confirmation_mask = $ConfirmationMask +@onready var masks = $Masks +#GameOver Scenes @onready var its_game_over = $ITSGameOverControl #Signals for progressing through slides -signal next_request signal next_slide #Signals for saving and loading @@ -55,12 +57,7 @@ func _ready() -> void: #Connecting signals #GameOver Signals - - - #Next Signals - next.pressed.connect(_on_next_pressed) - self.connect("next_request", _on_next_request) - + #Menu Signals $UI/UpperContainer/Menu.pressed.connect(_on_menu_pressed) @@ -145,36 +142,15 @@ func ask_confirmation(function_yes: Callable, function_no: Callable, choice_text confirmation_mask.visible = true - -#Requests next when the Next Button is pressed -func _on_next_pressed(): - next_request.emit() - - - -#Requests next when the space key is pressed -func _input(event): - if event is InputEventKey and event.is_action_released("ui_accept"): - next_request.emit() - - - -#Makes sure fading transitions are done before approving a next request -func _on_next_request(): - if Globals.is_transitioning == false: - next_slide.emit() - - - func _on_menu_pressed(): - TransitionScreen.mask.visible = true + UI.masks.mask.visible = true $UI/Menu.show() #Back to the game func _on_resume_pressed(): - TransitionScreen.mask.visible = false + UI.masks.mask.visible = false $UI/Menu.hide() @@ -208,7 +184,7 @@ func _on_back_pressed(): func _on_back_title_pressed(): $UI/Load.hide() $UI/Settings.hide() - TransitionScreen.mask.visible = false + UI.masks.mask.visible = false diff --git a/Scenes/UI/ui.tscn b/Scenes/UI/ui.tscn index 34ede20..0d8e99b 100644 --- a/Scenes/UI/ui.tscn +++ b/Scenes/UI/ui.tscn @@ -1,12 +1,66 @@ -[gd_scene load_steps=16 format=3 uid="uid://dy40jygog8t3k"] +[gd_scene load_steps=22 format=3 uid="uid://dy40jygog8t3k"] [ext_resource type="Script" uid="uid://c0q67t6m1i4dl" path="res://Scenes/UI/ui.gd" id="1_mg12k"] [ext_resource type="FontFile" uid="uid://dv8ppra5tgn1t" path="res://Art/Fonts/PixelatedEleganceRegular-ovyAA.ttf" id="2_vb7na"] [ext_resource type="Texture2D" uid="uid://l7786mlmvet8" path="res://Art/UI/menu_gear.png" id="3_ibj64"] -[ext_resource type="Texture2D" uid="uid://ocg21oes1wsk" path="res://Art/Rooms/screening_room/its_game_over.png" id="4_1c2ca"] [ext_resource type="Script" uid="uid://bru53a1mvu0t2" path="res://Scenes/UI/its_game_over_control.gd" id="4_duuxe"] [ext_resource type="Shader" uid="uid://n2f3kv6b7k2o" path="res://Scenes/UI/its_game_over.gdshader" id="5_duuxe"] +[ext_resource type="Texture2D" uid="uid://qodbgs7d5mqs" path="res://Art/UI/its_game_over.png" id="6_duuxe"] [ext_resource type="Script" uid="uid://cjft0c0ui8yhs" path="res://Scenes/UI/its_game_over_background.gd" id="6_jfwrg"] +[ext_resource type="Script" uid="uid://be2ypveoa0hf5" path="res://Scenes/UI/masks.gd" id="8_mbl0m"] +[ext_resource type="Script" uid="uid://dbjei4d2lfwnb" path="res://Scenes/UI/fading_mask.gd" id="9_s3gqk"] + +[sub_resource type="Animation" id="Animation_n85x3"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("FadingMask:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(0, 0, 0, 0)] +} + +[sub_resource type="Animation" id="Animation_20bx3"] +resource_name = "fade_to_black" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("FadingMask:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)] +} + +[sub_resource type="Animation" id="Animation_in743"] +resource_name = "fade_to_normal" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("FadingMask:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_5yx4m"] +_data = { +&"RESET": SubResource("Animation_n85x3"), +&"fade_in": SubResource("Animation_20bx3"), +&"fade_out": SubResource("Animation_in743") +} [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fo2i3"] border_width_left = 2 @@ -117,6 +171,46 @@ auto_mask = NodePath("UI/Settings/MarginContainer/VBoxContainer/GridContainer/Di display_button = NodePath("UI/Settings/MarginContainer/VBoxContainer/GridContainer/ScreenContainer/VBoxContainer2/ScreenSettings/VBoxContainer/Display/DisplayButton") resolution_button = NodePath("UI/Settings/MarginContainer/VBoxContainer/GridContainer/ScreenContainer/VBoxContainer2/ScreenSettings/VBoxContainer/Resolution/ResolutionButton") +[node name="Masks" type="Control" parent="."] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +script = ExtResource("8_mbl0m") + +[node name="FadingMask" type="ColorRect" parent="Masks"] +modulate = Color(0, 0, 0, 0) +z_index = 13 +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0, 0, 0, 1) +script = ExtResource("9_s3gqk") + +[node name="FadingMaskAnimation" type="AnimationPlayer" parent="Masks/FadingMask"] +root_node = NodePath("../..") +libraries = { +&"": SubResource("AnimationLibrary_5yx4m") +} + +[node name="Mask" type="ColorRect" parent="Masks"] +visible = false +z_index = 11 +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_force_pass_scroll_events = false +color = Color(0, 0, 0, 0.470588) + [node name="UI" type="Control" parent="."] z_index = 12 layout_mode = 3 @@ -799,7 +893,7 @@ material = SubResource("ShaderMaterial_duuxe") layout_mode = 0 offset_right = 1920.0 offset_bottom = 1080.0 -texture = ExtResource("4_1c2ca") +texture = ExtResource("6_duuxe") script = ExtResource("6_jfwrg") [node name="UI" type="VBoxContainer" parent="ITSGameOverControl"] diff --git a/Scenes/UI/ui.tscn8283475570.tmp b/Scenes/UI/ui.tscn8283475570.tmp new file mode 100644 index 0000000..6fe146e --- /dev/null +++ b/Scenes/UI/ui.tscn8283475570.tmp @@ -0,0 +1,937 @@ +[gd_scene load_steps=22 format=3 uid="uid://dy40jygog8t3k"] + +[ext_resource type="Script" uid="uid://c0q67t6m1i4dl" path="res://Scenes/UI/ui.gd" id="1_mg12k"] +[ext_resource type="FontFile" uid="uid://dv8ppra5tgn1t" path="res://Art/Fonts/PixelatedEleganceRegular-ovyAA.ttf" id="2_vb7na"] +[ext_resource type="Texture2D" uid="uid://l7786mlmvet8" path="res://Art/UI/menu_gear.png" id="3_ibj64"] +[ext_resource type="Script" uid="uid://bru53a1mvu0t2" path="res://Scenes/UI/its_game_over_control.gd" id="4_duuxe"] +[ext_resource type="Shader" uid="uid://n2f3kv6b7k2o" path="res://Scenes/UI/its_game_over.gdshader" id="5_duuxe"] +[ext_resource type="Texture2D" uid="uid://qodbgs7d5mqs" path="res://Art/UI/its_game_over.png" id="6_duuxe"] +[ext_resource type="Script" uid="uid://cjft0c0ui8yhs" path="res://Scenes/UI/its_game_over_background.gd" id="6_jfwrg"] +[ext_resource type="Script" uid="uid://be2ypveoa0hf5" path="res://Scenes/UI/masks.gd" id="8_mbl0m"] +[ext_resource type="Script" uid="uid://dbjei4d2lfwnb" path="res://Scenes/UI/fading_mask.gd" id="9_s3gqk"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fo2i3"] +border_width_left = 2 +border_width_top = 2 +border_width_right = 2 +border_width_bottom = 2 + +[sub_resource type="Theme" id="Theme_27bfm"] +default_font_size = 18 +OptionButton/fonts/font = null + +[sub_resource type="Theme" id="Theme_k8uqd"] +default_font = ExtResource("2_vb7na") +default_font_size = 16 +OptionButton/fonts/font = ExtResource("2_vb7na") + +[sub_resource type="Theme" id="Theme_mbl0m"] +Button/font_sizes/font_size = 30 +Button/fonts/font = ExtResource("2_vb7na") +RichTextLabel/fonts/normal_font = ExtResource("2_vb7na") + +[sub_resource type="Animation" id="Animation_duuxe"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("HBoxContainer/ReloadCheckpoint:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(1, 1, 1, 1)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("HBoxContainer/BackToMainMenu:modulate") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(1, 1, 1, 1)] +} + +[sub_resource type="Animation" id="Animation_jfwrg"] +resource_name = "fade_in" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Message:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("HBoxContainer/ReloadCheckpoint:modulate") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("HBoxContainer/BackToMainMenu:modulate") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_mbl0m"] +_data = { +&"RESET": SubResource("Animation_duuxe"), +&"fade_in": SubResource("Animation_jfwrg") +} + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_duuxe"] +shader = ExtResource("5_duuxe") +shader_parameter/progress = 0.0 +shader_parameter/softness = 0.05 + +[sub_resource type="Animation" id="Animation_n85x3"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("FadingMask:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(0, 0, 0, 0)] +} + +[sub_resource type="Animation" id="Animation_20bx3"] +resource_name = "fade_to_black" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("FadingMask:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)] +} + +[sub_resource type="Animation" id="Animation_in743"] +resource_name = "fade_to_normal" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("FadingMask:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_5yx4m"] +_data = { +&"RESET": SubResource("Animation_n85x3"), +&"fade_in": SubResource("Animation_20bx3"), +&"fade_out": SubResource("Animation_in743") +} + +[node name="UILayer" type="CanvasLayer" node_paths=PackedStringArray("text_slider", "auto_slider", "text_counter", "auto_counter", "autoplay", "auto_mask", "display_button", "resolution_button")] +layer = 100 +script = ExtResource("1_mg12k") +text_slider = NodePath("UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/TextSpeed/TextSlider") +auto_slider = NodePath("UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/Control/AutoSpeed/AutoSlider") +text_counter = NodePath("UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/TextSpeed/TextCounter") +auto_counter = NodePath("UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/Control/AutoSpeed/AutoCounter") +autoplay = NodePath("UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/AutoPlay/AutoPlayCheckBox") +auto_mask = NodePath("UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/Control/AutoMask") +display_button = NodePath("UI/Settings/MarginContainer/VBoxContainer/GridContainer/ScreenContainer/VBoxContainer2/ScreenSettings/VBoxContainer/Display/DisplayButton") +resolution_button = NodePath("UI/Settings/MarginContainer/VBoxContainer/GridContainer/ScreenContainer/VBoxContainer2/ScreenSettings/VBoxContainer/Resolution/ResolutionButton") + +[node name="UI" type="Control" parent="."] +z_index = 12 +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 + +[node name="Menu" type="PanelContainer" parent="UI"] +visible = false +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -125.0 +offset_top = -200.0 +offset_right = 125.0 +offset_bottom = 200.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_fo2i3") + +[node name="Background" type="ColorRect" parent="UI/Menu"] +layout_mode = 2 +color = Color(0, 0, 0, 1) + +[node name="MarginContainer" type="MarginContainer" parent="UI/Menu"] +layout_mode = 2 +theme_override_constants/margin_left = 25 +theme_override_constants/margin_top = 25 +theme_override_constants/margin_right = 25 +theme_override_constants/margin_bottom = 25 + +[node name="VBoxContainer" type="VBoxContainer" parent="UI/Menu/MarginContainer"] +layout_mode = 2 + +[node name="Resume" type="Button" parent="UI/Menu/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 27 +text = "RESUME" + +[node name="Save" type="Button" parent="UI/Menu/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 27 +text = "SAVE" + +[node name="Load" type="Button" parent="UI/Menu/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 27 +text = "LOAD" + +[node name="Settings" type="Button" parent="UI/Menu/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 27 +text = "SETTINGS" + +[node name="MainMenu" type="Button" parent="UI/Menu/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 27 +text = "MAIN MENU" + +[node name="Quit" type="Button" parent="UI/Menu/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 27 +text = "QUIT GAME" + +[node name="Save" type="PanelContainer" parent="UI"] +visible = false +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -200.0 +offset_top = -300.0 +offset_right = 200.0 +offset_bottom = 300.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_fo2i3") + +[node name="Background" type="ColorRect" parent="UI/Save"] +layout_mode = 2 +color = Color(0, 0, 0, 1) + +[node name="MarginContainer" type="MarginContainer" parent="UI/Save"] +layout_mode = 2 +theme_override_constants/margin_left = 25 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_right = 25 +theme_override_constants/margin_bottom = 0 + +[node name="VBoxContainer" type="VBoxContainer" parent="UI/Save/MarginContainer"] +layout_mode = 2 + +[node name="RichTextLabel" type="RichTextLabel" parent="UI/Save/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/normal_font = ExtResource("2_vb7na") +theme_override_font_sizes/normal_font_size = 30 +bbcode_enabled = true +text = " +[center]SAVE GAME[/center]" + +[node name="SaveSlot1" type="Button" parent="UI/Save/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 27 +text = "EMPTY" + +[node name="SaveSlot2" type="Button" parent="UI/Save/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 27 +text = "EMPTY" + +[node name="SaveSlot3" type="Button" parent="UI/Save/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 27 +text = "EMPTY" + +[node name="SaveSlot4" type="Button" parent="UI/Save/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 27 +text = "EMPTY" + +[node name="Back" type="Button" parent="UI/Save/MarginContainer/VBoxContainer"] +custom_minimum_size = Vector2(80, 40) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 20 +text = "BACK" + +[node name="Load" type="PanelContainer" parent="UI"] +visible = false +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -200.0 +offset_top = -300.0 +offset_right = 200.0 +offset_bottom = 300.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_fo2i3") + +[node name="Background" type="ColorRect" parent="UI/Load"] +layout_mode = 2 +color = Color(0, 0, 0, 1) + +[node name="MarginContainer" type="MarginContainer" parent="UI/Load"] +layout_mode = 2 +theme_override_constants/margin_left = 25 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_right = 25 +theme_override_constants/margin_bottom = 0 + +[node name="VBoxContainer" type="VBoxContainer" parent="UI/Load/MarginContainer"] +layout_mode = 2 + +[node name="RichTextLabel" type="RichTextLabel" parent="UI/Load/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/normal_font = ExtResource("2_vb7na") +theme_override_font_sizes/normal_font_size = 30 +bbcode_enabled = true +text = " +[center]LOAD GAME[/center]" + +[node name="LoadSlot1" type="Button" parent="UI/Load/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 27 +text = "EMPTY" + +[node name="LoadSlot2" type="Button" parent="UI/Load/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 27 +text = "EMPTY" + +[node name="LoadSlot3" type="Button" parent="UI/Load/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 27 +text = "EMPTY" + +[node name="LoadSlot4" type="Button" parent="UI/Load/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 27 +text = "EMPTY" + +[node name="Control" type="Control" parent="UI/Load/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +size_flags_stretch_ratio = 0.7 + +[node name="Back" type="Button" parent="UI/Load/MarginContainer/VBoxContainer/Control"] +custom_minimum_size = Vector2(80, 40) +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -40.0 +offset_top = -20.0 +offset_right = 40.0 +offset_bottom = 20.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 20 +text = "BACK" + +[node name="BackTitle" type="Button" parent="UI/Load/MarginContainer/VBoxContainer/Control"] +custom_minimum_size = Vector2(80, 40) +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -40.0 +offset_top = -20.0 +offset_right = 40.0 +offset_bottom = 20.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 20 +text = "BACK" + +[node name="Settings" type="PanelContainer" parent="UI"] +visible = false +custom_minimum_size = Vector2(1600, 600) +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -200.0 +offset_top = -300.0 +offset_right = 200.0 +offset_bottom = 300.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_fo2i3") + +[node name="Background" type="ColorRect" parent="UI/Settings"] +layout_mode = 2 +color = Color(0, 0, 0, 1) + +[node name="MarginContainer" type="MarginContainer" parent="UI/Settings"] +layout_mode = 2 +theme_override_constants/margin_left = 20 +theme_override_constants/margin_top = 50 +theme_override_constants/margin_right = 20 +theme_override_constants/margin_bottom = 50 + +[node name="VBoxContainer" type="VBoxContainer" parent="UI/Settings/MarginContainer"] +layout_mode = 2 +theme_override_constants/separation = 40 + +[node name="Settings" type="RichTextLabel" parent="UI/Settings/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_fonts/normal_font = ExtResource("2_vb7na") +theme_override_font_sizes/normal_font_size = 35 +bbcode_enabled = true +text = "[center]SETTINGS[/center]" + +[node name="GridContainer" type="GridContainer" parent="UI/Settings/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +size_flags_stretch_ratio = 5.0 +columns = 3 + +[node name="DialogueContainer" type="MarginContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme_override_constants/margin_left = 10 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_right = 10 +theme_override_constants/margin_bottom = 10 + +[node name="VBoxContainer2" type="VBoxContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer"] +layout_mode = 2 + +[node name="DialogueOptions" type="MarginContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2"] +layout_mode = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions"] +layout_mode = 2 + +[node name="RichTextLabel" type="RichTextLabel" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer"] +custom_minimum_size = Vector2(0, 50) +layout_mode = 2 +theme_override_fonts/normal_font = ExtResource("2_vb7na") +theme_override_font_sizes/normal_font_size = 25 +bbcode_enabled = true +text = "[center]DIALOGUE[/center]" + +[node name="TextSpeed" type="HBoxContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer"] +custom_minimum_size = Vector2(0, 50) +layout_mode = 2 + +[node name="RichTextLabel" type="RichTextLabel" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/TextSpeed"] +custom_minimum_size = Vector2(160, 28) +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 4 +theme_override_fonts/normal_font = ExtResource("2_vb7na") +theme_override_font_sizes/normal_font_size = 16 +bbcode_enabled = true +text = "TYPING SPEED" + +[node name="TextSlider" type="HSlider" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/TextSpeed"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 1 +size_flags_stretch_ratio = 4.0 +min_value = 1.0 +max_value = 10.0 +value = 5.0 +tick_count = 10 +ticks_on_borders = true + +[node name="TextCounter" type="RichTextLabel" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/TextSpeed"] +custom_minimum_size = Vector2(150, 25) +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 4 +theme_override_fonts/normal_font = ExtResource("2_vb7na") +theme_override_font_sizes/normal_font_size = 16 +bbcode_enabled = true + +[node name="Control" type="Control" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer"] +custom_minimum_size = Vector2(0, 50) +layout_mode = 2 + +[node name="AutoSpeed" type="HBoxContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/Control"] +custom_minimum_size = Vector2(0, 50) +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="RichTextLabel" type="RichTextLabel" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/Control/AutoSpeed"] +custom_minimum_size = Vector2(160, 25) +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 4 +theme_override_fonts/normal_font = ExtResource("2_vb7na") +theme_override_font_sizes/normal_font_size = 16 +bbcode_enabled = true +text = "AUTO DELAY" + +[node name="AutoSlider" type="HSlider" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/Control/AutoSpeed"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 1 +size_flags_stretch_ratio = 4.0 +min_value = 1.0 +max_value = 10.0 +value = 5.0 +tick_count = 10 +ticks_on_borders = true + +[node name="AutoCounter" type="RichTextLabel" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/Control/AutoSpeed"] +custom_minimum_size = Vector2(150, 25) +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 4 +theme_override_fonts/normal_font = ExtResource("2_vb7na") +theme_override_font_sizes/normal_font_size = 16 +bbcode_enabled = true + +[node name="AutoMask" type="ColorRect" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/Control"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0, 0, 0, 0.784314) + +[node name="AutoPlay" type="HBoxContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer"] +custom_minimum_size = Vector2(0, 50) +layout_mode = 2 +theme_override_constants/separation = 10 + +[node name="RichTextLabel" type="RichTextLabel" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/AutoPlay"] +custom_minimum_size = Vector2(160, 25) +layout_mode = 2 +size_flags_vertical = 4 +theme_override_fonts/normal_font = ExtResource("2_vb7na") +theme_override_font_sizes/normal_font_size = 16 +bbcode_enabled = true +text = "AUTOPLAY" + +[node name="AutoPlayCheckBox" type="CheckBox" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/AutoPlay"] +layout_mode = 2 +size_flags_vertical = 4 + +[node name="ScreenContainer" type="MarginContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme_override_constants/margin_left = 10 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_right = 10 +theme_override_constants/margin_bottom = 10 + +[node name="VBoxContainer2" type="VBoxContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/ScreenContainer"] +layout_mode = 2 + +[node name="ScreenSettings" type="MarginContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/ScreenContainer/VBoxContainer2"] +layout_mode = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/ScreenContainer/VBoxContainer2/ScreenSettings"] +layout_mode = 2 +theme_override_constants/separation = 20 + +[node name="RichTextLabel" type="RichTextLabel" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/ScreenContainer/VBoxContainer2/ScreenSettings/VBoxContainer"] +custom_minimum_size = Vector2(0, 50) +layout_mode = 2 +theme_override_fonts/normal_font = ExtResource("2_vb7na") +theme_override_font_sizes/normal_font_size = 25 +bbcode_enabled = true +text = "[center]SCREEN[/center]" + +[node name="Display" type="HBoxContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/ScreenContainer/VBoxContainer2/ScreenSettings/VBoxContainer"] +layout_mode = 2 +theme_override_constants/separation = 20 + +[node name="RichTextLabel" type="RichTextLabel" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/ScreenContainer/VBoxContainer2/ScreenSettings/VBoxContainer/Display"] +custom_minimum_size = Vector2(140, 28) +layout_mode = 2 +size_flags_vertical = 4 +theme_override_fonts/normal_font = ExtResource("2_vb7na") +theme_override_font_sizes/normal_font_size = 16 +bbcode_enabled = true +text = "DISPLAY" + +[node name="DisplayButton" type="OptionButton" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/ScreenContainer/VBoxContainer2/ScreenSettings/VBoxContainer/Display"] +custom_minimum_size = Vector2(250, 0) +layout_mode = 2 +theme = SubResource("Theme_27bfm") +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 16 +selected = 2 +item_count = 3 +popup/item_0/text = "WINDOWED" +popup/item_0/id = 0 +popup/item_1/text = "WINDOWED FULLSCREEN" +popup/item_1/id = 1 +popup/item_2/text = "FULLSCREEN" +popup/item_2/id = 2 + +[node name="Resolution" type="HBoxContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/ScreenContainer/VBoxContainer2/ScreenSettings/VBoxContainer"] +layout_mode = 2 +theme_override_constants/separation = 20 + +[node name="RichTextLabel" type="RichTextLabel" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/ScreenContainer/VBoxContainer2/ScreenSettings/VBoxContainer/Resolution"] +custom_minimum_size = Vector2(140, 28) +layout_mode = 2 +size_flags_vertical = 4 +theme_override_fonts/normal_font = ExtResource("2_vb7na") +theme_override_font_sizes/normal_font_size = 16 +bbcode_enabled = true +text = "RESOLUTION" + +[node name="ResolutionButton" type="OptionButton" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/ScreenContainer/VBoxContainer2/ScreenSettings/VBoxContainer/Resolution"] +custom_minimum_size = Vector2(250, 0) +layout_mode = 2 +theme = SubResource("Theme_k8uqd") + +[node name="SoundContainer" type="MarginContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme_override_constants/margin_left = 10 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_right = 10 +theme_override_constants/margin_bottom = 10 + +[node name="VBoxContainer2" type="VBoxContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/SoundContainer"] +layout_mode = 2 + +[node name="DialogueOptions" type="MarginContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/SoundContainer/VBoxContainer2"] +layout_mode = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/SoundContainer/VBoxContainer2/DialogueOptions"] +layout_mode = 2 + +[node name="RichTextLabel" type="RichTextLabel" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/SoundContainer/VBoxContainer2/DialogueOptions/VBoxContainer"] +custom_minimum_size = Vector2(0, 50) +layout_mode = 2 +theme_override_fonts/normal_font = ExtResource("2_vb7na") +theme_override_font_sizes/normal_font_size = 25 +bbcode_enabled = true +text = "[center]AUDIO[/center]" + +[node name="TextSpeed" type="HBoxContainer" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/SoundContainer/VBoxContainer2/DialogueOptions/VBoxContainer"] +custom_minimum_size = Vector2(0, 50) +layout_mode = 2 + +[node name="RichTextLabel" type="RichTextLabel" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/SoundContainer/VBoxContainer2/DialogueOptions/VBoxContainer/TextSpeed"] +custom_minimum_size = Vector2(140, 28) +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 4 +theme_override_fonts/normal_font = ExtResource("2_vb7na") +theme_override_font_sizes/normal_font_size = 16 +bbcode_enabled = true +text = "MASTER" + +[node name="MasterVolume" type="HSlider" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/SoundContainer/VBoxContainer2/DialogueOptions/VBoxContainer/TextSpeed"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 1 +size_flags_stretch_ratio = 4.0 +min_value = 1.0 +max_value = 10.0 +value = 5.0 +tick_count = 10 +ticks_on_borders = true + +[node name="MasterCounter" type="RichTextLabel" parent="UI/Settings/MarginContainer/VBoxContainer/GridContainer/SoundContainer/VBoxContainer2/DialogueOptions/VBoxContainer/TextSpeed"] +custom_minimum_size = Vector2(150, 25) +layout_mode = 2 +size_flags_vertical = 4 +theme_override_fonts/normal_font = ExtResource("2_vb7na") +theme_override_font_sizes/normal_font_size = 16 +bbcode_enabled = true + +[node name="Control" type="Control" parent="UI/Settings/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +size_flags_stretch_ratio = 0.7 + +[node name="Back" type="Button" parent="UI/Settings/MarginContainer/VBoxContainer/Control"] +custom_minimum_size = Vector2(80, 40) +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -40.0 +offset_top = -20.0 +offset_right = 40.0 +offset_bottom = 20.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 20 +text = "BACK" + +[node name="BackTitle" type="Button" parent="UI/Settings/MarginContainer/VBoxContainer/Control"] +custom_minimum_size = Vector2(80, 40) +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -40.0 +offset_top = -20.0 +offset_right = 40.0 +offset_bottom = 20.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 20 +text = "BACK" + +[node name="UpperContainer" type="HBoxContainer" parent="UI"] +layout_mode = 0 +offset_right = 1849.0 +offset_bottom = 85.0 + +[node name="Menu" type="Button" parent="UI/UpperContainer"] +custom_minimum_size = Vector2(0, 80) +layout_mode = 2 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 30 +theme_override_icons/icon = ExtResource("3_ibj64") + +[node name="SkipContainer" type="HBoxContainer" parent="UI"] +visible = false +layout_mode = 0 +offset_left = 1565.0 +offset_top = 997.0 +offset_right = 1895.0 +offset_bottom = 1059.0 + +[node name="NextButton" type="Button" parent="UI/SkipContainer"] +layout_mode = 2 +theme_override_fonts/font = ExtResource("2_vb7na") +theme_override_font_sizes/font_size = 20 +text = " Press Space to Next " + +[node name="ConfirmationMask" type="ColorRect" parent="."] +visible = false +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_force_pass_scroll_events = false +color = Color(0, 0, 0, 0.784314) + +[node name="ITSGameOverControl" type="Control" parent="."] +z_index = 12 +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +theme = SubResource("Theme_mbl0m") +script = ExtResource("4_duuxe") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="ITSGameOverControl"] +root_node = NodePath("../UI") +libraries = { +&"": SubResource("AnimationLibrary_mbl0m") +} + +[node name="Background" type="TextureRect" parent="ITSGameOverControl"] +material = SubResource("ShaderMaterial_duuxe") +layout_mode = 0 +offset_right = 1920.0 +offset_bottom = 1080.0 +texture = ExtResource("6_duuxe") +script = ExtResource("6_jfwrg") + +[node name="UI" type="VBoxContainer" parent="ITSGameOverControl"] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -625.0 +offset_top = -175.0 +offset_right = 625.0 +offset_bottom = 175.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 100 +alignment = 1 + +[node name="Message" type="RichTextLabel" parent="ITSGameOverControl/UI"] +modulate = Color(1, 1, 1, 0) +custom_minimum_size = Vector2(200, 150) +layout_mode = 2 +theme_override_font_sizes/normal_font_size = 100 +bbcode_enabled = true +text = "[color=dark_red]IT HAS YOU...[/color]" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="HBoxContainer" type="HBoxContainer" parent="ITSGameOverControl/UI"] +layout_mode = 2 +theme_override_constants/separation = 50 +alignment = 1 + +[node name="ReloadCheckpoint" type="Button" parent="ITSGameOverControl/UI/HBoxContainer"] +custom_minimum_size = Vector2(600, 100) +layout_mode = 2 +text = "RELOAD LATEST CHECKPOINT" + +[node name="BackToMainMenu" type="Button" parent="ITSGameOverControl/UI/HBoxContainer"] +custom_minimum_size = Vector2(600, 100) +layout_mode = 2 +text = "BACK TO MAIN MENU" + +[node name="Masks" type="Control" parent="."] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("8_mbl0m") + +[node name="FadingMask" type="ColorRect" parent="Masks"] +modulate = Color(0, 0, 0, 0) +z_index = 13 +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0, 0, 0, 1) +script = ExtResource("9_s3gqk") + +[node name="FadingMaskAnimation" type="AnimationPlayer" parent="Masks/FadingMask"] +root_node = NodePath("../..") +libraries = { +&"": SubResource("AnimationLibrary_5yx4m") +} + +[node name="Mask" type="ColorRect" parent="Masks"] +visible = false +z_index = 11 +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_force_pass_scroll_events = false +color = Color(0, 0, 0, 0.470588) diff --git a/Scenes/main/globals.gd b/Scenes/main/globals.gd index 2ccad4f..4cc0adb 100644 --- a/Scenes/main/globals.gd +++ b/Scenes/main/globals.gd @@ -3,10 +3,12 @@ extends Node var day_count : int = 1 var floor_count : int = -1 var patient_count : int = 1 +var its_patient_count : int = 0 var diagnoses_quota : int = 1 var daily_patient_limit : int = 3 var patient_list = ["42", "43", "44", "45", "46", "47", "48", "49", "50", "51"] -var patients_seen: Array[String] +var patients_seen = [] +var its_patients_seen = [] var patient_id var interfloor_dialogue = load("res://Dialogues/interfloor.dialogue") var directives = "\n[center][font_size=22]INSTRUCTIONS[/font_size][/center] diff --git a/Scenes/main/main.gd b/Scenes/main/main.gd index 86b566b..753d2e9 100644 --- a/Scenes/main/main.gd +++ b/Scenes/main/main.gd @@ -88,28 +88,33 @@ func start_day(): #Transitioning to day screen $TextScreens/Day.text = "[center]DAY " + str(Globals.day_count) + "[/center]" - var scenes_to_hide: Array[Node] = [$TitleScreen] + var scenes_to_hide: Array[Node] = [$TitleScreen, $TextScreens, $TextScreens/Day, $ScreeningDesk] var scenes_to_show: Array[Node] = [$TextScreens, $TextScreens/Day] - TransitionScreen.transition(scenes_to_hide, scenes_to_show) - await TransitionScreen.transition_finished + UI.masks.transition(scenes_to_hide, scenes_to_show) + await UI.masks.transition_finished await get_tree().create_timer(1.0).timeout #Setting up new patient $ScreeningDesk.accurate_diagnoses = 0 #Resetting accurate_diagnoses value at the day's beginning $ScreeningDesk.middle_screen.update(Globals.day_count, Globals.floor_count, $ScreeningDesk.accurate_diagnoses, Globals.diagnoses_quota) + #Resetting scenes + for scene in [$ScreeningDesk, UI.its_game_over]: + scene.reset() + #Transitioning to the screening desk scenes_to_hide = scenes_to_show scenes_to_show = [$ScreeningDesk, UI, UI.get_node("UI/UpperContainer")] - TransitionScreen.transition(scenes_to_hide, scenes_to_show) - await TransitionScreen.transition_finished + UI.masks.transition(scenes_to_hide, scenes_to_show) + await UI.masks.transition_finished #Supervisor Dialogue #$ScreeningDesk.supervisor.dialogue("interfloor_" + str(-Globals.floor_count-1)) #await $ScreeningDesk.supervisor.dialogue_finished + #Setting up UI $ScreeningDesk.console_screen.display(Globals.directives) - $ScreeningDesk.new_patient() + $ScreeningDesk.computer.next_patient_button.show() #Saves game state on the selected save slot @@ -125,14 +130,14 @@ func save_game(save_slot_number:int): "patient_list": Globals.patient_list, "patient_id": Globals.patient_id, "patients_seen": Globals.patients_seen, + "its_patients_seen": Globals.its_patients_seen, "save_date": Globals.get_save_date() } - #Creating save file var file = FileAccess.open("res://Saves/save_" + str(save_slot_number) + ".json", FileAccess.WRITE) if file: var json_string = JSON.stringify(save_data) - print(json_string) + print("Saved data : " + str(json_string)) file.store_string(json_string) file.close() print("Game saved successfully!") @@ -145,7 +150,7 @@ func save_game(save_slot_number:int): var save_slot = UI.get_node(save_slot_path) var load_slot = UI.get_node(load_slot_path) - save_slot.text = "DAY " + str(save_data["day_count"]) + ", PATIENT " + str(save_data["patient_count"]) + "\nSAVE DATE : " + str(save_data["save_date"]) + save_slot.text = "DAY " + str(save_data["day_count"]) + ", FLOOR " + str(save_data["floor_count"]) + "\nSAVE DATE : " + str(save_data["save_date"]) load_slot.text = save_slot.text @@ -153,11 +158,11 @@ func save_game(save_slot_number:int): #Loads save file from the selected load slot func load_game(load_slot_number:int): - #CLearing balloon + #Clearing balloon clear_balloon() #Hiding loading menus and masks - TransitionScreen.mask.visible = false + UI.masks.mask.visible = false UI.get_node("UI/Menu").hide() UI.get_node("UI/UpperContainer").hide() UI.get_node("UI/Load").hide() @@ -170,23 +175,22 @@ func load_game(load_slot_number:int): var load_data = JSON.parse_string(json_string) if typeof(load_data) == 27: #Checks if loaded data is a Dictionary - print(load_data) + print("Loaded save: " + str(load_data)) Globals.day_count = load_data["day_count"] + Globals.floor_count = load_data["floor_count"] Globals.patient_count = load_data["patient_count"] Globals.diagnoses_quota = load_data["diagnoses_quota"] Globals.daily_patient_limit = load_data["daily_patient_limit"] Globals.patient_list = load_data["patient_list"] Globals.patient_id = load_data["patient_id"] Globals.patients_seen = load_data["patients_seen"] + Globals.its_patients_seen = load_data["its_patients_seen"] + Patient.update_patient_list() else: print("Failed to parse Loading Data.") - #Transitioning to loaded Save - var scenes_to_hide = [$TitleScreen, $Bedroom, $TextScreens, $TextScreens/Day, $ScreeningDesk.patient_controls, $ScreeningDesk.end_of_day_controls, $ScreeningDesk.patient_texture, $ScreeningDesk.panel_container, $ScreeningDesk.face_zoom] + $ScreeningDesk.margin_container.get_children() - var scenes_to_show = [$ScreeningDesk, $ScreeningDesk.alone_controls, UI.get_node("UI/UpperContainer")] - TransitionScreen.transition(scenes_to_hide, scenes_to_show) - await TransitionScreen.transition_finished - $ScreeningDesk.new_patient() + #Starting day + start_day() @@ -203,7 +207,7 @@ func _on_load_slot_pressed(load_slot): func _on_main_menu_pressed(): #Removing mask - TransitionScreen.mask.visible = false + UI.masks.mask.visible = false #Clearing balloon clear_balloon() @@ -215,8 +219,12 @@ func _on_main_menu_pressed(): #Going back to main menu var scenes_to_hide = [$ScreeningDesk, $TextScreens, $TextScreens/Day, UI.its_game_over] var scenes_to_show = [$TitleScreen] - TransitionScreen.transition(scenes_to_hide, scenes_to_show) - await TransitionScreen.transition_finished + UI.masks.transition(scenes_to_hide, scenes_to_show) + await UI.masks.transition_finished + + #Resetting scenes + for scene in [$ScreeningDesk, UI.its_game_over]: + scene.reset() @@ -243,8 +251,8 @@ func update_slots(): var load_data = JSON.parse_string(json_string) if typeof(load_data) == 27: #Checks if loaded data is a Dictionary #Updates save and load slots texts - print(load_data) - save_slot.text = "DAY " + str(load_data["day_count"]) + ", PATIENT " + str(load_data["patient_count"]) + "\nSAVE DATE : " + str(load_data["save_date"]) + print("Initializing save slot #" + str(save_number) + " : " + str(load_data)) + save_slot.text = "DAY " + str(load_data["day_count"]) + ", FLOOR " + str(load_data["floor_count"]) + "\nSAVE DATE : " + str(load_data["save_date"]) load_slot.text = save_slot.text else: print("Failed to parse Loading Data.") diff --git a/Scenes/screening_desk/computer.gd b/Scenes/screening_desk/computer.gd index e595ad6..fdd3ab4 100644 --- a/Scenes/screening_desk/computer.gd +++ b/Scenes/screening_desk/computer.gd @@ -77,3 +77,10 @@ func _on_response_chosen(response): #Adds protagonist responses to the recording recording.append_text("\n\n") recording.append_text("[color=green]You[/color]" + "\n") recording.append_text(response.text) + + +#Resets to initial state +func reset(): + + for node in tab_list + screen_list + [screen, next_patient_button]: + node.hide() diff --git a/Scenes/screening_desk/console_screen.gd b/Scenes/screening_desk/console_screen.gd index f04c10f..b14c9a1 100644 --- a/Scenes/screening_desk/console_screen.gd +++ b/Scenes/screening_desk/console_screen.gd @@ -13,3 +13,9 @@ func display(message): text_to_display = text_to_display.replace("\\n", "\n") #Replaces litteral backslashes by actual newlines (necessary because of Dialogue Manager) text = text_to_display show() + + +#Resets to initial state +func reset(): + text = "" + hide() diff --git a/Scenes/screening_desk/green_button.gd b/Scenes/screening_desk/green_button.gd index d90cd97..fb73449 100644 --- a/Scenes/screening_desk/green_button.gd +++ b/Scenes/screening_desk/green_button.gd @@ -12,3 +12,10 @@ func _on_green_button_pressed(): decision_made.emit("release") set_toggle_mode(true) set_pressed_no_signal(true) + +#Resets to initial state +func reset(): + set_mouse_filter(Control.MOUSE_FILTER_STOP) + set_disabled(true) + set_toggle_mode(false) + set_pressed(false) diff --git a/Scenes/screening_desk/journal_layer.gd b/Scenes/screening_desk/journal_layer.gd index 999179f..adbadac 100644 --- a/Scenes/screening_desk/journal_layer.gd +++ b/Scenes/screening_desk/journal_layer.gd @@ -42,3 +42,8 @@ func update_journal(floor_count:int): for symptom in symptoms_detailed[i]: symptoms_page += "\n\n" + symptom journal_symptoms.text = symptoms_page + + +#Resets to initial state +func reset(): + hide() diff --git a/Scenes/screening_desk/patient.gd b/Scenes/screening_desk/patient.gd index 2ecae47..917266c 100644 --- a/Scenes/screening_desk/patient.gd +++ b/Scenes/screening_desk/patient.gd @@ -2,8 +2,6 @@ extends TextureRect func _ready() -> void: - - #Hiding hide() @@ -16,3 +14,9 @@ func _change_emotion(dialogue_line) -> void: var new_emotion = line_tag[0] texture = Patient.emotions[String(new_emotion)] print("Patient emotion changed to ", new_emotion) + + +#Resets to initial state +func reset(): + modulate = Patient.original_color + hide() diff --git a/Scenes/screening_desk/patient_global.gd b/Scenes/screening_desk/patient_global.gd index a975168..77b9bd9 100644 --- a/Scenes/screening_desk/patient_global.gd +++ b/Scenes/screening_desk/patient_global.gd @@ -24,7 +24,10 @@ var symptoms_arrays: Array[Array] = [ ["VISUAL HALLUCINATIONS", "HETERO-AGRESSIVE BEHAVIOUR"] ] #Lists of possible patients sorted by floor -var patient_list : Array[Dictionary] +var og_patient_list : Array[Dictionary] +var patient_list: Array[Dictionary] +var og_its_patient_list = ["its_01"] +var its_patient_list = [] #Supervisor file path var supervisor_name = "loeveth" @@ -36,8 +39,10 @@ func _ready() -> void: marker.resize(100) marker.fill(0) - #Setting up patient list + #Setting up patient lists + og_patient_list.resize(len(symptoms_arrays)) patient_list.resize(len(symptoms_arrays)) + its_patient_list = og_its_patient_list original_color = texture.modulate #Saving original modulation color to reset it after modification @@ -58,6 +63,11 @@ func new_patient(patient_id): var file_path: String + #Updating Global variables + Globals.patient_id = patient_id + Globals.patients_seen.append(patient_id) + print("Patients seen list: " + str(Globals.patients_seen)) + #Loading Patient Files var config := ConfigFile.new() file_path = "res://Dialogues/Patients/patient_" + patient_id + "_file.cfg" @@ -151,11 +161,12 @@ func sort_patients(): break if symptom_matched: for k in range(j, symptoms_arrays.size()): - patient_list[k].merge({patient_id: j+1}) # Adds the patient to every floor compatible + og_patient_list[k].merge({patient_id: j+1}) # Adds the patient to every floor compatible symptom_matched = false break for i in range(len(patient_list)): + patient_list[i] = og_patient_list[i] print("Floor " + str(i) + " possible patients: " + str(patient_list[i])) @@ -186,16 +197,30 @@ func generate_patient_id() -> String: #Generates a patient ID var floor_index = -Globals.floor_count -1 print("Floor Index: " + str(floor_index)) var patient_id = weighted_random(patient_list[floor_index]) #Picks a random patient depending on floor, with weighted odds - - for j in range(len(patient_list)): - if len(patient_list[j]) > 1: - patient_list[j].erase(patient_id) #Removes picked patient from unseen patients list - print("Updated Floor " + str(j) + " list: " + str(patient_list[j])) + + #Removes picked patient from patients list + for i in range(len(patient_list)): + if len(patient_list[i]) > 1: + patient_list[i].erase(patient_id) + print("Updated Floor " + str(i) + " list: " + str(patient_list[i])) return patient_id +func generate_its_patient_id() -> String: #Generates an ITS patient ID + + #Generating ITS patient ID + var its_patient_id = its_patient_list.pick_random() + print("ITS Patient selected: " + str(its_patient_id)) + #Remove picked ITS patient from ITS patient list + if len(its_patient_list) > 1: + its_patient_list.erase(its_patient_id) + print("Updated ITS Patient list: " + str(its_patient_list)) + + return its_patient_id + + func next_patient() -> String: #Decides next patient ID var next_patient_id: String @@ -204,6 +229,8 @@ func next_patient() -> String: #Decides next patient ID -2: if Globals.patient_count == 0: next_patient_id = "its_00" + elif Globals.its_patient_count < 1: + next_patient_id = generate_its_patient_id() else: next_patient_id = generate_patient_id() _: @@ -211,4 +238,21 @@ func next_patient() -> String: #Decides next patient ID return next_patient_id + + +func update_patient_list(): + #Erasing patients already seen from patient lists + for patient_id in Globals.patients_seen: + for i in range(len(patient_list)): + if len(patient_list[i]) > 1: + patient_list[i].erase(patient_id) + + #Erasing its patients already seen from its patient list + for its_patient_id in Globals.its_patients_seen: + if len(its_patient_list) > 1: + its_patient_list.erase(its_patient_id) + + for j in range(len(patient_list)): + print("Loaded Floor " + str(j) + " list: " + str(patient_list[j])) + print("Loaded ITS Patient list: " + str(its_patient_list)) diff --git a/Scenes/screening_desk/red_button.gd b/Scenes/screening_desk/red_button.gd index 93fa8ff..67138b3 100644 --- a/Scenes/screening_desk/red_button.gd +++ b/Scenes/screening_desk/red_button.gd @@ -4,11 +4,19 @@ signal decision_made # Called when the node enters the scene tree for the first time. func _ready() -> void: - self.pressed.connect(self._on_green_button_pressed) + self.pressed.connect(self._on_red_button_pressed) set_disabled(true) -func _on_green_button_pressed(): +func _on_red_button_pressed(): if Globals.buttons_activated: decision_made.emit("terminate") set_toggle_mode(true) set_pressed_no_signal(true) + + +#Resets to initial state +func reset(): + set_mouse_filter(Control.MOUSE_FILTER_STOP) + set_disabled(true) + set_toggle_mode(false) + set_pressed(false) diff --git a/Scenes/screening_desk/release.gd b/Scenes/screening_desk/release.gd index 3eadb69..1fbed2d 100644 --- a/Scenes/screening_desk/release.gd +++ b/Scenes/screening_desk/release.gd @@ -9,3 +9,8 @@ func _ready() -> void: func _on_release_display(message:String): text = message + + +#Resets to initial state +func reset(): + text = Globals.colorize("RELEASE", "web_gray") diff --git a/Scenes/screening_desk/room_assets.gd b/Scenes/screening_desk/room_assets.gd new file mode 100644 index 0000000..c94cf3c --- /dev/null +++ b/Scenes/screening_desk/room_assets.gd @@ -0,0 +1,24 @@ +extends Control + +@onready var glass = $Glass +@onready var cell_wall = $CellWall +@onready var room = $Room +@onready var backwall = $Backwall +@onready var backwall_animation = $Backwall/BackwallAnimation +@onready var cell_top = $CellTop +@onready var cell_bot = $CellBot +@onready var cell_animation = $CellAnimation + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +#Resets to initial state +func reset(): + cell_wall.modulate = Patient.original_color + for node in [cell_wall, cell_top, cell_bot]: + node.hide() + for node in [glass, room, backwall]: + node.show() diff --git a/Scenes/screening_desk/room_assets.gd.uid b/Scenes/screening_desk/room_assets.gd.uid new file mode 100644 index 0000000..362c6e7 --- /dev/null +++ b/Scenes/screening_desk/room_assets.gd.uid @@ -0,0 +1 @@ +uid://bh5yd5cxceg24 diff --git a/Scenes/screening_desk/screening_desk.gd b/Scenes/screening_desk/screening_desk.gd index c4de098..127c5b1 100644 --- a/Scenes/screening_desk/screening_desk.gd +++ b/Scenes/screening_desk/screening_desk.gd @@ -13,13 +13,7 @@ extends Control @onready var computer = $LowerHalf/Computer @onready var middle_screen = $LowerHalf/MiddleScreen/MarginContainer/MiddleScreen @onready var console_screen = $LowerHalf/Console/Margin/ConsoleScreen - -#RoomAssets -@onready var cell_top = $RoomAssets/CellTop -@onready var cell_bot = $RoomAssets/CellBot -@onready var cell_animation = $RoomAssets/CellAnimation -@onready var cell_wall = $RoomAssets/CellWall -@onready var backwall_animation = $RoomAssets/Backwall/BackwallAnimation +@onready var room_assets = $RoomAssets #DialogueAssets @onready var patient_dialogue_resource: Resource @@ -44,35 +38,30 @@ func _ready() -> void: Globals.clear_patient.connect(self._on_clear_patient) Globals.color_change.connect(self._on_color_change) - #Hiding and showing appropriate RoomAssets - for room_asset in [cell_top, cell_bot, cell_wall]: - room_asset.hide() - for room_asset in [$RoomAssets/Glass, $RoomAssets/Room, $RoomAssets/Backwall]: - room_asset.show() - #$RoomAssets/Backwall.position = Vector2(0, -2700) - + room_assets.reset() hide() #Hiding ScreeningDesk message_array.resize(3) #Setting up message array +#Selecting next patient func new_patient(): var new_id = Patient.next_patient() - Patient.new_patient("its_01") #Line for testing purposes - #Patient.new_patient(new_id) #Line for generating new patient + #Patient.new_patient("its_01") #Line for testing purposes + Patient.new_patient(new_id) #Line for generating new patient computer.patient_file.text = Patient.file_text computer.recording.text = "" patient.texture = Patient.image - - #Setting up UI - computer.next_patient_button.show() - console_screen.display(Globals.directives) func _on_call_next_patient_pressed(): #Brings in next patient and sets up the desk controls + #Selecting next_patient + new_patient() + + #Hiding the next_patient button var scenes_to_hide = [computer.next_patient_button, supervisor] for scenes in scenes_to_hide: @@ -86,19 +75,21 @@ func _on_call_next_patient_pressed(): #Brings in next patient and sets up the de console_screen.display(message) #Shutters entry animation - cell_animation.play("incoming") - cell_top.show() - cell_bot.show() - await cell_animation.animation_finished + room_assets.cell_animation.play("incoming") + room_assets.cell_top.show() + room_assets.cell_bot.show() + await room_assets.cell_animation.animation_finished #Showing the Patient and the Backroom - var scenes_to_show = [patient, cell_wall] + var scenes_to_show = [patient, room_assets.cell_wall] for scene in scenes_to_show: scene.show() #Opening Shutters - cell_animation.play("open") - await cell_animation.animation_finished + room_assets.cell_animation.play("open") + await room_assets.cell_animation.animation_finished + room_assets.cell_top.hide() + room_assets.cell_bot.hide() #Activating Buttons green_button.set_disabled(false) @@ -162,37 +153,29 @@ func _on_clear_patient(choice:String): console_screen.display(message_array[1]) #Closing Shutters - cell_animation.play("close") - await cell_animation.animation_finished + room_assets.cell_top.show() + room_assets.cell_bot.show() + room_assets.cell_animation.play("close") + await room_assets.cell_animation.animation_finished - #Hiding the cell and restoring the backroom and patient's original colors - for scene in [patient, cell_wall]: - scene.hide() - patient.modulate = Patient.original_color - cell_wall.modulate = Patient.original_color + #Hiding patient and cell_wall + for node in [patient, room_assets.cell_wall]: + node.hide() - #Hiding Computer screen and resetting Console screen once the animation is done - cell_animation.play(choice) - await cell_animation.animation_finished - computer.screen.hide() - console_screen.hide() + #Playing release or terminate cell animation + room_assets.cell_animation.play(choice) + await room_assets.cell_animation.animation_finished - #Reenabling mouse filter and resetting buttons - for button in [green_button, red_button]: - button.set_mouse_filter(Control.MOUSE_FILTER_STOP) - button.set_pressed(false) - button.set_toggle_mode(false) - button.set_disabled(true) - - #Resetting decision screen - release.text = Globals.colorize("RELEASE", "web_gray") - terminate.text = Globals.colorize("TERMINATE", "web_gray") + #Resetting the scene + reset() #Descending Floor if diagnoses_quota reached if accurate_diagnoses == Globals.diagnoses_quota: descend_floor() else: - new_patient() + #Setting up UI + computer.next_patient_button.show() + console_screen.display(Globals.directives) func _on_color_change(color: String): #Modulating backroom and patient colors @@ -205,7 +188,7 @@ func _on_color_change(color: String): #Modulating backroom and patient colors "green": new_color = Color(0.5,1,0.5,1) patient.modulate = new_color - cell_wall.modulate = new_color + room_assets.cell_wall.modulate = new_color print("Color changed to: " + str(new_color)) @@ -219,10 +202,10 @@ func descend_floor(): #Descends to next floor console_screen.display(message) #Descending animation - backwall_animation.play("going_down_1") - await backwall_animation.animation_finished - backwall_animation.play("going_down_2") - await backwall_animation.animation_finished + room_assets.backwall_animation.play("going_down_1") + await room_assets.backwall_animation.animation_finished + room_assets.backwall_animation.play("going_down_2") + await room_assets.backwall_animation.animation_finished #Updating middle screen info Globals.floor_count -= 1 @@ -244,6 +227,13 @@ func descend_floor(): #Descends to next floor supervisor.dialogue("interfloor_" + str(-Globals.floor_count-1)) await supervisor.dialogue_finished - #Setting up new patient - new_patient() + #Setting up UI + computer.next_patient_button.show() + console_screen.display(Globals.directives) + +#Resets to initial state +func reset(): + for node in [patient, supervisor, journal_layer, computer, console_screen, release, terminate, + green_button, red_button, room_assets]: + node.reset() diff --git a/Scenes/screening_desk/screening_desk.tscn b/Scenes/screening_desk/screening_desk.tscn index c744f8d..20fa07f 100644 --- a/Scenes/screening_desk/screening_desk.tscn +++ b/Scenes/screening_desk/screening_desk.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=59 format=3 uid="uid://chytk2cctjk3x"] +[gd_scene load_steps=60 format=3 uid="uid://chytk2cctjk3x"] [ext_resource type="Script" uid="uid://b3ms0imu0umn8" path="res://Scenes/screening_desk/screening_desk.gd" id="1_1s7k3"] [ext_resource type="Script" uid="uid://dcax2vggaexnr" path="res://Scenes/screening_desk/journal_layer.gd" id="3_8gteb"] @@ -39,6 +39,7 @@ [ext_resource type="Texture2D" uid="uid://q34mpgfv5upt" path="res://Art/Rooms/screening_room/backwall_extended.png" id="28_w70jd"] [ext_resource type="Texture2D" uid="uid://cqwn5qo7kab4x" path="res://Art/Rooms/screening_room/cell_bot.png" id="29_43vqp"] [ext_resource type="Texture2D" uid="uid://c6ary7qg7jhc6" path="res://Art/Rooms/screening_room/decision_screen.png" id="29_cobue"] +[ext_resource type="Script" uid="uid://bh5yd5cxceg24" path="res://Scenes/screening_desk/room_assets.gd" id="34_7jdsc"] [sub_resource type="Theme" id="Theme_63o5x"] RichTextLabel/fonts/normal_font = ExtResource("14_0pvwy") @@ -953,6 +954,7 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 mouse_filter = 2 +script = ExtResource("34_7jdsc") [node name="Glass" type="TextureRect" parent="RoomAssets"] modulate = Color(1, 1, 1, 0.078431375) diff --git a/Scenes/screening_desk/supervisor.gd b/Scenes/screening_desk/supervisor.gd index 6eebab2..1107153 100644 --- a/Scenes/screening_desk/supervisor.gd +++ b/Scenes/screening_desk/supervisor.gd @@ -101,3 +101,10 @@ func _change_emotion(dialogue_line) -> void: var new_emotion = line_tag[0] texture = Patient.emotions[String(new_emotion)] print("Supervisor emotion changed to ", new_emotion) + + +#Resets to initial state +func reset(): + hide_spray() + await hide_done + hide() diff --git a/Scenes/screening_desk/terminate.gd b/Scenes/screening_desk/terminate.gd index 42dfd95..65f0df3 100644 --- a/Scenes/screening_desk/terminate.gd +++ b/Scenes/screening_desk/terminate.gd @@ -9,3 +9,8 @@ func _ready() -> void: func _on_terminate_display(message:String): text = message + + +#Resets to initial state +func reset(): + text = Globals.colorize("TERMINATE", "web_gray") diff --git a/Scenes/title_screen/title_screen.gd b/Scenes/title_screen/title_screen.gd index c9b36cb..aecf6ea 100644 --- a/Scenes/title_screen/title_screen.gd +++ b/Scenes/title_screen/title_screen.gd @@ -26,7 +26,7 @@ func _on_load_pressed(): UI.get_node("UI/Load").show() UI.get_node("UI/Load/MarginContainer/VBoxContainer/Control/Back").hide() UI.get_node("UI/Load/MarginContainer/VBoxContainer/Control/BackTitle").show() - TransitionScreen.mask.visible = true + UI.masks.mask.visible = true @@ -34,7 +34,7 @@ func _on_settings_pressed() -> void: UI.get_node("UI/Settings").show() UI.get_node("UI/Settings/MarginContainer/VBoxContainer/Control/Back").hide() UI.get_node("UI/Settings/MarginContainer/VBoxContainer/Control/BackTitle").show() - TransitionScreen.mask.visible = true + UI.masks.mask.visible = true diff --git a/Scenes/transition_screen/transition_screen.gd.uid b/Scenes/transition_screen/transition_screen.gd.uid deleted file mode 100644 index ae70051..0000000 --- a/Scenes/transition_screen/transition_screen.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://dywfa5vbgtrkb diff --git a/Scenes/transition_screen/transition_screen.tscn b/Scenes/transition_screen/transition_screen.tscn index f7b8a4c..644d4d0 100644 --- a/Scenes/transition_screen/transition_screen.tscn +++ b/Scenes/transition_screen/transition_screen.tscn @@ -1,7 +1,39 @@ -[gd_scene load_steps=7 format=3 uid="uid://drk1l7ijo4xq5"] +[gd_scene load_steps=7 format=3 uid="uid://ct7ccfv6yj73u"] -[ext_resource type="Script" uid="uid://dywfa5vbgtrkb" path="res://Scenes/transition_screen/transition_screen.gd" id="1_hbjtk"] -[ext_resource type="Script" uid="uid://dbjei4d2lfwnb" path="res://Scenes/transition_screen/fading_mask.gd" id="2_m3r4n"] +[ext_resource type="Script" uid="uid://dbjei4d2lfwnb" path="res://Scenes/UI/fading_mask.gd" id="2_m3r4n"] + +[sub_resource type="GDScript" id="GDScript_3575e"] +script/source = "extends CanvasLayer + +@onready var fading_mask = $FadingMask +@onready var its_game_over = $ITSGameOver +@onready var mask = $Mask + +signal transition_finished + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass + + +#Transitions the scenes with a fading mask +func transition(scenes_to_hide, scenes_to_show): + + #Fade in + fading_mask.fade_in() + await fading_mask.animation.animation_finished + + #Hides and show appropriates scenes + for scene in scenes_to_hide: + scene.hide() + for scene in scenes_to_show: + scene.show() + + #Fade out + fading_mask.fade_out() + await fading_mask.animation.animation_finished + transition_finished.emit() +" [sub_resource type="Animation" id="Animation_n85x3"] length = 0.001 @@ -56,8 +88,8 @@ _data = { } [node name="transition_screen" type="CanvasLayer"] -layer = 102 -script = ExtResource("1_hbjtk") +layer = 98 +script = SubResource("GDScript_3575e") [node name="FadingMask" type="ColorRect" parent="."] modulate = Color(0, 0, 0, 0) diff --git a/project.godot b/project.godot index de53515..5c1e7eb 100644 --- a/project.godot +++ b/project.godot @@ -17,7 +17,6 @@ config/features=PackedStringArray("4.5", "Forward Plus") [autoload] Globals="*res://Scenes/main/globals.gd" -TransitionScreen="*res://Scenes/transition_screen/transition_screen.tscn" UI="*res://Scenes/UI/ui.tscn" Patient="*res://Scenes/screening_desk/patient_global.gd" DialogueManager="*res://addons/dialogue_manager/dialogue_manager.gd"