Dialogue responses rework
This commit is contained in:
@@ -9,7 +9,8 @@ var accurate_diagnoses : int = 0
|
||||
var diagnoses_quota : int = 1
|
||||
var daily_patient_limit : int = 3
|
||||
var patient_list = []
|
||||
var event_index = 0
|
||||
var event_index : String = ""
|
||||
var supervisor_index : int = 1
|
||||
|
||||
#Variables for UI
|
||||
var save_slot_count = 4 #How many save slots there are in the game, in addition to the autosave slot
|
||||
@@ -31,6 +32,7 @@ var buttons_activated: bool = true
|
||||
signal console_message
|
||||
signal response_chosen(DialogueResponse)
|
||||
signal clear_patient
|
||||
signal decision_made
|
||||
signal color_change
|
||||
signal character_label_color_change
|
||||
signal start_balloon
|
||||
|
||||
+6
-3
@@ -56,11 +56,12 @@ func _on_new_game_pressed():
|
||||
|
||||
#Setting/Resetting game parameters
|
||||
Globals.day_count = 1
|
||||
Globals.floor_count = -3
|
||||
Globals.floor_count = -2
|
||||
Globals.patient_count = 0
|
||||
Globals.accurate_diagnoses = 0
|
||||
Globals.diagnoses_quota = 4
|
||||
Globals.daily_patient_limit = 6
|
||||
Globals.event_index = "interfloor"
|
||||
for i in range(len(Patient.patient_list)):
|
||||
Patient.patient_list[i] = Patient.og_patient_list[i]
|
||||
Patient.its_list = Patient.og_its_list
|
||||
@@ -108,7 +109,7 @@ func start_day():
|
||||
UI.masks.transition(scenes_to_hide, scenes_to_show)
|
||||
await UI.masks.transition_finished
|
||||
|
||||
$ScreeningDesk.event_manager(Globals.event_index)
|
||||
$ScreeningDesk.event_manager()
|
||||
|
||||
|
||||
#Saves game state on the selected save slot
|
||||
@@ -119,6 +120,7 @@ func save_game(save_slot_number:int):
|
||||
"day_count": Globals.day_count,
|
||||
"floor_count": Globals.floor_count,
|
||||
"event_index": Globals.event_index,
|
||||
"supervisor_index": Globals.supervisor_index,
|
||||
"patient_count": Globals.patient_count,
|
||||
"accurate_diagnoses": Globals.accurate_diagnoses,
|
||||
"diagnoses_quota": Globals.diagnoses_quota,
|
||||
@@ -173,7 +175,8 @@ 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.event_index = load_data["event_index"]
|
||||
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"]
|
||||
|
||||
@@ -238,7 +238,7 @@ func next_patient() -> Dictionary: #Decides next patient ID
|
||||
next_id = generate_next_id(next_type)
|
||||
-3:
|
||||
if Globals.patient_count == 0:
|
||||
next_id = "it_that_feels"
|
||||
next_id = "it_that_feels_01"
|
||||
next_type = "entity"
|
||||
else:
|
||||
next_type = next_patient_type()
|
||||
@@ -261,7 +261,8 @@ func next_patient_type():
|
||||
-2:
|
||||
return "patient"
|
||||
-3:
|
||||
type_list.append("its")
|
||||
if len(its_list) > 0:
|
||||
type_list.append("its")
|
||||
for i in range(Globals.diagnoses_quota - 1):
|
||||
type_list.append("patient")
|
||||
print("Type List generated: " + str(type_list))
|
||||
@@ -283,7 +284,7 @@ func next_patient_type():
|
||||
return next_type
|
||||
|
||||
|
||||
#Erases current patient ID from the corresponding patient list, so it can't be seen twice
|
||||
#Erases current subject ID from the corresponding subject list, so it can't be seen twice
|
||||
func update_list():
|
||||
print("Patient type: " + str(Patient.type))
|
||||
match type:
|
||||
|
||||
@@ -35,6 +35,7 @@ func _ready() -> void:
|
||||
green_button.decision_made.connect(self._on_decision_made)
|
||||
journal.pressed.connect(journal_layer._on_journal_pressed)
|
||||
Globals.clear_patient.connect(self._on_clear_patient)
|
||||
Globals.decision_made.connect(self._on_decision_made)
|
||||
Globals.color_change.connect(self._on_color_change)
|
||||
Globals.next_event.connect(self.event_manager)
|
||||
|
||||
@@ -45,15 +46,17 @@ func _ready() -> void:
|
||||
|
||||
|
||||
#Manages what event should happen next
|
||||
func event_manager(event_index):
|
||||
match event_index:
|
||||
0:
|
||||
func event_manager():
|
||||
match Globals.event_index:
|
||||
"interfloor":
|
||||
supervisor.dialogue("interfloor_" + str(-Globals.floor_count-1))
|
||||
1:
|
||||
"next_patient":
|
||||
console_screen.display(Globals.directives)
|
||||
computer.next_patient_button.show()
|
||||
2:
|
||||
"descend":
|
||||
descend_floor()
|
||||
"supervisor":
|
||||
supervisor.dialogue("dialogue_" + str(Globals.supervisor_index))
|
||||
|
||||
|
||||
func _on_call_next_patient_pressed(): #Brings in next patient and sets up the desk controls
|
||||
@@ -176,9 +179,9 @@ func _on_clear_patient(choice:String):
|
||||
|
||||
#Descending Floor if diagnoses_quota reached
|
||||
if Globals.accurate_diagnoses == Globals.diagnoses_quota:
|
||||
Globals.event_index = 2
|
||||
Globals.event_index = "descend"
|
||||
|
||||
event_manager(Globals.event_index)
|
||||
event_manager()
|
||||
|
||||
|
||||
func _on_color_change(color: String): #Modulating backroom and patient colors
|
||||
@@ -198,7 +201,7 @@ 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.event_index = "interfloor"
|
||||
Globals.floor_count -= 1
|
||||
Globals.accurate_diagnoses = 0
|
||||
Globals.diagnoses_quota += 1
|
||||
@@ -227,7 +230,7 @@ func descend_floor(): #Descends to next floor
|
||||
main.save_game(0)
|
||||
|
||||
#Selecting next event
|
||||
event_manager(Globals.event_index)
|
||||
event_manager()
|
||||
|
||||
|
||||
#Resets to initial state
|
||||
|
||||
Reference in New Issue
Block a user