big work
This commit is contained in:
+24
-22
@@ -53,20 +53,19 @@ func _ready() -> void:
|
||||
func _on_new_game_pressed():
|
||||
|
||||
#Setting/Resetting game parameters
|
||||
Globals.floor_count = -5
|
||||
Globals.floor_count = -1
|
||||
Globals.patient_count = 0
|
||||
Globals.accurate_diagnoses = 0
|
||||
Globals.diagnoses_quota = 2
|
||||
Globals.misdiagnoses = 0
|
||||
Globals.patient_quota = 2
|
||||
Globals.misdiagnoses_allowed = 2
|
||||
Globals.daily_patient_limit = 6
|
||||
Globals.event_index = "interfloor"
|
||||
Globals.objective_list.clear()
|
||||
for i in range(len(Patient.patient_list)):
|
||||
Patient.patient_list[i] = Patient.og_patient_list[i]
|
||||
Patient.its_list = Patient.og_its_list
|
||||
Patient.patients_seen.clear()
|
||||
Patient.its_seen.clear()
|
||||
Patient.spy.order = false
|
||||
Patient.spy.count = 0
|
||||
Patient.spy.reset()
|
||||
UI.in_title_screen = false
|
||||
# DISABLED FOR NOW SINCE THERE'S NO INTRO ANYMORE
|
||||
#Offering to skip the introduction
|
||||
#var choice_text = "Do you wish to skip the introduction ?"
|
||||
@@ -119,18 +118,16 @@ func save_game(save_slot_number:int):
|
||||
"supervisor_index": Globals.supervisor_index,
|
||||
"patient_count": Globals.patient_count,
|
||||
"accurate_diagnoses": Globals.accurate_diagnoses,
|
||||
"diagnoses_quota": Globals.diagnoses_quota,
|
||||
"misdiagnoses": Globals.misdiagnoses,
|
||||
"patient_quota": Globals.patient_quota,
|
||||
"misdiagnoses_allowed": Globals.misdiagnoses_allowed,
|
||||
"daily_patient_limit": Globals.daily_patient_limit,
|
||||
"patient_list": Patient.patient_list,
|
||||
"its_list": Patient.its_list,
|
||||
"ite_list": Patient.ite_list,
|
||||
"patients_seen": Patient.patients_seen,
|
||||
"its_seen": Patient.its_seen,
|
||||
"ite_seen": Patient.ite_seen,
|
||||
"spy_order": Patient.spy.order,
|
||||
"spy_count": Patient.spy.count,
|
||||
"journal_entities": $ScreeningDesk.journal_layer.journal.entities_page.text,
|
||||
"spy_symptoms": Patient.spy.symptoms,
|
||||
"spy_threshold": Patient.spy.threshold,
|
||||
"objective_list": Globals.objective_list,
|
||||
"save_date": Globals.get_save_date()
|
||||
}
|
||||
#Creating save file
|
||||
@@ -162,6 +159,7 @@ func load_game(load_slot_number:int):
|
||||
#Hiding loading menus and masks
|
||||
UI.masks.mask.hide()
|
||||
UI.pause_menu.reset()
|
||||
UI.in_title_screen = false #Leaving title_screen
|
||||
|
||||
#Opening save file
|
||||
var file = FileAccess.open("res://Saves/save_" + str(load_slot_number) + ".json", FileAccess.READ)
|
||||
@@ -177,20 +175,20 @@ func load_game(load_slot_number:int):
|
||||
Globals.supervisor_index = load_data["supervisor_index"]
|
||||
Globals.patient_count = load_data["patient_count"]
|
||||
Globals.accurate_diagnoses = load_data["accurate_diagnoses"]
|
||||
Globals.diagnoses_quota = load_data["diagnoses_quota"]
|
||||
Globals.misdiagnoses = load_data["misdiagnoses"]
|
||||
Globals.patient_quota = load_data["patient_quota"]
|
||||
Globals.misdiagnoses_allowed = load_data["misdiagnoses_allowed"]
|
||||
Globals.daily_patient_limit = load_data["daily_patient_limit"]
|
||||
Patient.patient_list.clear()
|
||||
Patient.patient_list.append_array(load_data["patient_list"])
|
||||
print (Patient.patient_list)
|
||||
Patient.its_list = load_data["its_list"]
|
||||
Patient.ite_list = load_data["ite_list"]
|
||||
Patient.patients_seen = load_data["patients_seen"]
|
||||
Patient.its_seen = load_data["its_seen"]
|
||||
Patient.ite_seen = load_data["ite_seen"]
|
||||
Patient.spy.order = load_data["spy_order"]
|
||||
Patient.spy.count = load_data["spy_count"]
|
||||
$ScreeningDesk.journal_layer.journal.entities_page.text = load_data["journal_entities"]
|
||||
Patient.spy.symptoms.clear()
|
||||
Patient.spy.symptoms.append_array(load_data["spy_symptoms"])
|
||||
Patient.spy.threshold = load_data["spy_threshold"]
|
||||
Globals.objective_list.clear()
|
||||
Globals.objective_list.append_array(load_data["objective_list"])
|
||||
else:
|
||||
print("Failed to parse Loading Data.")
|
||||
|
||||
@@ -207,6 +205,9 @@ func _on_main_menu_pressed():
|
||||
#Clearing balloon
|
||||
clear_balloon()
|
||||
|
||||
#Setting boolean
|
||||
UI.in_title_screen = true
|
||||
|
||||
#Going back to main menu
|
||||
var scenes_to_hide = [$ScreeningDesk, $TextScreens, $TextScreens/Day, UI.game_over, UI.pause_menu.menu_button]
|
||||
var scenes_to_show = [$TitleScreen]
|
||||
@@ -264,7 +265,8 @@ func start_balloon(balloon_type:String, patient_type:String, dialogue_resource:
|
||||
DialogueManager.got_dialogue.connect($ScreeningDesk.computer._recording_text)
|
||||
"supervisor":
|
||||
DialogueManager.got_dialogue.connect($ScreeningDesk.supervisor._change_emotion)
|
||||
|
||||
DialogueManager.got_dialogue.connect($ScreeningDesk.computer._recording_text)
|
||||
|
||||
#Applies text settings to the balloon
|
||||
balloon.dialogue_label.seconds_per_step = UI.pause_menu.settings.text_speed
|
||||
#balloon.dialogue_line.time = UI.auto_speed
|
||||
|
||||
Reference in New Issue
Block a user