Reorganizing

This commit is contained in:
Maurane
2026-01-26 18:04:39 +01:00
parent b3d31dffa9
commit b7086caa11
11 changed files with 250 additions and 222 deletions
+17 -12
View File
@@ -13,8 +13,6 @@ var balloon: Node
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
Patient.sort_patients()
#Adding Scenes
var title_screen = TitleScreen.instantiate()
var screening_desk = ScreeningDesk.instantiate()
@@ -42,10 +40,13 @@ func _ready() -> void:
UI.connect("auto_value_changed", self._on_auto_value_changed)
Globals.character_label_color_change.connect(self._on_character_label_color_change)
Globals.start_balloon.connect(self.start_balloon)
#Updating Save/Load Slots Information based on Existing Saves
update_slots()
#Sorting patients by floor
Patient.sort_patients()
# Starts a new game
@@ -105,8 +106,8 @@ func start_day():
await TransitionScreen.transition_finished
#Supervisor Dialogue
$ScreeningDesk.supervisor_dialogue(Globals.interfloor_dialogue, "interfloor_" + str(-Globals.floor_count-1))
await $ScreeningDesk.supervisor_dialogue_finished
$ScreeningDesk.supervisor.dialogue(Globals.interfloor_dialogue, "interfloor_" + str(-Globals.floor_count-1))
await $ScreeningDesk.supervisor.dialogue_finished
$ScreeningDesk.console_display(Globals.directives)
$ScreeningDesk.new_patient()
@@ -263,9 +264,12 @@ func start_balloon(balloon_type:String, dialogue_resource: Resource, start_title
get_tree().current_scene.add_child(balloon)
#Connects emotion signals if needed
if balloon_type == "screening":
DialogueManager.got_dialogue.connect($ScreeningDesk._change_emotion)
DialogueManager.got_dialogue.connect($ScreeningDesk._recording_text)
match balloon_type:
"screening":
DialogueManager.got_dialogue.connect($ScreeningDesk.patient._change_emotion)
DialogueManager.got_dialogue.connect($ScreeningDesk._recording_text)
"supervisor":
DialogueManager.got_dialogue.connect($ScreeningDesk.supervisor._change_emotion)
#Applies text settings to the balloon
balloon.dialogue_label.seconds_per_step = UI.text_speed
@@ -283,10 +287,11 @@ func clear_balloon():
balloon.queue_free()
#Disconnecting emotion signals
if DialogueManager.is_connected("got_dialogue", $ScreeningDesk._change_emotion):
DialogueManager.disconnect("got_dialogue", $ScreeningDesk._change_emotion)
if DialogueManager.is_connected("got_dialogue", $ScreeningDesk._recording_text):
DialogueManager.disconnect("got_dialogue", $ScreeningDesk._recording_text)
for function in [$ScreeningDesk.patient._change_emotion,
$ScreeningDesk._recording_text,
$ScreeningDesk.supervisor._change_emotion]:
if DialogueManager.is_connected("got_dialogue", function):
DialogueManager.disconnect("got_dialogue", function)
#Changes text_speed value