Save/Load System done

This commit is contained in:
2025-06-15 20:53:10 +02:00
parent 2e4bf232b8
commit fb74a1cd10
11 changed files with 653 additions and 149 deletions
+8 -13
View File
@@ -178,24 +178,19 @@ func _change_emotion(dialogue_line) -> void:
func _on_containment_pressed():
#Asking for Confirmation
var lambda = func(): clear_patient("containment")
UI.confirmation_text.text = "[center]Do you really want to send this patient to [color=darkred]Containment[/color] ?[/center]"
UI.confirmation_yes.pressed.connect(lambda, CONNECT_ONE_SHOT)
UI.confirmation_no.pressed.connect(func(): UI.confirmation_yes.disconnect("pressed", lambda))
UI.confirmation_dialog.show()
TransitionScreen.mask.visible = true
var choice_text = "[center]Do you really want to send this patient to [color=darkred]Containment[/color] ?[/center]"
UI.ask_confirmation(lambda, Callable(), choice_text)
func _on_psych_ward_pressed():
#Asking for Confirmation
var lambda = func(): clear_patient("psych_ward")
UI.confirmation_text.text = "[center]Do you really want to send this patient to the [color=darkgreen]Psych Ward[/color] ?[/center]"
UI.confirmation_yes.pressed.connect(lambda, CONNECT_ONE_SHOT)
UI.confirmation_no.pressed.connect(func(): UI.confirmation_yes.disconnect("pressed", lambda))
UI.confirmation_dialog.show()
TransitionScreen.mask.visible = true
var choice_text = "[center]Do you really want to send this patient to the [color=darkgreen]Psych Ward[/color] ?[/center]"
UI.ask_confirmation(lambda, Callable(), choice_text)
@@ -244,7 +239,7 @@ func clear_patient(choice:String):
#Setting Up Next Patient
new_patient("564")
else:
Globals.patient_count = 0
Globals.patient_count = 1
#Starting End of Day Dialogue
var start_title = "end_of_day_" + str(Globals.day_count)