new abnormal special WIP
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -92,6 +92,7 @@ do Globals.console_message.emit("[color=dark_orange]ALLOTED ASSESSMENT TIME ELAP
|
|||||||
do Globals.color_change.emit("red")
|
do Globals.color_change.emit("red")
|
||||||
[#angry] Its gaze stays fixated on you as the doors close.
|
[#angry] Its gaze stays fixated on you as the doors close.
|
||||||
do Globals.clear_patient.emit("terminate")
|
do Globals.clear_patient.emit("terminate")
|
||||||
|
do UI.save_slot_pressed.emit(0)
|
||||||
=> END
|
=> END
|
||||||
|
|
||||||
|
|
||||||
@@ -99,4 +100,5 @@ do Globals.clear_patient.emit("terminate")
|
|||||||
do Globals.color_change.emit("green")
|
do Globals.color_change.emit("green")
|
||||||
[#angry] Its gaze stays fixated on you as the doors close.
|
[#angry] Its gaze stays fixated on you as the doors close.
|
||||||
do Globals.clear_patient.emit("release")
|
do Globals.clear_patient.emit("release")
|
||||||
|
do UI.save_slot_pressed.emit(0)
|
||||||
=> END
|
=> END
|
||||||
@@ -12,6 +12,8 @@ Prime Supervisor Loeveth: [#neutral] The importance of your work here cannot be
|
|||||||
Prime Supervisor Loeveth: [#neutral] So be it. Do not disappoint me.
|
Prime Supervisor Loeveth: [#neutral] So be it. Do not disappoint me.
|
||||||
Prime Supervisor Loeveth: [#neutral] The Republic withstands.
|
Prime Supervisor Loeveth: [#neutral] The Republic withstands.
|
||||||
- The Republic shelters.
|
- The Republic shelters.
|
||||||
|
set Globals.event_index = 1
|
||||||
|
do Globals.next_event.emit(1)
|
||||||
=> END
|
=> END
|
||||||
|
|
||||||
- Yes, my memory could use some refreshing.
|
- Yes, my memory could use some refreshing.
|
||||||
@@ -55,9 +57,10 @@ Prime Supervisor Loeveth: [#neutral] The importance of your work here cannot be
|
|||||||
Prime Supervisor Loeveth: [#neutral] So be it. Do not disappoint me.
|
Prime Supervisor Loeveth: [#neutral] So be it. Do not disappoint me.
|
||||||
Prime Supervisor Loeveth: [#neutral] The Republic withstands.
|
Prime Supervisor Loeveth: [#neutral] The Republic withstands.
|
||||||
- The Republic shelters.
|
- The Republic shelters.
|
||||||
|
set Globals.event_index = 1
|
||||||
|
do Globals.next_event.emit(1)
|
||||||
=> END
|
=> END
|
||||||
|
|
||||||
=> END
|
|
||||||
|
|
||||||
|
|
||||||
~ interfloor_1
|
~ interfloor_1
|
||||||
@@ -74,6 +77,8 @@ Prime Supervisor: Do not get fooled by their inhuman humanity. Sort them accordi
|
|||||||
Prime Supervisor: Your [color=blue]journal[/color] has been updated with new symptoms to identify. Make sure to read it before your next patient.
|
Prime Supervisor: Your [color=blue]journal[/color] has been updated with new symptoms to identify. Make sure to read it before your next patient.
|
||||||
Prime Supervisor: Do your Duty. For the Republic.
|
Prime Supervisor: Do your Duty. For the Republic.
|
||||||
|
|
||||||
|
set Globals.event_index = 1
|
||||||
|
do Globals.next_event.emit(1)
|
||||||
=> END
|
=> END
|
||||||
|
|
||||||
|
|
||||||
@@ -86,7 +91,8 @@ set Patient.dialog_tree = Patient.build_dialog_tree([])
|
|||||||
do Globals.character_label_color_change.emit(Color(0,0.8,1,1))
|
do Globals.character_label_color_change.emit(Color(0,0.8,1,1))
|
||||||
|
|
||||||
WORK_IN_PROGRESS
|
WORK_IN_PROGRESS
|
||||||
|
set Globals.event_index = 1
|
||||||
|
do Globals.next_event.emit()
|
||||||
=> END
|
=> END
|
||||||
|
|
||||||
|
|
||||||
@@ -99,7 +105,8 @@ set Patient.dialog_tree = Patient.build_dialog_tree([21,22,23,24,61,62,63])
|
|||||||
do Globals.character_label_color_change.emit(Color(0,0.8,1,1))
|
do Globals.character_label_color_change.emit(Color(0,0.8,1,1))
|
||||||
|
|
||||||
WORK_IN_PROGRESS
|
WORK_IN_PROGRESS
|
||||||
|
set Globals.event_index = 1
|
||||||
|
do Globals.next_event.emit(1)
|
||||||
=> END
|
=> END
|
||||||
|
|
||||||
|
|
||||||
@@ -112,5 +119,6 @@ set Patient.dialog_tree = Patient.build_dialog_tree([21,22,23,24,61,62,63])
|
|||||||
do Globals.character_label_color_change.emit(Color(0,0.8,1,1))
|
do Globals.character_label_color_change.emit(Color(0,0.8,1,1))
|
||||||
|
|
||||||
WORK_IN_PROGRESS
|
WORK_IN_PROGRESS
|
||||||
|
set Globals.event_index = 1
|
||||||
|
do Globals.next_event.emit(1)
|
||||||
=> END
|
=> END
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
{"accurate_diagnoses":0,"daily_patient_limit":6,"day_count":1,"diagnoses_quota":2,"event_index":0,"floor_count":-2,"its_patients_seen":[],"patient_count":0,"patient_list":["42","43","44","45","46","47","48","49","50","51"],"patients_seen":["46"],"save_date":"03/05/2026, 12:53"}
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
{"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"}
|
{"accurate_diagnoses":0,"daily_patient_limit":6,"day_count":1,"diagnoses_quota":1,"event_index":1,"floor_count":-1,"its_patients_seen":[],"patient_count":1,"patient_list":["42","43","44","45","46","47","48","49","50","51"],"patients_seen":[],"save_date":"03/05/2026, 12:52"}
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
{"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"}
|
{"accurate_diagnoses":0,"daily_patient_limit":6,"day_count":1,"diagnoses_quota":2,"event_index":0,"floor_count":-2,"its_patients_seen":[],"patient_count":0,"patient_list":["42","43","44","45","46","47","48","49","50","51"],"patients_seen":["46"],"save_date":"03/05/2026, 12:53"}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"accurate_diagnoses":0,"daily_patient_limit":6,"day_count":1,"diagnoses_quota":2,"event_index":1,"floor_count":-2,"its_patients_seen":[],"patient_count":0,"patient_list":["42","43","44","45","46","47","48","49","50","51"],"patients_seen":["46"],"save_date":"03/05/2026, 12:53"}
|
||||||
@@ -8,9 +8,9 @@ extends Control
|
|||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
#Resets to initial state
|
||||||
reset()
|
reset()
|
||||||
|
|
||||||
|
|
||||||
#Reveals the game over screen
|
#Reveals the game over screen
|
||||||
func reveal():
|
func reveal():
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -19,6 +19,6 @@ func _ready() -> void:
|
|||||||
)
|
)
|
||||||
|
|
||||||
#Sets up save_slot array
|
#Sets up save_slot array
|
||||||
for i in range(1, Globals.save_slot_count + 1): #Goes from 1 to 4
|
for i in range(Globals.save_slot_count + 1): #Goes from 0 to 4
|
||||||
var slot_path = "MarginContainer/VBoxContainer/LoadSlot" + str(i)
|
var slot_path = "MarginContainer/VBoxContainer/LoadSlot" + str(i)
|
||||||
load_slot[i] = get_node(slot_path)
|
load_slot[i] = get_node(slot_path)
|
||||||
|
|||||||
@@ -33,9 +33,10 @@ func _ready() -> void:
|
|||||||
submenu.main_menu.pressed.connect(self._on_main_menu_pressed)
|
submenu.main_menu.pressed.connect(self._on_main_menu_pressed)
|
||||||
submenu.quit.pressed.connect(func(): get_tree().quit())
|
submenu.quit.pressed.connect(func(): get_tree().quit())
|
||||||
|
|
||||||
for i in range(1, Globals.save_slot_count + 1):
|
for i in range(1, Globals.save_slot_count + 1): #From 1 to 4, excludes the autosaveslot
|
||||||
save.save_slot[i].pressed.connect(self._on_save_slot_pressed.bind(i))
|
save.save_slot[i].pressed.connect(self._on_save_slot_pressed.bind(i))
|
||||||
load.load_slot[i].pressed.connect(self._on_load_slot_pressed.bind(i))
|
load.load_slot[i].pressed.connect(self._on_load_slot_pressed.bind(i))
|
||||||
|
load.load_slot[0].pressed.connect(self._on_load_slot_pressed.bind(0)) #Autosaveslot can be loaded but not saved upon
|
||||||
|
|
||||||
|
|
||||||
#Emits save_slot signal
|
#Emits save_slot signal
|
||||||
|
|||||||
+1
-1
@@ -15,6 +15,6 @@ func _ready() -> void:
|
|||||||
back.pressed.connect(func(): self.hide())
|
back.pressed.connect(func(): self.hide())
|
||||||
|
|
||||||
#Sets up save_slot array
|
#Sets up save_slot array
|
||||||
for i in range(1, Globals.save_slot_count + 1): #Goes from 1 to 4
|
for i in range(Globals.save_slot_count + 1): #Goes from 0 to 4
|
||||||
var slot_path = "MarginContainer/VBoxContainer/SaveSlot" + str(i)
|
var slot_path = "MarginContainer/VBoxContainer/SaveSlot" + str(i)
|
||||||
save_slot[i] = get_node(slot_path)
|
save_slot[i] = get_node(slot_path)
|
||||||
|
|||||||
+49
-8
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=32 format=3 uid="uid://dy40jygog8t3k"]
|
[gd_scene load_steps=33 format=3 uid="uid://dy40jygog8t3k"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://c0q67t6m1i4dl" path="res://Scenes/UI/ui.gd" id="1_mg12k"]
|
[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="FontFile" uid="uid://dv8ppra5tgn1t" path="res://Art/Fonts/PixelatedEleganceRegular-ovyAA.ttf" id="2_vb7na"]
|
||||||
@@ -76,6 +76,9 @@ border_width_top = 2
|
|||||||
border_width_right = 2
|
border_width_right = 2
|
||||||
border_width_bottom = 2
|
border_width_bottom = 2
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fevae"]
|
||||||
|
border_width_top = 2
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_h6tq4"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_h6tq4"]
|
||||||
bg_color = Color(0.39215687, 0.39215687, 0.39215687, 1)
|
bg_color = Color(0.39215687, 0.39215687, 0.39215687, 1)
|
||||||
border_width_left = 4
|
border_width_left = 4
|
||||||
@@ -376,18 +379,36 @@ layout_mode = 2
|
|||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
theme_override_fonts/normal_font = ExtResource("2_vb7na")
|
theme_override_fonts/normal_font = ExtResource("2_vb7na")
|
||||||
theme_override_font_sizes/normal_font_size = 30
|
theme_override_font_sizes/normal_font_size = 35
|
||||||
bbcode_enabled = true
|
bbcode_enabled = true
|
||||||
text = "
|
text = "
|
||||||
[center]SAVE GAME[/center]"
|
[center]SAVE GAME[/center]"
|
||||||
|
|
||||||
[node name="AutoSaveSlot" type="Button" parent="PauseMenu/Save/MarginContainer/VBoxContainer"]
|
[node name="SeparationLine" type="PanelContainer" parent="PauseMenu/Save/MarginContainer/VBoxContainer"]
|
||||||
custom_minimum_size = Vector2(0, 200)
|
layout_mode = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_fevae")
|
||||||
|
|
||||||
|
[node name="AutoSaveLabel" type="RichTextLabel" parent="PauseMenu/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 = 27
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "
|
||||||
|
[center]AUTOSAVE[/center]"
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="SaveSlot0" type="Button" parent="PauseMenu/Save/MarginContainer/VBoxContainer"]
|
||||||
|
custom_minimum_size = Vector2(0, 75)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_fonts/font = ExtResource("2_vb7na")
|
theme_override_fonts/font = ExtResource("2_vb7na")
|
||||||
theme_override_font_sizes/font_size = 27
|
theme_override_font_sizes/font_size = 27
|
||||||
text = "EMPTY"
|
text = "EMPTY"
|
||||||
|
|
||||||
|
[node name="SeparationLine2" type="PanelContainer" parent="PauseMenu/Save/MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_fevae")
|
||||||
|
|
||||||
[node name="SaveSlot1" type="Button" parent="PauseMenu/Save/MarginContainer/VBoxContainer"]
|
[node name="SaveSlot1" type="Button" parent="PauseMenu/Save/MarginContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
@@ -457,23 +478,42 @@ theme_override_constants/margin_bottom = 0
|
|||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="PauseMenu/Load/MarginContainer"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="PauseMenu/Load/MarginContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 4
|
||||||
|
|
||||||
[node name="RichTextLabel" type="RichTextLabel" parent="PauseMenu/Load/MarginContainer/VBoxContainer"]
|
[node name="RichTextLabel" type="RichTextLabel" parent="PauseMenu/Load/MarginContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
theme_override_fonts/normal_font = ExtResource("2_vb7na")
|
theme_override_fonts/normal_font = ExtResource("2_vb7na")
|
||||||
theme_override_font_sizes/normal_font_size = 30
|
theme_override_font_sizes/normal_font_size = 35
|
||||||
bbcode_enabled = true
|
bbcode_enabled = true
|
||||||
text = "
|
text = "
|
||||||
[center]LOAD GAME[/center]"
|
[center]SAVE GAME[/center]"
|
||||||
|
|
||||||
[node name="AutoSaveSlot" type="Button" parent="PauseMenu/Load/MarginContainer/VBoxContainer"]
|
[node name="SeparationLine" type="PanelContainer" parent="PauseMenu/Load/MarginContainer/VBoxContainer"]
|
||||||
custom_minimum_size = Vector2(0, 200)
|
layout_mode = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_fevae")
|
||||||
|
|
||||||
|
[node name="AutoSaveLabel" type="RichTextLabel" parent="PauseMenu/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 = 27
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "
|
||||||
|
[center]AUTOSAVE[/center]"
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="LoadSlot0" type="Button" parent="PauseMenu/Load/MarginContainer/VBoxContainer"]
|
||||||
|
custom_minimum_size = Vector2(0, 75)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_fonts/font = ExtResource("2_vb7na")
|
theme_override_fonts/font = ExtResource("2_vb7na")
|
||||||
theme_override_font_sizes/font_size = 27
|
theme_override_font_sizes/font_size = 27
|
||||||
text = "EMPTY"
|
text = "EMPTY"
|
||||||
|
|
||||||
|
[node name="SeparationLine2" type="PanelContainer" parent="PauseMenu/Load/MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_fevae")
|
||||||
|
|
||||||
[node name="LoadSlot1" type="Button" parent="PauseMenu/Load/MarginContainer/VBoxContainer"]
|
[node name="LoadSlot1" type="Button" parent="PauseMenu/Load/MarginContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
@@ -512,6 +552,7 @@ theme_override_font_sizes/font_size = 20
|
|||||||
text = "BACK"
|
text = "BACK"
|
||||||
|
|
||||||
[node name="Settings" type="PanelContainer" parent="PauseMenu" node_paths=PackedStringArray("text_slider", "auto_slider", "text_counter", "auto_counter", "autoplay", "auto_mask", "display_button", "resolution_button")]
|
[node name="Settings" type="PanelContainer" parent="PauseMenu" node_paths=PackedStringArray("text_slider", "auto_slider", "text_counter", "auto_counter", "autoplay", "auto_mask", "display_button", "resolution_button")]
|
||||||
|
visible = false
|
||||||
z_index = 1
|
z_index = 1
|
||||||
custom_minimum_size = Vector2(1600, 600)
|
custom_minimum_size = Vector2(1600, 600)
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
|
|||||||
@@ -5,12 +5,13 @@ var day_count : int = 1
|
|||||||
var floor_count : int = -1
|
var floor_count : int = -1
|
||||||
var patient_count : int = 1
|
var patient_count : int = 1
|
||||||
var its_patient_count : int = 0
|
var its_patient_count : int = 0
|
||||||
|
var accurate_diagnoses : int = 0
|
||||||
var diagnoses_quota : int = 1
|
var diagnoses_quota : int = 1
|
||||||
var daily_patient_limit : int = 3
|
var daily_patient_limit : int = 3
|
||||||
var patient_list = ["42", "43", "44", "45", "46", "47", "48", "49", "50", "51"]
|
var patient_list = ["42", "43", "44", "45", "46", "47", "48", "49", "50", "51"]
|
||||||
var patients_seen = []
|
var patients_seen = []
|
||||||
var its_patients_seen = []
|
var its_patients_seen = []
|
||||||
var patient_id
|
var event_index = 0
|
||||||
|
|
||||||
#Variables for UI
|
#Variables for UI
|
||||||
var save_slot_count = 4 #How many save slots there are in the game, in addition to the autosave slot
|
var save_slot_count = 4 #How many save slots there are in the game, in addition to the autosave slot
|
||||||
@@ -38,6 +39,7 @@ signal start_balloon
|
|||||||
signal release_display
|
signal release_display
|
||||||
signal terminate_display
|
signal terminate_display
|
||||||
signal its_end
|
signal its_end
|
||||||
|
signal next_event
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
|||||||
+22
-49
@@ -7,7 +7,6 @@ extends Control
|
|||||||
var balloon: Node
|
var balloon: Node
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
|
||||||
@@ -30,14 +29,15 @@ func _ready() -> void:
|
|||||||
|
|
||||||
#Connecting Signals
|
#Connecting Signals
|
||||||
title_screen.new_game_pressed.connect(self._on_new_game_pressed)
|
title_screen.new_game_pressed.connect(self._on_new_game_pressed)
|
||||||
UI.save_slot_pressed.connect(self._on_save_slot_pressed)
|
UI.save_slot_pressed.connect(self.save_game)
|
||||||
UI.load_slot_pressed.connect(self._on_load_slot_pressed)
|
UI.load_slot_pressed.connect(self.load_game)
|
||||||
UI.main_menu_pressed.connect(self._on_main_menu_pressed)
|
UI.main_menu_pressed.connect(self._on_main_menu_pressed)
|
||||||
|
|
||||||
UI.text_value_changed.connect(self._on_text_value_changed)
|
UI.text_value_changed.connect(self._on_text_value_changed)
|
||||||
UI.auto_value_changed.connect(self._on_auto_value_changed)
|
UI.auto_value_changed.connect(self._on_auto_value_changed)
|
||||||
|
|
||||||
UI.its_game_over.back_to_menu.pressed.connect(self._on_main_menu_pressed)
|
UI.its_game_over.back_to_menu.pressed.connect(self._on_main_menu_pressed)
|
||||||
|
UI.its_game_over.reload_checkpoint.pressed.connect(self.load_game.bind(0))
|
||||||
|
|
||||||
Globals.character_label_color_change.connect(self._on_character_label_color_change)
|
Globals.character_label_color_change.connect(self._on_character_label_color_change)
|
||||||
Globals.start_balloon.connect(self.start_balloon)
|
Globals.start_balloon.connect(self.start_balloon)
|
||||||
@@ -56,6 +56,7 @@ func _on_new_game_pressed():
|
|||||||
Globals.day_count = 1
|
Globals.day_count = 1
|
||||||
Globals.floor_count = -1
|
Globals.floor_count = -1
|
||||||
Globals.patient_count = 0
|
Globals.patient_count = 0
|
||||||
|
Globals.accurate_diagnoses = 0
|
||||||
Globals.diagnoses_quota = 1
|
Globals.diagnoses_quota = 1
|
||||||
Globals.daily_patient_limit = 6
|
Globals.daily_patient_limit = 6
|
||||||
Globals.patients_seen.clear()
|
Globals.patients_seen.clear()
|
||||||
@@ -68,39 +69,33 @@ func _on_new_game_pressed():
|
|||||||
start_day()
|
start_day()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Plays the entire introduction
|
#Plays the entire introduction
|
||||||
func play_intro():
|
func play_intro():
|
||||||
|
|
||||||
#PART IN PROGRESS
|
#WORK IN PROGRESS
|
||||||
|
|
||||||
#Starting the day
|
#Starting the day
|
||||||
start_day()
|
start_day()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Starts the day
|
#Starts the day
|
||||||
func start_day():
|
func start_day():
|
||||||
|
|
||||||
#Hiding Menu for cinematic impact
|
|
||||||
UI.pause_menu.menu_button.hide()
|
|
||||||
|
|
||||||
#Transitioning to day screen
|
#Transitioning to day screen
|
||||||
$TextScreens/Day.text = "[center]FLOOR " + str(Globals.floor_count) + "[/center]"
|
$TextScreens/Day.text = "[center]FLOOR " + str(Globals.floor_count) + "[/center]"
|
||||||
|
|
||||||
var scenes_to_hide: Array[Node] = [$TitleScreen, $TextScreens, $TextScreens/Day, $ScreeningDesk]
|
var scenes_to_hide: Array[Node] = [$TitleScreen, $ScreeningDesk, UI.pause_menu.menu_button, UI.its_game_over]
|
||||||
var scenes_to_show: Array[Node] = [$TextScreens, $TextScreens/Day]
|
var scenes_to_show: Array[Node] = [$TextScreens, $TextScreens/Day]
|
||||||
UI.masks.transition(scenes_to_hide, scenes_to_show)
|
UI.masks.transition(scenes_to_hide, scenes_to_show)
|
||||||
await UI.masks.transition_finished
|
await UI.masks.transition_finished
|
||||||
await get_tree().create_timer(1.0).timeout
|
await get_tree().create_timer(1.0).timeout
|
||||||
|
|
||||||
#Setting up new patient
|
#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, Globals.accurate_diagnoses, Globals.diagnoses_quota)
|
||||||
$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]: #Resetting scenes
|
||||||
for scene in [$ScreeningDesk, UI.its_game_over]:
|
|
||||||
scene.reset()
|
scene.reset()
|
||||||
|
$ScreeningDesk.journal_layer.update_journal(Globals.floor_count) #Updating Journal
|
||||||
|
|
||||||
#Transitioning to the screening desk
|
#Transitioning to the screening desk
|
||||||
scenes_to_hide = scenes_to_show
|
scenes_to_hide = scenes_to_show
|
||||||
@@ -108,13 +103,7 @@ func start_day():
|
|||||||
UI.masks.transition(scenes_to_hide, scenes_to_show)
|
UI.masks.transition(scenes_to_hide, scenes_to_show)
|
||||||
await UI.masks.transition_finished
|
await UI.masks.transition_finished
|
||||||
|
|
||||||
#Supervisor Dialogue
|
$ScreeningDesk.event_manager(Globals.event_index)
|
||||||
$ScreeningDesk.supervisor.dialogue("interfloor_" + str(-Globals.floor_count-1))
|
|
||||||
await $ScreeningDesk.supervisor.dialogue_finished
|
|
||||||
|
|
||||||
#Setting up UI
|
|
||||||
$ScreeningDesk.console_screen.display(Globals.directives)
|
|
||||||
$ScreeningDesk.computer.next_patient_button.show()
|
|
||||||
|
|
||||||
|
|
||||||
#Saves game state on the selected save slot
|
#Saves game state on the selected save slot
|
||||||
@@ -124,11 +113,12 @@ func save_game(save_slot_number:int):
|
|||||||
var save_data = {
|
var save_data = {
|
||||||
"day_count": Globals.day_count,
|
"day_count": Globals.day_count,
|
||||||
"floor_count": Globals.floor_count,
|
"floor_count": Globals.floor_count,
|
||||||
|
"event_index": Globals.event_index,
|
||||||
"patient_count": Globals.patient_count,
|
"patient_count": Globals.patient_count,
|
||||||
|
"accurate_diagnoses": Globals.accurate_diagnoses,
|
||||||
"diagnoses_quota": Globals.diagnoses_quota,
|
"diagnoses_quota": Globals.diagnoses_quota,
|
||||||
"daily_patient_limit": Globals.daily_patient_limit,
|
"daily_patient_limit": Globals.daily_patient_limit,
|
||||||
"patient_list": Globals.patient_list,
|
"patient_list": Globals.patient_list,
|
||||||
"patient_id": Globals.patient_id,
|
|
||||||
"patients_seen": Globals.patients_seen,
|
"patients_seen": Globals.patients_seen,
|
||||||
"its_patients_seen": Globals.its_patients_seen,
|
"its_patients_seen": Globals.its_patients_seen,
|
||||||
"save_date": Globals.get_save_date()
|
"save_date": Globals.get_save_date()
|
||||||
@@ -145,10 +135,8 @@ func save_game(save_slot_number:int):
|
|||||||
print("Failed to open file for saving.")
|
print("Failed to open file for saving.")
|
||||||
|
|
||||||
#Updating save/load slots information
|
#Updating save/load slots information
|
||||||
var save_slot_path = "Menu/Save/MarginContainer/VBoxContainer/SaveSlot" + str(save_slot_number)
|
var save_slot = UI.pause_menu.save.save_slot[save_slot_number]
|
||||||
var load_slot_path = "Menu/Load/MarginContainer/VBoxContainer/LoadSlot" + str(save_slot_number)
|
var load_slot = UI.pause_menu.load.load_slot[save_slot_number]
|
||||||
var save_slot = UI.get_node(save_slot_path)
|
|
||||||
var load_slot = UI.get_node(load_slot_path)
|
|
||||||
|
|
||||||
save_slot.text = "FLOOR " + str(save_data["floor_count"]) + "\nSAVE DATE : " + str(save_data["save_date"])
|
save_slot.text = "FLOOR " + str(save_data["floor_count"]) + "\nSAVE DATE : " + str(save_data["save_date"])
|
||||||
load_slot.text = save_slot.text
|
load_slot.text = save_slot.text
|
||||||
@@ -176,11 +164,12 @@ func load_game(load_slot_number:int):
|
|||||||
print("Loaded save: " + str(load_data))
|
print("Loaded save: " + str(load_data))
|
||||||
Globals.day_count = load_data["day_count"]
|
Globals.day_count = load_data["day_count"]
|
||||||
Globals.floor_count = load_data["floor_count"]
|
Globals.floor_count = load_data["floor_count"]
|
||||||
|
Globals.event_index = int(load_data["event_index"])
|
||||||
Globals.patient_count = load_data["patient_count"]
|
Globals.patient_count = load_data["patient_count"]
|
||||||
|
Globals.accurate_diagnoses = load_data["accurate_diagnoses"]
|
||||||
Globals.diagnoses_quota = load_data["diagnoses_quota"]
|
Globals.diagnoses_quota = load_data["diagnoses_quota"]
|
||||||
Globals.daily_patient_limit = load_data["daily_patient_limit"]
|
Globals.daily_patient_limit = load_data["daily_patient_limit"]
|
||||||
Globals.patient_list = load_data["patient_list"]
|
Globals.patient_list = load_data["patient_list"]
|
||||||
Globals.patient_id = load_data["patient_id"]
|
|
||||||
Globals.patients_seen = load_data["patients_seen"]
|
Globals.patients_seen = load_data["patients_seen"]
|
||||||
Globals.its_patients_seen = load_data["its_patients_seen"]
|
Globals.its_patients_seen = load_data["its_patients_seen"]
|
||||||
Patient.update_patient_list()
|
Patient.update_patient_list()
|
||||||
@@ -191,31 +180,17 @@ func load_game(load_slot_number:int):
|
|||||||
start_day()
|
start_day()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _on_save_slot_pressed(save_slot):
|
|
||||||
save_game(save_slot)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _on_load_slot_pressed(load_slot):
|
|
||||||
load_game(load_slot)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _on_main_menu_pressed():
|
func _on_main_menu_pressed():
|
||||||
|
|
||||||
#Removing mask
|
#Hiding loading menu and mask
|
||||||
UI.masks.mask.visible = false
|
UI.masks.mask.hide()
|
||||||
|
UI.pause_menu.reset()
|
||||||
|
|
||||||
#Clearing balloon
|
#Clearing balloon
|
||||||
clear_balloon()
|
clear_balloon()
|
||||||
|
|
||||||
#Hiding menus
|
|
||||||
UI.get_node("Menu/Menu").hide()
|
|
||||||
UI.get_node("Menu/UpperContainer").hide()
|
|
||||||
|
|
||||||
#Going back to main menu
|
#Going back to main menu
|
||||||
var scenes_to_hide = [$ScreeningDesk, $TextScreens, $TextScreens/Day, UI.its_game_over]
|
var scenes_to_hide = [$ScreeningDesk, $TextScreens, $TextScreens/Day, UI.its_game_over, UI.pause_menu.menu_button]
|
||||||
var scenes_to_show = [$TitleScreen]
|
var scenes_to_show = [$TitleScreen]
|
||||||
UI.masks.transition(scenes_to_hide, scenes_to_show)
|
UI.masks.transition(scenes_to_hide, scenes_to_show)
|
||||||
await UI.masks.transition_finished
|
await UI.masks.transition_finished
|
||||||
@@ -225,12 +200,11 @@ func _on_main_menu_pressed():
|
|||||||
scene.reset()
|
scene.reset()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Updates Save/Load Slots based on Existing Saves
|
#Updates Save/Load Slots based on Existing Saves
|
||||||
func update_slots():
|
func update_slots():
|
||||||
|
|
||||||
#Loops over the 4 save/load slots
|
#Loops over the 4 save/load slots + the autosaveslot
|
||||||
for save_number in range(1, Globals.save_slot_count + 1):
|
for save_number in range(Globals.save_slot_count + 1):
|
||||||
|
|
||||||
#Retrieves save and load slots
|
#Retrieves save and load slots
|
||||||
var save_slot = UI.pause_menu.save.save_slot[save_number]
|
var save_slot = UI.pause_menu.save.save_slot[save_number]
|
||||||
@@ -254,7 +228,6 @@ func update_slots():
|
|||||||
print("Failed to parse Loading Data.")
|
print("Failed to parse Loading Data.")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Starts a balloon dialogue
|
#Starts a balloon dialogue
|
||||||
func start_balloon(balloon_type:String, patient_type:String, dialogue_resource: Resource, start_title: String):
|
func start_balloon(balloon_type:String, patient_type:String, dialogue_resource: Resource, start_title: String):
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ var image : Texture2D
|
|||||||
var original_color: Color
|
var original_color: Color
|
||||||
var emotions : Dictionary
|
var emotions : Dictionary
|
||||||
var abnormal: bool
|
var abnormal: bool
|
||||||
|
var id : String
|
||||||
|
|
||||||
#Patient file
|
#Patient file
|
||||||
var file_text : String
|
var file_text : String
|
||||||
@@ -59,14 +60,11 @@ func build_dialog_tree(tree_model: Array[int]) -> Dictionary: #Builds the dialog
|
|||||||
return tree
|
return tree
|
||||||
|
|
||||||
|
|
||||||
func new_patient(patient_id):
|
func load_patient(patient_id):
|
||||||
|
|
||||||
var file_path: String
|
var file_path: String
|
||||||
|
|
||||||
#Updating Global variables
|
id = patient_id
|
||||||
Globals.patient_id = patient_id
|
|
||||||
Globals.patients_seen.append(patient_id)
|
|
||||||
print("Patients seen list: " + str(Globals.patients_seen))
|
|
||||||
|
|
||||||
#Loading Patient Files
|
#Loading Patient Files
|
||||||
var config := ConfigFile.new()
|
var config := ConfigFile.new()
|
||||||
@@ -236,7 +234,6 @@ func next_patient() -> String: #Decides next patient ID
|
|||||||
_:
|
_:
|
||||||
next_patient_id = generate_patient_id()
|
next_patient_id = generate_patient_id()
|
||||||
|
|
||||||
|
|
||||||
return next_patient_id
|
return next_patient_id
|
||||||
|
|
||||||
|
|
||||||
@@ -248,7 +245,7 @@ func update_patient_list():
|
|||||||
if len(patient_list[i]) > 1:
|
if len(patient_list[i]) > 1:
|
||||||
patient_list[i].erase(patient_id)
|
patient_list[i].erase(patient_id)
|
||||||
|
|
||||||
#Erasing its patients already seen from its patient list
|
#Erasing ITS patients already seen from ITS patient list
|
||||||
for its_patient_id in Globals.its_patients_seen:
|
for its_patient_id in Globals.its_patients_seen:
|
||||||
if len(its_patient_list) > 1:
|
if len(its_patient_list) > 1:
|
||||||
its_patient_list.erase(its_patient_id)
|
its_patient_list.erase(its_patient_id)
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ extends Control
|
|||||||
@onready var message_array: Array[String]
|
@onready var message_array: Array[String]
|
||||||
|
|
||||||
var main: Node
|
var main: Node
|
||||||
var accurate_diagnoses = 0
|
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
@@ -37,6 +36,7 @@ func _ready() -> void:
|
|||||||
journal.pressed.connect(journal_layer._on_journal_pressed)
|
journal.pressed.connect(journal_layer._on_journal_pressed)
|
||||||
Globals.clear_patient.connect(self._on_clear_patient)
|
Globals.clear_patient.connect(self._on_clear_patient)
|
||||||
Globals.color_change.connect(self._on_color_change)
|
Globals.color_change.connect(self._on_color_change)
|
||||||
|
Globals.next_event.connect(self.event_manager)
|
||||||
|
|
||||||
room_assets.reset()
|
room_assets.reset()
|
||||||
hide() #Hiding ScreeningDesk
|
hide() #Hiding ScreeningDesk
|
||||||
@@ -44,23 +44,28 @@ func _ready() -> void:
|
|||||||
message_array.resize(3) #Setting up message array
|
message_array.resize(3) #Setting up message array
|
||||||
|
|
||||||
|
|
||||||
#Selecting next patient
|
#Manages what event should happen next
|
||||||
func new_patient():
|
func event_manager(event_index):
|
||||||
|
match event_index:
|
||||||
var new_id = Patient.next_patient()
|
0:
|
||||||
#Patient.new_patient("49") #Line for testing purposes
|
supervisor.dialogue("interfloor_" + str(-Globals.floor_count-1))
|
||||||
Patient.new_patient(new_id) #Line for generating new patient
|
1:
|
||||||
|
console_screen.display(Globals.directives)
|
||||||
computer.patient_file.text = Patient.file_text
|
computer.next_patient_button.show()
|
||||||
computer.recording.text = ""
|
2:
|
||||||
patient.texture = Patient.image
|
descend_floor()
|
||||||
|
|
||||||
|
|
||||||
func _on_call_next_patient_pressed(): #Brings in next patient and sets up the desk controls
|
func _on_call_next_patient_pressed(): #Brings in next patient and sets up the desk controls
|
||||||
|
|
||||||
#Selecting next_patient
|
#Selecting next patient
|
||||||
new_patient()
|
Patient.load_patient(Patient.next_patient())
|
||||||
|
#Patient.load_patient("49") #Line for testing purposes
|
||||||
|
|
||||||
|
#Updating patient information
|
||||||
|
computer.patient_file.text = Patient.file_text
|
||||||
|
computer.recording.text = ""
|
||||||
|
patient.texture = Patient.image
|
||||||
|
|
||||||
#Hiding the next_patient button
|
#Hiding the next_patient button
|
||||||
var scenes_to_hide = [computer.next_patient_button, supervisor]
|
var scenes_to_hide = [computer.next_patient_button, supervisor]
|
||||||
@@ -110,9 +115,6 @@ func _on_call_next_patient_pressed(): #Brings in next patient and sets up the de
|
|||||||
tab.set_mouse_filter(Control.MOUSE_FILTER_STOP)
|
tab.set_mouse_filter(Control.MOUSE_FILTER_STOP)
|
||||||
computer.patient_file.show()
|
computer.patient_file.show()
|
||||||
|
|
||||||
#Updating patient_count
|
|
||||||
Globals.patient_count += 1
|
|
||||||
|
|
||||||
|
|
||||||
#Starts release or termination protocols when the corresponding button is pressed
|
#Starts release or termination protocols when the corresponding button is pressed
|
||||||
func _on_decision_made(choice: String):
|
func _on_decision_made(choice: String):
|
||||||
@@ -144,10 +146,14 @@ func _on_clear_patient(choice:String):
|
|||||||
|
|
||||||
# Updating middle screen info and accurate_diagnoses value
|
# Updating middle screen info and accurate_diagnoses value
|
||||||
if (Patient.abnormal == true and choice == "terminate") or (Patient.abnormal == false and choice == "release"):
|
if (Patient.abnormal == true and choice == "terminate") or (Patient.abnormal == false and choice == "release"):
|
||||||
accurate_diagnoses += 1
|
Globals.accurate_diagnoses += 1
|
||||||
else:
|
else:
|
||||||
accurate_diagnoses = 0 # Resetting to 0 if the player makes a wrong diagnosis
|
Globals.accurate_diagnoses = 0 # Resetting to 0 if the player makes a wrong diagnosis
|
||||||
middle_screen.update(Globals.day_count, Globals.floor_count, accurate_diagnoses, Globals.diagnoses_quota)
|
middle_screen.update(Globals.day_count, Globals.floor_count, Globals.accurate_diagnoses, Globals.diagnoses_quota)
|
||||||
|
|
||||||
|
Globals.patients_seen.append(Patient.id) #Updating Patient seens list
|
||||||
|
print("Updated patients seen list: " + str(Globals.patients_seen))
|
||||||
|
Globals.patient_count += 1 #Updating patient_count
|
||||||
|
|
||||||
#Showing second console message
|
#Showing second console message
|
||||||
console_screen.display(message_array[1])
|
console_screen.display(message_array[1])
|
||||||
@@ -170,12 +176,10 @@ func _on_clear_patient(choice:String):
|
|||||||
reset()
|
reset()
|
||||||
|
|
||||||
#Descending Floor if diagnoses_quota reached
|
#Descending Floor if diagnoses_quota reached
|
||||||
if accurate_diagnoses == Globals.diagnoses_quota:
|
if Globals.accurate_diagnoses == Globals.diagnoses_quota:
|
||||||
descend_floor()
|
Globals.event_index = 2
|
||||||
else:
|
|
||||||
#Setting up UI
|
event_manager(Globals.event_index)
|
||||||
computer.next_patient_button.show()
|
|
||||||
console_screen.display(Globals.directives)
|
|
||||||
|
|
||||||
|
|
||||||
func _on_color_change(color: String): #Modulating backroom and patient colors
|
func _on_color_change(color: String): #Modulating backroom and patient colors
|
||||||
@@ -194,6 +198,13 @@ func _on_color_change(color: String): #Modulating backroom and patient colors
|
|||||||
|
|
||||||
func descend_floor(): #Descends to next floor
|
func descend_floor(): #Descends to next floor
|
||||||
|
|
||||||
|
#Updating Global variables
|
||||||
|
Globals.event_index = 0
|
||||||
|
Globals.floor_count -= 1
|
||||||
|
Globals.accurate_diagnoses = 0
|
||||||
|
Globals.diagnoses_quota += 1
|
||||||
|
Globals.patient_count = 0
|
||||||
|
|
||||||
#Displaying information on screens
|
#Displaying information on screens
|
||||||
var message : String
|
var message : String
|
||||||
message = Globals.colorize("DIAGNOSES QUOTA REACHED", "green_yellow") + "\n\n" + "SECURITY CLEARANCE UPDATED" + "\n\n" + Globals.colorize("ACCESS TO NEXT FLOOR AUTHORIZED", "green")
|
message = Globals.colorize("DIAGNOSES QUOTA REACHED", "green_yellow") + "\n\n" + "SECURITY CLEARANCE UPDATED" + "\n\n" + Globals.colorize("ACCESS TO NEXT FLOOR AUTHORIZED", "green")
|
||||||
@@ -208,13 +219,7 @@ func descend_floor(): #Descends to next floor
|
|||||||
await room_assets.backwall_animation.animation_finished
|
await room_assets.backwall_animation.animation_finished
|
||||||
|
|
||||||
#Updating middle screen info
|
#Updating middle screen info
|
||||||
Globals.floor_count -= 1
|
middle_screen.update(Globals.day_count, Globals.floor_count, Globals.accurate_diagnoses, Globals.diagnoses_quota)
|
||||||
accurate_diagnoses = 0
|
|
||||||
Globals.diagnoses_quota += 1
|
|
||||||
middle_screen.update(Globals.day_count, Globals.floor_count, accurate_diagnoses, Globals.diagnoses_quota)
|
|
||||||
|
|
||||||
#Resetting patient_count
|
|
||||||
Globals.patient_count = 0
|
|
||||||
|
|
||||||
#Updating journal symptoms
|
#Updating journal symptoms
|
||||||
journal_layer.update_journal(Globals.floor_count)
|
journal_layer.update_journal(Globals.floor_count)
|
||||||
@@ -223,13 +228,11 @@ func descend_floor(): #Descends to next floor
|
|||||||
computer.screen.hide()
|
computer.screen.hide()
|
||||||
console_screen.hide()
|
console_screen.hide()
|
||||||
|
|
||||||
#Interfloor dialogue
|
#Autosaving
|
||||||
supervisor.dialogue("interfloor_" + str(-Globals.floor_count-1))
|
main.save_game(0)
|
||||||
await supervisor.dialogue_finished
|
|
||||||
|
|
||||||
#Setting up UI
|
#Selecting next event
|
||||||
computer.next_patient_button.show()
|
event_manager(Globals.event_index)
|
||||||
console_screen.display(Globals.directives)
|
|
||||||
|
|
||||||
|
|
||||||
#Resets to initial state
|
#Resets to initial state
|
||||||
|
|||||||
@@ -22,21 +22,21 @@ func _ready() -> void:
|
|||||||
hide()
|
hide()
|
||||||
|
|
||||||
|
|
||||||
func _on_new_game_pressed() -> void:
|
func _on_new_game_pressed() -> void: #Starst a new game
|
||||||
new_game_pressed.emit()
|
new_game_pressed.emit()
|
||||||
|
|
||||||
|
|
||||||
func _on_load_pressed():
|
func _on_load_pressed(): #Shows the Load menu
|
||||||
UI.pause_menu.load.show()
|
UI.pause_menu.load.show()
|
||||||
UI.masks.mask.show()
|
UI.masks.mask.show()
|
||||||
UI.in_title_screen = true
|
UI.in_title_screen = true
|
||||||
|
|
||||||
|
|
||||||
func _on_settings_pressed() -> void:
|
func _on_settings_pressed() -> void: #Shows the Settings menu
|
||||||
UI.pause_menu.settings.show()
|
UI.pause_menu.settings.show()
|
||||||
UI.masks.mask.show()
|
UI.masks.mask.show()
|
||||||
UI.in_title_screen = true
|
UI.in_title_screen = true
|
||||||
|
|
||||||
|
|
||||||
func _on_quit_game_pressed():
|
func _on_quit_game_pressed(): #Quits the game
|
||||||
get_tree().quit()
|
get_tree().quit()
|
||||||
|
|||||||
@@ -1,118 +0,0 @@
|
|||||||
[gd_scene load_steps=7 format=3 uid="uid://ct7ccfv6yj73u"]
|
|
||||||
|
|
||||||
[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
|
|
||||||
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="transition_screen" type="CanvasLayer"]
|
|
||||||
layer = 98
|
|
||||||
script = SubResource("GDScript_3575e")
|
|
||||||
|
|
||||||
[node name="FadingMask" type="ColorRect" parent="."]
|
|
||||||
modulate = Color(0, 0, 0, 0)
|
|
||||||
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("2_m3r4n")
|
|
||||||
|
|
||||||
[node name="FadingMaskAnimation" type="AnimationPlayer" parent="FadingMask"]
|
|
||||||
root_node = NodePath("../..")
|
|
||||||
libraries = {
|
|
||||||
&"": SubResource("AnimationLibrary_5yx4m")
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="Mask" 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.470588)
|
|
||||||
Reference in New Issue
Block a user