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")
|
||||
[#angry] Its gaze stays fixated on you as the doors close.
|
||||
do Globals.clear_patient.emit("terminate")
|
||||
do UI.save_slot_pressed.emit(0)
|
||||
=> END
|
||||
|
||||
|
||||
@@ -99,4 +100,5 @@ do Globals.clear_patient.emit("terminate")
|
||||
do Globals.color_change.emit("green")
|
||||
[#angry] Its gaze stays fixated on you as the doors close.
|
||||
do Globals.clear_patient.emit("release")
|
||||
do UI.save_slot_pressed.emit(0)
|
||||
=> 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] The Republic withstands.
|
||||
- The Republic shelters.
|
||||
set Globals.event_index = 1
|
||||
do Globals.next_event.emit(1)
|
||||
=> END
|
||||
|
||||
- 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] The Republic withstands.
|
||||
- The Republic shelters.
|
||||
set Globals.event_index = 1
|
||||
do Globals.next_event.emit(1)
|
||||
=> END
|
||||
|
||||
=> END
|
||||
|
||||
|
||||
|
||||
~ 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: Do your Duty. For the Republic.
|
||||
|
||||
set Globals.event_index = 1
|
||||
do Globals.next_event.emit(1)
|
||||
=> 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))
|
||||
|
||||
WORK_IN_PROGRESS
|
||||
|
||||
set Globals.event_index = 1
|
||||
do Globals.next_event.emit()
|
||||
=> 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))
|
||||
|
||||
WORK_IN_PROGRESS
|
||||
|
||||
set Globals.event_index = 1
|
||||
do Globals.next_event.emit(1)
|
||||
=> 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))
|
||||
|
||||
WORK_IN_PROGRESS
|
||||
|
||||
set Globals.event_index = 1
|
||||
do Globals.next_event.emit(1)
|
||||
=> 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.
|
||||
func _ready() -> void:
|
||||
#Resets to initial state
|
||||
reset()
|
||||
|
||||
|
||||
#Reveals the game over screen
|
||||
func reveal():
|
||||
|
||||
|
||||
+1
-1
@@ -19,6 +19,6 @@ func _ready() -> void:
|
||||
)
|
||||
|
||||
#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)
|
||||
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.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))
|
||||
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
|
||||
|
||||
+1
-1
@@ -15,6 +15,6 @@ func _ready() -> void:
|
||||
back.pressed.connect(func(): self.hide())
|
||||
|
||||
#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)
|
||||
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="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_bottom = 2
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fevae"]
|
||||
border_width_top = 2
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_h6tq4"]
|
||||
bg_color = Color(0.39215687, 0.39215687, 0.39215687, 1)
|
||||
border_width_left = 4
|
||||
@@ -376,18 +379,36 @@ layout_mode = 2
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
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
|
||||
text = "
|
||||
[center]SAVE GAME[/center]"
|
||||
|
||||
[node name="AutoSaveSlot" type="Button" parent="PauseMenu/Save/MarginContainer/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 200)
|
||||
[node name="SeparationLine" type="PanelContainer" parent="PauseMenu/Save/MarginContainer/VBoxContainer"]
|
||||
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
|
||||
theme_override_fonts/font = ExtResource("2_vb7na")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
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"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
@@ -457,23 +478,42 @@ theme_override_constants/margin_bottom = 0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PauseMenu/Load/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 4
|
||||
|
||||
[node name="RichTextLabel" 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 = 30
|
||||
theme_override_font_sizes/normal_font_size = 35
|
||||
bbcode_enabled = true
|
||||
text = "
|
||||
[center]LOAD GAME[/center]"
|
||||
[center]SAVE GAME[/center]"
|
||||
|
||||
[node name="AutoSaveSlot" type="Button" parent="PauseMenu/Load/MarginContainer/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 200)
|
||||
[node name="SeparationLine" type="PanelContainer" parent="PauseMenu/Load/MarginContainer/VBoxContainer"]
|
||||
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
|
||||
theme_override_fonts/font = ExtResource("2_vb7na")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
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"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
@@ -512,6 +552,7 @@ theme_override_font_sizes/font_size = 20
|
||||
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")]
|
||||
visible = false
|
||||
z_index = 1
|
||||
custom_minimum_size = Vector2(1600, 600)
|
||||
layout_mode = 1
|
||||
|
||||
@@ -5,12 +5,13 @@ var day_count : int = 1
|
||||
var floor_count : int = -1
|
||||
var patient_count : int = 1
|
||||
var its_patient_count : int = 0
|
||||
var accurate_diagnoses : 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 = []
|
||||
var its_patients_seen = []
|
||||
var patient_id
|
||||
var event_index = 0
|
||||
|
||||
#Variables for UI
|
||||
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 terminate_display
|
||||
signal its_end
|
||||
signal next_event
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
|
||||
+23
-50
@@ -7,7 +7,6 @@ extends Control
|
||||
var balloon: Node
|
||||
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
|
||||
@@ -30,14 +29,15 @@ func _ready() -> void:
|
||||
|
||||
#Connecting Signals
|
||||
title_screen.new_game_pressed.connect(self._on_new_game_pressed)
|
||||
UI.save_slot_pressed.connect(self._on_save_slot_pressed)
|
||||
UI.load_slot_pressed.connect(self._on_load_slot_pressed)
|
||||
UI.save_slot_pressed.connect(self.save_game)
|
||||
UI.load_slot_pressed.connect(self.load_game)
|
||||
UI.main_menu_pressed.connect(self._on_main_menu_pressed)
|
||||
|
||||
UI.text_value_changed.connect(self._on_text_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.reload_checkpoint.pressed.connect(self.load_game.bind(0))
|
||||
|
||||
Globals.character_label_color_change.connect(self._on_character_label_color_change)
|
||||
Globals.start_balloon.connect(self.start_balloon)
|
||||
@@ -56,6 +56,7 @@ func _on_new_game_pressed():
|
||||
Globals.day_count = 1
|
||||
Globals.floor_count = -1
|
||||
Globals.patient_count = 0
|
||||
Globals.accurate_diagnoses = 0
|
||||
Globals.diagnoses_quota = 1
|
||||
Globals.daily_patient_limit = 6
|
||||
Globals.patients_seen.clear()
|
||||
@@ -68,39 +69,33 @@ func _on_new_game_pressed():
|
||||
start_day()
|
||||
|
||||
|
||||
|
||||
#Plays the entire introduction
|
||||
func play_intro():
|
||||
|
||||
#PART IN PROGRESS
|
||||
#WORK IN PROGRESS
|
||||
|
||||
#Starting the day
|
||||
start_day()
|
||||
|
||||
|
||||
|
||||
#Starts the day
|
||||
func start_day():
|
||||
|
||||
#Hiding Menu for cinematic impact
|
||||
UI.pause_menu.menu_button.hide()
|
||||
|
||||
#Transitioning to day screen
|
||||
$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]
|
||||
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]:
|
||||
$ScreeningDesk.middle_screen.update(Globals.day_count, Globals.floor_count, Globals.accurate_diagnoses, Globals.diagnoses_quota)
|
||||
|
||||
for scene in [$ScreeningDesk, UI.its_game_over]: #Resetting scenes
|
||||
scene.reset()
|
||||
$ScreeningDesk.journal_layer.update_journal(Globals.floor_count) #Updating Journal
|
||||
|
||||
#Transitioning to the screening desk
|
||||
scenes_to_hide = scenes_to_show
|
||||
@@ -108,13 +103,7 @@ func start_day():
|
||||
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.computer.next_patient_button.show()
|
||||
$ScreeningDesk.event_manager(Globals.event_index)
|
||||
|
||||
|
||||
#Saves game state on the selected save slot
|
||||
@@ -124,11 +113,12 @@ func save_game(save_slot_number:int):
|
||||
var save_data = {
|
||||
"day_count": Globals.day_count,
|
||||
"floor_count": Globals.floor_count,
|
||||
"event_index": Globals.event_index,
|
||||
"patient_count": Globals.patient_count,
|
||||
"accurate_diagnoses": Globals.accurate_diagnoses,
|
||||
"diagnoses_quota": Globals.diagnoses_quota,
|
||||
"daily_patient_limit": Globals.daily_patient_limit,
|
||||
"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()
|
||||
@@ -145,10 +135,8 @@ func save_game(save_slot_number:int):
|
||||
print("Failed to open file for saving.")
|
||||
|
||||
#Updating save/load slots information
|
||||
var save_slot_path = "Menu/Save/MarginContainer/VBoxContainer/SaveSlot" + str(save_slot_number)
|
||||
var load_slot_path = "Menu/Load/MarginContainer/VBoxContainer/LoadSlot" + str(save_slot_number)
|
||||
var save_slot = UI.get_node(save_slot_path)
|
||||
var load_slot = UI.get_node(load_slot_path)
|
||||
var save_slot = UI.pause_menu.save.save_slot[save_slot_number]
|
||||
var load_slot = UI.pause_menu.load.load_slot[save_slot_number]
|
||||
|
||||
save_slot.text = "FLOOR " + str(save_data["floor_count"]) + "\nSAVE DATE : " + str(save_data["save_date"])
|
||||
load_slot.text = save_slot.text
|
||||
@@ -176,11 +164,12 @@ func load_game(load_slot_number:int):
|
||||
print("Loaded save: " + str(load_data))
|
||||
Globals.day_count = load_data["day_count"]
|
||||
Globals.floor_count = load_data["floor_count"]
|
||||
Globals.event_index = int(load_data["event_index"])
|
||||
Globals.patient_count = load_data["patient_count"]
|
||||
Globals.accurate_diagnoses = load_data["accurate_diagnoses"]
|
||||
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()
|
||||
@@ -191,31 +180,17 @@ func load_game(load_slot_number:int):
|
||||
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():
|
||||
|
||||
#Removing mask
|
||||
UI.masks.mask.visible = false
|
||||
#Hiding loading menu and mask
|
||||
UI.masks.mask.hide()
|
||||
UI.pause_menu.reset()
|
||||
|
||||
#Clearing balloon
|
||||
clear_balloon()
|
||||
|
||||
#Hiding menus
|
||||
UI.get_node("Menu/Menu").hide()
|
||||
UI.get_node("Menu/UpperContainer").hide()
|
||||
|
||||
#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]
|
||||
UI.masks.transition(scenes_to_hide, scenes_to_show)
|
||||
await UI.masks.transition_finished
|
||||
@@ -225,12 +200,11 @@ func _on_main_menu_pressed():
|
||||
scene.reset()
|
||||
|
||||
|
||||
|
||||
#Updates Save/Load Slots based on Existing Saves
|
||||
func update_slots():
|
||||
|
||||
#Loops over the 4 save/load slots
|
||||
for save_number in range(1, Globals.save_slot_count + 1):
|
||||
#Loops over the 4 save/load slots + the autosaveslot
|
||||
for save_number in range(Globals.save_slot_count + 1):
|
||||
|
||||
#Retrieves save and load slots
|
||||
var save_slot = UI.pause_menu.save.save_slot[save_number]
|
||||
@@ -254,7 +228,6 @@ func update_slots():
|
||||
print("Failed to parse Loading Data.")
|
||||
|
||||
|
||||
|
||||
#Starts a balloon dialogue
|
||||
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 emotions : Dictionary
|
||||
var abnormal: bool
|
||||
var id : String
|
||||
|
||||
#Patient file
|
||||
var file_text : String
|
||||
@@ -59,14 +60,11 @@ func build_dialog_tree(tree_model: Array[int]) -> Dictionary: #Builds the dialog
|
||||
return tree
|
||||
|
||||
|
||||
func new_patient(patient_id):
|
||||
func load_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))
|
||||
|
||||
id = patient_id
|
||||
|
||||
#Loading Patient Files
|
||||
var config := ConfigFile.new()
|
||||
@@ -236,7 +234,6 @@ func next_patient() -> String: #Decides next patient ID
|
||||
_:
|
||||
next_patient_id = generate_patient_id()
|
||||
|
||||
|
||||
return next_patient_id
|
||||
|
||||
|
||||
@@ -248,7 +245,7 @@ func update_patient_list():
|
||||
if len(patient_list[i]) > 1:
|
||||
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:
|
||||
if len(its_patient_list) > 1:
|
||||
its_patient_list.erase(its_patient_id)
|
||||
|
||||
@@ -22,7 +22,6 @@ extends Control
|
||||
@onready var message_array: Array[String]
|
||||
|
||||
var main: Node
|
||||
var accurate_diagnoses = 0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
@@ -37,6 +36,7 @@ func _ready() -> void:
|
||||
journal.pressed.connect(journal_layer._on_journal_pressed)
|
||||
Globals.clear_patient.connect(self._on_clear_patient)
|
||||
Globals.color_change.connect(self._on_color_change)
|
||||
Globals.next_event.connect(self.event_manager)
|
||||
|
||||
room_assets.reset()
|
||||
hide() #Hiding ScreeningDesk
|
||||
@@ -44,23 +44,28 @@ func _ready() -> void:
|
||||
message_array.resize(3) #Setting up message array
|
||||
|
||||
|
||||
#Selecting next patient
|
||||
func new_patient():
|
||||
|
||||
var new_id = Patient.next_patient()
|
||||
#Patient.new_patient("49") #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
|
||||
#Manages what event should happen next
|
||||
func event_manager(event_index):
|
||||
match event_index:
|
||||
0:
|
||||
supervisor.dialogue("interfloor_" + str(-Globals.floor_count-1))
|
||||
1:
|
||||
console_screen.display(Globals.directives)
|
||||
computer.next_patient_button.show()
|
||||
2:
|
||||
descend_floor()
|
||||
|
||||
|
||||
func _on_call_next_patient_pressed(): #Brings in next patient and sets up the desk controls
|
||||
|
||||
#Selecting next_patient
|
||||
new_patient()
|
||||
#Selecting next 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
|
||||
var scenes_to_hide = [computer.next_patient_button, supervisor]
|
||||
@@ -109,9 +114,6 @@ func _on_call_next_patient_pressed(): #Brings in next patient and sets up the de
|
||||
tab.show()
|
||||
tab.set_mouse_filter(Control.MOUSE_FILTER_STOP)
|
||||
computer.patient_file.show()
|
||||
|
||||
#Updating patient_count
|
||||
Globals.patient_count += 1
|
||||
|
||||
|
||||
#Starts release or termination protocols when the corresponding button is pressed
|
||||
@@ -144,10 +146,14 @@ func _on_clear_patient(choice:String):
|
||||
|
||||
# Updating middle screen info and accurate_diagnoses value
|
||||
if (Patient.abnormal == true and choice == "terminate") or (Patient.abnormal == false and choice == "release"):
|
||||
accurate_diagnoses += 1
|
||||
Globals.accurate_diagnoses += 1
|
||||
else:
|
||||
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)
|
||||
Globals.accurate_diagnoses = 0 # Resetting to 0 if the player makes a wrong diagnosis
|
||||
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
|
||||
console_screen.display(message_array[1])
|
||||
@@ -170,12 +176,10 @@ func _on_clear_patient(choice:String):
|
||||
reset()
|
||||
|
||||
#Descending Floor if diagnoses_quota reached
|
||||
if accurate_diagnoses == Globals.diagnoses_quota:
|
||||
descend_floor()
|
||||
else:
|
||||
#Setting up UI
|
||||
computer.next_patient_button.show()
|
||||
console_screen.display(Globals.directives)
|
||||
if Globals.accurate_diagnoses == Globals.diagnoses_quota:
|
||||
Globals.event_index = 2
|
||||
|
||||
event_manager(Globals.event_index)
|
||||
|
||||
|
||||
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
|
||||
|
||||
#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
|
||||
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")
|
||||
@@ -208,28 +219,20 @@ func descend_floor(): #Descends to next floor
|
||||
await room_assets.backwall_animation.animation_finished
|
||||
|
||||
#Updating middle screen info
|
||||
Globals.floor_count -= 1
|
||||
accurate_diagnoses = 0
|
||||
Globals.diagnoses_quota += 1
|
||||
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)
|
||||
|
||||
#Resetting patient_count
|
||||
Globals.patient_count = 0
|
||||
|
||||
#Updating journal symptoms
|
||||
journal_layer.update_journal(Globals.floor_count)
|
||||
journal_layer.update_journal(Globals.floor_count)
|
||||
|
||||
#Hiding screen messages
|
||||
computer.screen.hide()
|
||||
console_screen.hide()
|
||||
|
||||
#Interfloor dialogue
|
||||
supervisor.dialogue("interfloor_" + str(-Globals.floor_count-1))
|
||||
await supervisor.dialogue_finished
|
||||
#Autosaving
|
||||
main.save_game(0)
|
||||
|
||||
#Setting up UI
|
||||
computer.next_patient_button.show()
|
||||
console_screen.display(Globals.directives)
|
||||
#Selecting next event
|
||||
event_manager(Globals.event_index)
|
||||
|
||||
|
||||
#Resets to initial state
|
||||
|
||||
@@ -22,21 +22,21 @@ func _ready() -> void:
|
||||
hide()
|
||||
|
||||
|
||||
func _on_new_game_pressed() -> void:
|
||||
func _on_new_game_pressed() -> void: #Starst a new game
|
||||
new_game_pressed.emit()
|
||||
|
||||
|
||||
func _on_load_pressed():
|
||||
func _on_load_pressed(): #Shows the Load menu
|
||||
UI.pause_menu.load.show()
|
||||
UI.masks.mask.show()
|
||||
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.masks.mask.show()
|
||||
UI.in_title_screen = true
|
||||
|
||||
|
||||
func _on_quit_game_pressed():
|
||||
func _on_quit_game_pressed(): #Quits the game
|
||||
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