Patient 47 Beginning
This commit is contained in:
+46
-15
@@ -29,6 +29,7 @@ extends Control
|
||||
@onready var backroom = $RoomAssets/Backroom
|
||||
@onready var red_backroom = $RoomAssets/RedBackroom
|
||||
@onready var green_backroom = $RoomAssets/GreenBackroom
|
||||
@onready var backwall_animation = $RoomAssets/Backwall/BackwallAnimation
|
||||
|
||||
#DialogueAssets
|
||||
@onready var patient_dialogue_resource: Resource
|
||||
@@ -88,10 +89,15 @@ func new_patient():
|
||||
|
||||
func _on_call_next_patient_pressed(): #Brings in next patient and sets up the desk controls
|
||||
|
||||
#Hiding the computer screen
|
||||
#Hiding the next_patient button and shows transition messages on computer and console
|
||||
var scenes_to_hide = [next_patient]
|
||||
for scenes in scenes_to_hide:
|
||||
scenes.hide()
|
||||
var message : String
|
||||
message = "TARGET ID : " + Globals.colorize("#" + Globals.patient_id, "orange_red") + "\n\n" + "COMPUTING CELL TRANSLATION..."
|
||||
computer_display(message)
|
||||
message = Globals.colorize("- BRINGING IN NEXT PATIENT -", "dark_orange")
|
||||
console_display(message)
|
||||
|
||||
#ShuttersIncoming
|
||||
shutters_animation.play("incoming")
|
||||
@@ -117,8 +123,9 @@ func _on_call_next_patient_pressed(): #Brings in next patient and sets up the de
|
||||
terminate.text = Globals.colorize("TERMINATE", "dark_red")
|
||||
|
||||
#Starting Dialogue and hiding console screen
|
||||
computer_screen.hide()
|
||||
console_screen.hide()
|
||||
main.start_balloon("test", Patient.dialogue_resource, "start")
|
||||
main.start_balloon("screening", Patient.dialogue_resource, "start")
|
||||
|
||||
#Showing Computer Tabs and showing Patient File by default
|
||||
for node in [tab_patient_file, tab_rules, tab_recording]:
|
||||
@@ -255,12 +262,14 @@ func clear_patient(choice:String): #Clears patient and transitions towards next
|
||||
|
||||
|
||||
#Final Patient Dialogue
|
||||
main.start_balloon("test", Patient.dialogue_resource, choice)
|
||||
main.start_balloon("screening", Patient.dialogue_resource, choice)
|
||||
await DialogueManager.dialogue_ended
|
||||
|
||||
#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"):
|
||||
accurate_diagnoses += 1
|
||||
else:
|
||||
accurate_diagnoses = 0 # Resetting to 0 if the player makes a wrong diagnosis
|
||||
update_middle_screen(Globals.day_count, Globals.floor_count, accurate_diagnoses, Globals.diagnoses_quota)
|
||||
|
||||
#Showing second console message
|
||||
@@ -281,20 +290,13 @@ func clear_patient(choice:String): #Clears patient and transitions towards next
|
||||
console_display(Globals.directives)
|
||||
computer_screen.hide()
|
||||
|
||||
#Updating patient count
|
||||
Globals.patient_count += 1
|
||||
if Globals.patient_count <= Globals.daily_patient_limit:
|
||||
print("daily_limit not reached")
|
||||
#Descending Floor if diagnoses_quota reached
|
||||
if accurate_diagnoses == Globals.diagnoses_quota:
|
||||
descend_floor()
|
||||
else:
|
||||
print("daily_limit reached")
|
||||
|
||||
if Globals.patient_count <= Globals.daily_patient_limit:
|
||||
#Setting Up Next Patient
|
||||
new_patient()
|
||||
next_patient.show()
|
||||
else:
|
||||
Globals.patient_count = 1
|
||||
end_day.show()
|
||||
|
||||
|
||||
#Reenabling mouse filter and resetting buttons
|
||||
for button in [green_button, red_button]:
|
||||
@@ -328,3 +330,32 @@ func update_middle_screen(day_count, floor_count, diagnoses_count, diagnoses_quo
|
||||
var text = "DAY: " + day + "\n\nFLOOR: " + floor + "\n\nACCURATE DIAGNOSES: " + diagnoses
|
||||
|
||||
middle_screen.text = text
|
||||
|
||||
func descend_floor(): #Descends to next floor
|
||||
|
||||
#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")
|
||||
computer_display(message)
|
||||
message = Globals.colorize("- DESCENT PROTOCOL INITIATED -\n\n- TRANSLATING TO NEXT FLOOR -", "dark_orange")
|
||||
console_display(message)
|
||||
|
||||
#Descending animation
|
||||
backwall_animation.play("going_down_1")
|
||||
await backwall_animation.animation_finished
|
||||
backwall_animation.play("going_down_2")
|
||||
await backwall_animation.animation_finished
|
||||
|
||||
#Updating middle screen info
|
||||
Globals.floor_count -= 1
|
||||
accurate_diagnoses = 0
|
||||
Globals.diagnoses_quota += 1
|
||||
update_middle_screen(Globals.day_count, Globals.floor_count, accurate_diagnoses, Globals.diagnoses_quota)
|
||||
|
||||
#Hiding screen messages
|
||||
computer_screen.hide()
|
||||
console_screen.hide()
|
||||
|
||||
#Setting up new patient
|
||||
new_patient()
|
||||
next_patient.show()
|
||||
|
||||
Reference in New Issue
Block a user