entity 01 WIP
This commit is contained in:
@@ -8,10 +8,7 @@ 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_seen = []
|
||||
var it_seen = []
|
||||
var patient_list = []
|
||||
var event_index = 0
|
||||
|
||||
#Variables for UI
|
||||
@@ -54,7 +51,12 @@ func _ready() -> void:
|
||||
terminate_messages[1] = Globals.colorize("- TERMINATING SUBJECT -", "orange_red")
|
||||
terminate_messages[2] = "EVALUATION RECORDED" + "\n\nPATIENT STATUS: " + Globals.colorize("ABNORMAL", "red") + "\n\nUPDATING DATABASE...\n\n" + Globals.colorize("INITIATING TERMINATION SEQUENCE", "orange_red")
|
||||
|
||||
pass
|
||||
#Generating patient list
|
||||
Globals.patient_list.clear()
|
||||
var patient_id : String
|
||||
for i in range(42,52):
|
||||
patient_id = "patient_" + str(i)
|
||||
Globals.patient_list.append(patient_id)
|
||||
|
||||
|
||||
#Gets the current time and day of the year
|
||||
|
||||
+19
-10
@@ -38,6 +38,8 @@ func _ready() -> void:
|
||||
|
||||
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))
|
||||
UI.entity_game_over.back_to_menu.pressed.connect(self._on_main_menu_pressed)
|
||||
UI.entity_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)
|
||||
@@ -59,7 +61,13 @@ func _on_new_game_pressed():
|
||||
Globals.accurate_diagnoses = 0
|
||||
Globals.diagnoses_quota = 1
|
||||
Globals.daily_patient_limit = 6
|
||||
Globals.patients_seen.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.entities_list = Patient.og_entities_list
|
||||
Patient.patients_seen.clear()
|
||||
Patient.its_seen.clear()
|
||||
Patient.entities_seen.clear()
|
||||
$ScreeningDesk.journal_layer.update_journal(-1)
|
||||
# DISABLED FOR NOW SINCE THERE'S NO INTRO ANYMORE
|
||||
#Offering to skip the introduction
|
||||
@@ -120,10 +128,10 @@ func save_game(save_slot_number:int):
|
||||
"daily_patient_limit": Globals.daily_patient_limit,
|
||||
"patient_list": Patient.patient_list,
|
||||
"its_list": Patient.its_list,
|
||||
"it_list": Patient.it_list,
|
||||
"entities_list": Patient.entities_list,
|
||||
"patients_seen": Patient.patients_seen,
|
||||
"its_seen": Patient.its_seen,
|
||||
"it_seen": Patient.it_seen,
|
||||
"entities_seen": Patient.entities_seen,
|
||||
"save_date": Globals.get_save_date()
|
||||
}
|
||||
#Creating save file
|
||||
@@ -141,7 +149,7 @@ func save_game(save_slot_number:int):
|
||||
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"])
|
||||
save_slot.text = "FLOOR " + str(int(save_data["floor_count"])) + "\nSAVE DATE : " + str(save_data["save_date"])
|
||||
load_slot.text = save_slot.text
|
||||
|
||||
|
||||
@@ -163,7 +171,7 @@ func load_game(load_slot_number:int):
|
||||
file.close()
|
||||
var load_data = JSON.parse_string(json_string)
|
||||
|
||||
if typeof(load_data) == 27: #Checks if loaded data is a Dictionary
|
||||
if load_data is Dictionary: #Checks if loaded data is a Dictionary
|
||||
print("Loaded save: " + str(load_data))
|
||||
Globals.day_count = load_data["day_count"]
|
||||
Globals.floor_count = load_data["floor_count"]
|
||||
@@ -172,13 +180,14 @@ func load_game(load_slot_number:int):
|
||||
Globals.accurate_diagnoses = load_data["accurate_diagnoses"]
|
||||
Globals.diagnoses_quota = load_data["diagnoses_quota"]
|
||||
Globals.daily_patient_limit = load_data["daily_patient_limit"]
|
||||
Patient.patient_list = load_data["patient_list"]
|
||||
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.it_list = load_data["it_list"]
|
||||
Patient.entities_list = load_data["entities_list"]
|
||||
Patient.patients_seen = load_data["patients_seen"]
|
||||
Patient.its_seen = load_data["its_seen"]
|
||||
Patient.it_seen = load_data["it_seen"]
|
||||
Patient.update_patient_list()
|
||||
Patient.entities_seen = load_data["entities_seen"]
|
||||
else:
|
||||
print("Failed to parse Loading Data.")
|
||||
|
||||
@@ -228,7 +237,7 @@ func update_slots():
|
||||
if typeof(load_data) == 27: #Checks if loaded data is a Dictionary
|
||||
#Updates save and load slots texts
|
||||
print("Initializing save slot #" + str(save_number) + " : " + str(load_data))
|
||||
save_slot.text = "FLOOR " + str(load_data["floor_count"]) + "\nSAVE DATE : " + str(load_data["save_date"])
|
||||
save_slot.text = "FLOOR " + str(int(load_data["floor_count"])) + "\nSAVE DATE : " + str(load_data["save_date"])
|
||||
load_slot.text = save_slot.text
|
||||
else:
|
||||
print("Failed to parse Loading Data.")
|
||||
|
||||
Reference in New Issue
Block a user