small changes

This commit is contained in:
2025-06-16 01:12:48 +02:00
parent fb74a1cd10
commit 2515716591
13 changed files with 86 additions and 87 deletions
@@ -1,10 +1,10 @@
[gd_scene load_steps=11 format=3 uid="uid://bh0e0uhmtk0ck"]
[ext_resource type="Script" path="res://Dialogues/balloon.gd" id="1_36de5"]
[ext_resource type="PackedScene" uid="uid://ckvgyvclnwggo" path="res://addons/dialogue_manager/dialogue_label.tscn" id="2_a8ve6"]
[ext_resource type="FontFile" uid="uid://mi5v1uq78g7o" path="res://Art/XanhMono-Italic.ttf" id="2_qju6n"]
[ext_resource type="FontFile" uid="uid://ckg5x0oonnjtn" path="res://Art/XanhMono-Regular.ttf" id="3_66oah"]
[ext_resource type="Script" path="res://addons/dialogue_manager/dialogue_reponses_menu.gd" id="3_72ixx"]
[ext_resource type="Script" path="res://Dialogues/balloon.gd" id="1_trhxk"]
[ext_resource type="FontFile" uid="uid://mi5v1uq78g7o" path="res://Art/XanhMono-Italic.ttf" id="2_8uhga"]
[ext_resource type="PackedScene" uid="uid://ckvgyvclnwggo" path="res://addons/dialogue_manager/dialogue_label.tscn" id="3_ek02p"]
[ext_resource type="FontFile" uid="uid://ckg5x0oonnjtn" path="res://Art/XanhMono-Regular.ttf" id="4_ovm88"]
[ext_resource type="Script" path="res://addons/dialogue_manager/dialogue_reponses_menu.gd" id="5_s4c7i"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_spyqn"]
bg_color = Color(0, 0, 0, 1)
@@ -67,7 +67,7 @@ Panel/styles/panel = SubResource("StyleBoxFlat_uy0d5")
[node name="ExampleBalloon" type="CanvasLayer"]
layer = 100
script = ExtResource("1_36de5")
script = ExtResource("1_trhxk")
[node name="Balloon" type="Control" parent="."]
unique_name_in_owner = true
@@ -107,22 +107,22 @@ unique_name_in_owner = true
modulate = Color(1, 1, 1, 0.501961)
layout_mode = 2
mouse_filter = 1
theme_override_fonts/normal_font = ExtResource("2_qju6n")
theme_override_fonts/normal_font = ExtResource("2_8uhga")
theme_override_font_sizes/normal_font_size = 25
bbcode_enabled = true
text = "Character"
fit_content = true
scroll_active = false
[node name="DialogueLabel" parent="Balloon/Panel/Dialogue/VBoxContainer" instance=ExtResource("2_a8ve6")]
[node name="DialogueLabel" parent="Balloon/Panel/Dialogue/VBoxContainer" instance=ExtResource("3_ek02p")]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 3
theme_override_fonts/normal_font = ExtResource("3_66oah")
theme_override_fonts/mono_font = ExtResource("3_66oah")
theme_override_fonts/italics_font = ExtResource("2_qju6n")
theme_override_fonts/bold_italics_font = ExtResource("2_qju6n")
theme_override_fonts/bold_font = ExtResource("3_66oah")
theme_override_fonts/normal_font = ExtResource("4_ovm88")
theme_override_fonts/mono_font = ExtResource("4_ovm88")
theme_override_fonts/italics_font = ExtResource("2_8uhga")
theme_override_fonts/bold_italics_font = ExtResource("2_8uhga")
theme_override_fonts/bold_font = ExtResource("4_ovm88")
theme_override_font_sizes/bold_italics_font_size = 30
theme_override_font_sizes/italics_font_size = 30
theme_override_font_sizes/mono_font_size = 30
@@ -149,7 +149,7 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 8
theme_override_constants/separation = 2
script = ExtResource("3_72ixx")
script = ExtResource("5_s4c7i")
response_template = NodePath("ResponseExample")
[node name="ResponseExample" type="Button" parent="Balloon/Responses/ResponsesMenu"]
-6
View File
@@ -4,9 +4,3 @@ extends Control
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
self.hide()
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
-6
View File
@@ -22,9 +22,3 @@ func build_dialog_tree(tree_model: Array[int]) -> Dictionary:
tree.merge(branch)
return tree
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
+22 -3
View File
@@ -1,5 +1,6 @@
extends Control
var balloon: Node
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
@@ -7,6 +8,24 @@ func _ready() -> void:
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func start_balloon(dialogue_resource: Resource, start_title: String):
#Freeing Previous Balloon and Disconnecting DialogueManager signals
clean_balloon()
#Instantiating a custom balloon
var balloon_path = "res://Dialogues/balloon_big.tscn"
var Balloon: Resource = load(balloon_path)
balloon = Balloon.instantiate()
get_tree().current_scene.add_child(balloon)
#Starting dialogue
balloon.start(dialogue_resource, start_title)
func clean_balloon():
#Freeing Previous Balloon
if is_instance_valid(balloon):
balloon.queue_free()
-6
View File
@@ -21,9 +21,3 @@ func get_save_date() -> String:
dt.month, dt.day, dt.year,
dt.hour, dt.minute
]
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
+19 -11
View File
@@ -6,6 +6,9 @@ extends Control
@export var TextScreens: PackedScene
@export var DialogueScreens: PackedScene
var balloon: Node
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
@@ -45,12 +48,6 @@ func _ready() -> void:
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
# Starts a new game
func _on_new_game_pressed():
Globals.day_count = 1
@@ -76,7 +73,7 @@ func play_intro():
TransitionScreen.transition("big", [$TextScreens, $TextScreens/MarginContainer, text_container.get_child(4), UI, UI.get_node("UI/SkipContainer")], [$DialogueScreens])
await TransitionScreen.transition_finished
DialogueManager.show_dialogue_balloon(Globals.dialogue_intro, "start")
$DialogueScreens.start_balloon(Globals.dialogue_intro, "start")
await DialogueManager.dialogue_ended
#Starting the day
@@ -115,7 +112,7 @@ func _on_recovery_pressed():
await TransitionScreen.transition_finished
#End of day dialogue
DialogueManager.show_dialogue_balloon(Globals.dialogue_recovery, "end_of_day_" + str(Globals.day_count))
$DialogueScreens.start_balloon(Globals.dialogue_recovery, "end_of_day_" + str(Globals.day_count))
await DialogueManager.dialogue_ended
#Start of the next day
@@ -160,11 +157,16 @@ func save_game(save_slot_number:int):
#Loads save file from the selected load slot
func load_game(load_slot_number:int):
#CLeaning balloons
$DialogueScreens.clean_balloon()
$ScreeningDesk.clean_balloon()
#Hiding loading menus and masks
TransitionScreen.mask.visible = false
UI.get_node("UI/Menu").hide()
UI.get_node("UI/UpperContainer").hide()
UI.get_node("UI/Load").hide()
UI.get_node("UI/LoadTitle").hide()
UI.get_node("UI/Menu").hide()
#Opening save file
var file = FileAccess.open("res://Saves/save_" + str(load_slot_number) + ".json", FileAccess.READ)
@@ -202,10 +204,16 @@ func _on_load_slot_pressed(load_slot):
func _on_main_menu_pressed():
#Hiding menu
#Removing mask
TransitionScreen.mask.visible = false
#Cleaning balloons
$DialogueScreens.clean_balloon()
$ScreeningDesk.clean_balloon()
#Hiding menus
UI.get_node("UI/Menu").hide()
UI.get_node("UI/UpperContainer").hide()
TransitionScreen.mask.visible = false
#Going back to main menu
var scenes_to_hide = [$ScreeningDesk, $Bedroom, $TextScreens, $TextScreens/Day, $ScreeningDesk.patient_controls, $ScreeningDesk.end_of_day_controls, $ScreeningDesk.patient_texture, $ScreeningDesk.panel_container, $ScreeningDesk.face_zoom] + $ScreeningDesk.margin_container.get_children()
+1 -1
View File
@@ -24,7 +24,7 @@ CurrentPatient="*res://current_patient.gd"
[dialogue_manager]
general/balloon_path="res://Dialogues/balloon.tscn"
general/balloon_path="res://Dialogues/balloon_big.tscn"
[display]
+14 -9
View File
@@ -93,6 +93,7 @@ func new_patient(patient_id):
#Show patient file
func _on_patient_file_pressed():
for node in margin_container.get_children():
@@ -103,6 +104,7 @@ func _on_patient_file_pressed():
#Show guidebook
func _on_guidebook_pressed():
for node in margin_container.get_children():
@@ -113,6 +115,7 @@ func _on_guidebook_pressed():
#Brings in next patient
func _on_call_next_patient_pressed():
#Hiding and Showing appropriate scenes
@@ -126,6 +129,7 @@ func _on_call_next_patient_pressed():
#Shows patient recording
func _on_patient_recording_pressed():
for node in margin_container.get_children():
@@ -136,6 +140,7 @@ func _on_patient_recording_pressed():
#Records the dialogues
func _recording_text(dialogue_line):
var line = dialogue_line.text
@@ -151,11 +156,12 @@ func _recording_text(dialogue_line):
else :
character_colour = "[color=darkred]"
patient_recording.append_text(character_colour + character + "[/color]\n")
patient_recording.append_text(line)
#Show face zoom
func _on_examine_pressed():
for node in margin_container.get_children():
@@ -165,6 +171,7 @@ func _on_examine_pressed():
#Change emotions following dialogue tags
func _change_emotion(dialogue_line) -> void:
var line_tag = dialogue_line.tags
@@ -178,6 +185,7 @@ func _change_emotion(dialogue_line) -> void:
func _on_containment_pressed():
#Ask for confirmation
var lambda = func(): clear_patient("containment")
var choice_text = "[center]Do you really want to send this patient to [color=darkred]Containment[/color] ?[/center]"
@@ -187,6 +195,7 @@ func _on_containment_pressed():
func _on_psych_ward_pressed():
#Ask for confirmation
var lambda = func(): clear_patient("psych_ward")
var choice_text = "[center]Do you really want to send this patient to the [color=darkgreen]Psych Ward[/color] ?[/center]"
@@ -194,6 +203,7 @@ func _on_psych_ward_pressed():
#Starting dialogue
func start_balloon(dialogue_resource: Resource, start_title: String):
#Freeing Previous Balloon and Disconnecting DialogueManager signals
@@ -211,6 +221,7 @@ func start_balloon(dialogue_resource: Resource, start_title: String):
#Clears patient and transitions towards next patient or end of day
func clear_patient(choice:String):
#Hiding Patient Controls and showing Patient Face
@@ -234,7 +245,7 @@ func clear_patient(choice:String):
TransitionScreen.transition("big", scenes_to_hide, scenes_to_show)
await TransitionScreen.transition_finished
if Globals.patient_count < Globals.daily_patient_limit:
#Setting Up Next Patient
new_patient("564")
@@ -254,6 +265,7 @@ func _on_recovery_pressed():
#Cleaning balloon
func clean_balloon():
#Freeing Previous Balloon and Disconnecting DialogueManager signals
@@ -263,10 +275,3 @@ func clean_balloon():
DialogueManager.disconnect("got_dialogue", _change_emotion)
if DialogueManager.is_connected("got_dialogue", _recording_text):
DialogueManager.disconnect("got_dialogue", _recording_text)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
+2 -8
View File
@@ -6,16 +6,10 @@ extends CanvasLayer
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
#Hiding everything
self.hide()
for node in intro_text_container.get_children():
node.hide()
$MarginContainer/IntroBoxContainer/Header.hide()
$Day.hide()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
+5 -10
View File
@@ -1,30 +1,25 @@
extends CanvasLayer
signal new_game_pressed
signal load_pressed
signal settings_pressed
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
#Connecting signals
$TitleScreen/MenuContainer/NewGame.pressed.connect(_on_new_game_pressed)
$TitleScreen/MenuContainer/Load.pressed.connect(_on_load_pressed)
$TitleScreen/MenuContainer/Settings.pressed.connect(_on_settings_pressed)
$TitleScreen/MenuContainer/QuitGame.pressed.connect(_on_quit_game_pressed)
#Hiding everything
self.hide()
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_new_game_pressed() -> void:
new_game_pressed.emit()
print("Starting New Game...")
@@ -33,9 +28,9 @@ func _on_load_pressed():
TransitionScreen.mask.visible = true
func _on_settings_pressed() -> void:
settings_pressed.emit()
pass
+9 -2
View File
@@ -14,20 +14,26 @@ signal transition_finished
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
#Hiding masks
big_fading.visible = false
small_fading.visible = false
mask.visible = false
#Connecting signals
big_animation.connect("animation_finished", _on_animation_finished)
small_animation.connect("animation_finished", _on_animation_finished)
func _on_animation_finished(anim_name):
#Fades back to normal when fade_to_black is done
if anim_name == "fade_to_black":
fading_finished.emit()
big_animation.play("fade_to_normal")
small_animation.play("fade_to_normal")
#Resets everything when fading_to_normal is done
elif anim_name == "fade_to_normal":
transition_finished.emit()
Globals.is_transitioning = false
@@ -53,10 +59,11 @@ func fading(size):
#Transitions the scenes
func transition(fading_screen_size, scenes_to_hide, scenes_to_show):
#Fade in and out
fading(fading_screen_size)
await self.fading_finished
#When the screen is black from fading, change the shown scenes before it fades back to normal
for scene in scenes_to_hide:
scene.hide()
for scene in scenes_to_show:
-2
View File
@@ -19,7 +19,6 @@ tracks/0/keys = {
[sub_resource type="Animation" id="Animation_20bx3"]
resource_name = "fade_to_black"
length = 2.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
@@ -35,7 +34,6 @@ tracks/0/keys = {
[sub_resource type="Animation" id="Animation_in743"]
resource_name = "fade_to_normal"
length = 2.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
-9
View File
@@ -204,12 +204,3 @@ func _on_load_slot_pressed(load_slot_number: int):
ask_confirmation(lambda, Callable(), choice_text)
else:
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass