Envoi sur GitHub du projet updated

This commit is contained in:
Maurane
2026-01-07 12:47:48 +01:00
parent 34e887afd2
commit 3f1863f0c1
434 changed files with 16021 additions and 5685 deletions
+26 -32
View File
@@ -16,22 +16,16 @@ func _ready() -> void:
#Adding Scenes
var title_screen = TitleScreen.instantiate()
var screening_desk = ScreeningDesk.instantiate()
var bedroom = Bedroom.instantiate()
var text_screens = TextScreens.instantiate()
var dialogue_screens = DialogueScreens.instantiate()
add_child(title_screen)
add_child(screening_desk)
add_child(bedroom)
add_child(text_screens)
add_child(dialogue_screens)
#Naming Scenes
title_screen.name = "TitleScreen"
screening_desk.name = "ScreeningDesk"
bedroom.name = "Bedroom"
text_screens.name = "TextScreens"
dialogue_screens.name = "DialogueScreens"
#Showing TitleScreen
title_screen.show()
@@ -41,7 +35,6 @@ func _ready() -> void:
UI.connect("save_slot_pressed", self._on_save_slot_pressed)
UI.connect("load_slot_pressed", self._on_load_slot_pressed)
UI.connect("main_menu_pressed", self._on_main_menu_pressed)
screening_desk.connect("recovery_pressed", self._on_recovery_pressed)
UI.connect("text_value_changed", self._on_text_value_changed)
UI.connect("auto_value_changed", self._on_auto_value_changed)
@@ -54,30 +47,19 @@ func _ready() -> void:
# Starts a new game
func _on_new_game_pressed():
Globals.day_count = 1
# DISABLED FOR NOW SINCE THERE'S NO INTRO ANYMORE
#Offering to skip the introduction
var choice_text = "[center]Do you wish to skip the introduction ?[/center]"
UI.ask_confirmation(start_day, play_intro, choice_text)
#var choice_text = "[center]Do you wish to skip the introduction ?[/center]"
#UI.ask_confirmation(start_day, play_intro, choice_text)
start_day()
#Plays the entire introduction
func play_intro():
#Text Slides
var text_container = $TextScreens/MarginContainer/IntroBoxContainer/TextContainer
TransitionScreen.transition("big", [$TitleScreen], [$TextScreens, $TextScreens/MarginContainer/IntroBoxContainer/Header, text_container.get_child(0), UI, UI.get_node("UI/SkipContainer")])
await UI.next_slide
for i in 4:
TransitionScreen.transition("small", [text_container.get_child(i)], [text_container.get_child(i+1)])
await UI.next_slide
#Meeting room dialogue
TransitionScreen.transition("big", [$TextScreens, $TextScreens/MarginContainer, text_container.get_child(4), UI, UI.get_node("UI/SkipContainer")], [$DialogueScreens])
await TransitionScreen.transition_finished
start_balloon("big", Globals.dialogue_intro, "start")
await DialogueManager.dialogue_ended
#PART IN PROGRESS
#Starting the day
start_day()
@@ -93,20 +75,23 @@ func start_day():
#Transitioning to day screen
$TextScreens/Day.text = "[center]DAY " + str(Globals.day_count) + "[/center]"
var scenes_to_hide: Array[Node] = [$DialogueScreens, $TitleScreen, $Bedroom]
var scenes_to_hide: Array[Node] = [$TitleScreen]
var scenes_to_show: Array[Node] = [$TextScreens, $TextScreens/Day]
TransitionScreen.transition("big", scenes_to_hide, scenes_to_show)
await TransitionScreen.transition_finished
await get_tree().create_timer(2.0).timeout
await get_tree().create_timer(1.0).timeout
#Setting up new patient
$ScreeningDesk.console_display(Globals.directives)
$ScreeningDesk.accurate_diagnoses = 0 #Resetting accurate_diagnoses value at the day's beginning
$ScreeningDesk.new_patient()
$ScreeningDesk.update_middle_screen(Globals.day_count, Globals.floor_count, $ScreeningDesk.accurate_diagnoses, Globals.diagnoses_quota)
#Transitioning to the screening desk
scenes_to_hide = scenes_to_show
scenes_to_show = [$ScreeningDesk, $ScreeningDesk.alone_controls, UI, UI.get_node("UI/UpperContainer")]
scenes_to_show = [$ScreeningDesk, $ScreeningDesk.next_patient, UI, UI.get_node("UI/UpperContainer")]
TransitionScreen.transition("big", scenes_to_hide, scenes_to_show)
await TransitionScreen.transition_finished
#Setting up new patient
$ScreeningDesk.new_patient(Globals.patient_id)
@@ -135,8 +120,13 @@ func save_game(save_slot_number:int):
#Setting up save data
var save_data = {
"day_count": Globals.day_count,
"floor_count": Globals.floor_count,
"patient_count": Globals.patient_count,
"diagnoses_quota": Globals.diagnoses_quota,
"daily_patient_limit": Globals.daily_patient_limit,
"patient_list": Globals.patient_list,
"patient_id": Globals.patient_id,
"patients_seen": Globals.patients_seen,
"save_date": Globals.get_save_date()
}
@@ -185,7 +175,11 @@ func load_game(load_slot_number:int):
print(load_data)
Globals.day_count = load_data["day_count"]
Globals.patient_count = load_data["patient_count"]
Globals.diagnoses_quota = load_data["diagnoses_quota"]
Globals.daily_patient_limit = load_data["daily_patient_limit"]
Globals.patient_list = load_data["patient_list"]
Globals.patient_id = load_data["patient_id"]
Globals.patients_seen = load_data["patients_seen"]
else:
print("Failed to parse Loading Data.")
@@ -194,7 +188,7 @@ func load_game(load_slot_number:int):
var scenes_to_show = [$ScreeningDesk, $ScreeningDesk.alone_controls, UI.get_node("UI/UpperContainer")]
TransitionScreen.transition("big", scenes_to_hide, scenes_to_show)
await TransitionScreen.transition_finished
$ScreeningDesk.new_patient(Globals.patient_id)
$ScreeningDesk.new_patient()
@@ -271,7 +265,7 @@ func start_balloon(panel_size:String, dialogue_resource: Resource, start_title:
get_tree().current_scene.add_child(balloon)
#Connects emotion signals if needed
if panel_size == "small":
if panel_size == "test":
DialogueManager.got_dialogue.connect($ScreeningDesk._change_emotion)
DialogueManager.got_dialogue.connect($ScreeningDesk._recording_text)