fix: attempted to remove tools. bug: now the game won't load.

This commit is contained in:
tiger tiger tiger 2025-12-08 18:30:02 +01:00
parent 7d299c8ddf
commit 796878b0ab
25 changed files with 58 additions and 72 deletions

View File

@ -4,7 +4,7 @@
[ext_resource type="FontFile" uid="uid://bdkb43smt08c0" path="res://import/fonts/Ubuntu-B.ttf" id="2_q6nhe"] [ext_resource type="FontFile" uid="uid://bdkb43smt08c0" path="res://import/fonts/Ubuntu-B.ttf" id="2_q6nhe"]
[sub_resource type="GDScript" id="GDScript_80ahk"] [sub_resource type="GDScript" id="GDScript_80ahk"]
script/source = "@tool script/source = "
extends Node2D extends Node2D
@export var current_station: Scenes.id = Scenes.id.ADULT_DND: @export var current_station: Scenes.id = Scenes.id.ADULT_DND:

View File

@ -5,7 +5,7 @@
[ext_resource type="Texture2D" uid="uid://bewykr0twbplg" path="res://base-environments/transition/import/textures/LateralTren_baseColor_upscayl_2x_realesrgan-x4plus-anime.png" id="5_6pwip"] [ext_resource type="Texture2D" uid="uid://bewykr0twbplg" path="res://base-environments/transition/import/textures/LateralTren_baseColor_upscayl_2x_realesrgan-x4plus-anime.png" id="5_6pwip"]
[sub_resource type="GDScript" id="GDScript_6pwip"] [sub_resource type="GDScript" id="GDScript_6pwip"]
script/source = "@tool script/source = "
extends Node3D extends Node3D
@export var door_open: bool: @export var door_open: bool:

View File

@ -6,7 +6,7 @@
[ext_resource type="ArrayMesh" uid="uid://f5fr2e5gq313" path="res://base-environments/youth_room/shaders/fairy_light_diode.res" id="4_qh8yy"] [ext_resource type="ArrayMesh" uid="uid://f5fr2e5gq313" path="res://base-environments/youth_room/shaders/fairy_light_diode.res" id="4_qh8yy"]
[sub_resource type="GDScript" id="GDScript_2caij"] [sub_resource type="GDScript" id="GDScript_2caij"]
script/source = "@tool script/source = "
extends Node3D extends Node3D
@export var light_array: Array[Vector3]: @export var light_array: Array[Vector3]:

View File

@ -3,7 +3,7 @@
[ext_resource type="PackedScene" uid="uid://c2uf5vwe2rdbd" path="res://base-environments/youth_room/import/cheeky-city.glb" id="1_yckvd"] [ext_resource type="PackedScene" uid="uid://c2uf5vwe2rdbd" path="res://base-environments/youth_room/import/cheeky-city.glb" id="1_yckvd"]
[sub_resource type="GDScript" id="GDScript_bfd5g"] [sub_resource type="GDScript" id="GDScript_bfd5g"]
script/source = "@tool script/source = "
extends Node3D extends Node3D
@export var light_energy:float = 0: @export var light_energy:float = 0:

View File

@ -1,4 +1,3 @@
@tool
extends CenterContainer extends CenterContainer
signal text_finished signal text_finished

View File

@ -4,12 +4,12 @@
[ext_resource type="Texture2D" uid="uid://dp1bv446sk2xf" path="res://addons/kenney_particle_pack/flare_01.png" id="2_ipdak"] [ext_resource type="Texture2D" uid="uid://dp1bv446sk2xf" path="res://addons/kenney_particle_pack/flare_01.png" id="2_ipdak"]
[sub_resource type="GDScript" id="GDScript_w4p0y"] [sub_resource type="GDScript" id="GDScript_w4p0y"]
script/source = "@tool script/source = "
extends Node3D extends Node3D
var has_stage var has_stage
@export_tool_button(\"Play Chest Animation\") var play_action = play_chest_animation #@export_tool_button(\"Play Chest Animation\") var play_action = play_chest_animation
func _ready() -> void: func _ready() -> void:
if not Engine.is_editor_hint(): if not Engine.is_editor_hint():

View File

@ -1,20 +1,19 @@
@tool
class_name ThemedButton extends Button class_name ThemedButton extends Button
@export_tool_button("Rebuild") var rebuild_action = rebuild #@export_tool_button("Rebuild") var rebuild_action := rebuild
@onready var side_decor: CompressedTexture2D = load("res://import/interface-elements/button_active.png") @onready var side_decor := load("res://import/interface-elements/button_active.png")
@onready var top_corner_decor: CompressedTexture2D = load("res://import/interface-elements/top_corner.png") @onready var top_corner_decor := load("res://import/interface-elements/top_corner.png")
@onready var lower_corner_decor: CompressedTexture2D = load("res://import/interface-elements/lower_corner.png") @onready var lower_corner_decor := load("res://import/interface-elements/lower_corner.png")
func _ready() -> void: func _ready() -> void:
rebuild() rebuild()
theme_changed.connect(rebuild) theme_changed.connect(rebuild)
resized.connect(rebuild) resized.connect(rebuild)
clip_contents = true clip_contents = true
var container: PanelContainer var container: PanelContainer
func rebuild(): func rebuild():
@ -38,7 +37,7 @@ func rebuild():
lower_corner.size = Vector2(size.y * lower_corner_decor.get_width() / lower_corner_decor.get_height(), size.y) lower_corner.size = Vector2(size.y * lower_corner_decor.get_width() / lower_corner_decor.get_height(), size.y)
lower_corner.set_anchors_preset(Control.PRESET_BOTTOM_RIGHT, true) lower_corner.set_anchors_preset(Control.PRESET_BOTTOM_RIGHT, true)
lower_corner.position = size-lower_corner.size lower_corner.position = size-lower_corner.size
_: _:
var side_thing:= TextureRect.new() var side_thing:= TextureRect.new()
side_thing.texture = side_decor side_thing.texture = side_decor

View File

@ -18,7 +18,7 @@ fill_from = Vector2(0.499433, 0.470085)
fill_to = Vector2(0.23814, 0.858974) fill_to = Vector2(0.23814, 0.858974)
[sub_resource type="GDScript" id="GDScript_2ph0d"] [sub_resource type="GDScript" id="GDScript_2ph0d"]
script/source = "@tool script/source = "
extends Sprite2D extends Sprite2D
var flame_progression: float = 0 var flame_progression: float = 0

View File

@ -1,4 +1,3 @@
@tool
extends TextureRect extends TextureRect
@export var textures: Dictionary[String, Texture] = {} @export var textures: Dictionary[String, Texture] = {}
@ -13,7 +12,7 @@ func _get_configuration_warnings() -> PackedStringArray:
func _ready() -> void: func _ready() -> void:
State.settings_changed.connect(update_img) State.settings_changed.connect(update_img)
update_img() update_img()
func update_img() -> void: func update_img() -> void:
if textures.keys().has(TranslationServer.get_locale()): if textures.keys().has(TranslationServer.get_locale()):
texture = textures[TranslationServer.get_locale()] texture = textures[TranslationServer.get_locale()]

View File

@ -1,4 +1,3 @@
@tool
class_name SaveGame extends Resource class_name SaveGame extends Resource
var _is_initialised: bool = false var _is_initialised: bool = false

View File

@ -1,4 +1,3 @@
@tool
extends Area2D extends Area2D
class_name Card class_name Card

View File

@ -1,4 +1,3 @@
@tool
class_name StickyNotePanel class_name StickyNotePanel
extends Panel extends Panel

View File

@ -1,5 +1,3 @@
@tool
extends Area2D extends Area2D
class_name StickyNote class_name StickyNote

View File

@ -1,4 +1,3 @@
@tool
class_name ChatMessage extends Resource class_name ChatMessage extends Resource
@export_multiline var text: String = "" @export_multiline var text: String = ""

View File

@ -1,4 +1,3 @@
@tool
class_name ChatView extends ScrollContainer class_name ChatView extends ScrollContainer
@export var messages: Array[ChatMessage] @export var messages: Array[ChatMessage]

View File

@ -1,8 +1,7 @@
@tool
extends CenterContainer extends CenterContainer
class_name Collectable_Ui class_name Collectable_Ui
@export var scene:Scenes.id = 0 @export var scene:Scenes.id = 0 as Scenes.id
@export var collapsed = true: @export var collapsed = true:
set(collapse): set(collapse):
@ -18,9 +17,9 @@ class_name Collectable_Ui
if is_inside_tree(): if is_inside_tree():
_show_buttons() _show_buttons()
collapsed = collapse collapsed = collapse
if collapse and has_stage: State.leave_stage(self) if collapse and has_stage: State.leave_stage(self)
@export var is_board: bool = false: @export var is_board: bool = false:
set(board): set(board):
is_board = board is_board = board
@ -31,9 +30,9 @@ class_name Collectable_Ui
@export var has_stage: bool = false: @export var has_stage: bool = false:
set(focused): set(focused):
print("set focus of card to ", focused) print("set focus of card to ", focused)
if has_stage == focused: return if has_stage == focused: return
if focused: if focused:
has_stage = true has_stage = true
collapsed = false collapsed = false
@ -42,7 +41,7 @@ class_name Collectable_Ui
elif has_stage: elif has_stage:
has_stage = false has_stage = false
get_viewport().gui_release_focus() get_viewport().gui_release_focus()
# FIXME needs to be outsourced to scene reference state # FIXME needs to be outsourced to scene reference state
@export var collected: bool = false: @export var collected: bool = false:
set(set_collected): set(set_collected):
@ -57,9 +56,9 @@ class_name Collectable_Ui
else: else:
$Panel/Content/Buttons/VBoxContainer/collect_or_listen.disabled = true $Panel/Content/Buttons/VBoxContainer/collect_or_listen.disabled = true
$Panel/Content/Buttons/VBoxContainer/put_back.show() $Panel/Content/Buttons/VBoxContainer/put_back.show()
else: else:
$Panel/Content/Buttons/VBoxContainer/collect_or_listen.disabled = false $Panel/Content/Buttons/VBoxContainer/collect_or_listen.disabled = false
@export var skipped: bool = false @export var skipped: bool = false
@export var item_name: String = "": @export var item_name: String = "":
@ -84,7 +83,7 @@ func _ready():
#$Panel/Content/Buttons/VBoxContainer/Summary.visible = State.provide_summaries #$Panel/Content/Buttons/VBoxContainer/Summary.visible = State.provide_summaries
#$Panel/Content/Buttons/VBoxContainer/skip.visible = State.allow_skipping #$Panel/Content/Buttons/VBoxContainer/skip.visible = State.allow_skipping
if visible and not collapsed: _show_buttons() if visible and not collapsed: _show_buttons()
content_notes = content_notes content_notes = content_notes
is_board = is_board is_board = is_board
item_name = item_name item_name = item_name
@ -93,7 +92,7 @@ func _hide_buttons():
if is_inside_tree(): if is_inside_tree():
if not State.reduce_motion: if not State.reduce_motion:
$AnimationPlayer.play_backwards("show_buttons") $AnimationPlayer.play_backwards("show_buttons")
func _show_buttons(): func _show_buttons():
if is_inside_tree(): if is_inside_tree():
if not State.reduce_motion: if not State.reduce_motion:
@ -102,7 +101,7 @@ func _show_buttons():
$AnimationPlayer.play("RESET") $AnimationPlayer.play("RESET")
else: else:
$AnimationPlayer.play("RESET") $AnimationPlayer.play("RESET")
func vanish(): func vanish():
if visible: if visible:
var tween = create_tween() var tween = create_tween()
@ -126,7 +125,7 @@ func reveal():
func _yoink_focus(): func _yoink_focus():
if not has_stage: if not has_stage:
State.transition_stage_to(self) State.transition_stage_to(self)
func _on_pick_button_pressed(): func _on_pick_button_pressed():
print("card collected!") print("card collected!")
if not is_board: if not is_board:
@ -146,5 +145,5 @@ func _on_skip_pressed():
emit_signal("scene_skipped", 1) emit_signal("scene_skipped", 1)
skipped = true skipped = true
$Panel/Content/Buttons/VBoxContainer/collect_or_listen.text = "collect (un-skip)" $Panel/Content/Buttons/VBoxContainer/collect_or_listen.text = "collect (un-skip)"
State.leave_stage(self) State.leave_stage(self)

View File

@ -5,7 +5,7 @@
[ext_resource type="Texture2D" uid="uid://d0ucjqi8tx6vt" path="res://import/interface-elements/frame.png" id="3_63j61"] [ext_resource type="Texture2D" uid="uid://d0ucjqi8tx6vt" path="res://import/interface-elements/frame.png" id="3_63j61"]
[sub_resource type="GDScript" id="GDScript_g0qhf"] [sub_resource type="GDScript" id="GDScript_g0qhf"]
script/source = "@tool script/source = "
extends Button extends Button
func hide(): func hide():

View File

@ -1,10 +1,9 @@
@tool
class_name CollectableUi extends CenterContainer class_name CollectableUi extends CenterContainer
@export var has_stage: bool = false: @export var has_stage: bool = false:
set(focused): set(focused):
if has_stage == focused: return if has_stage == focused: return
if focused: if focused:
has_stage = true has_stage = true
is_collapsed = false is_collapsed = false
@ -28,7 +27,7 @@ class_name CollectableUi extends CenterContainer
# if is_inside_tree(): # if is_inside_tree():
# _show_buttons() # _show_buttons()
# collapsed = collapse # collapsed = collapse
# #
# if collapse and has_stage: State.leave_stage(self) # if collapse and has_stage: State.leave_stage(self)
@export var scene: Scenes.id = Scenes.id.YOUTH_DRAEVEN: @export var scene: Scenes.id = Scenes.id.YOUTH_DRAEVEN:
@ -73,7 +72,7 @@ class_name CollectableUi extends CenterContainer
Scenes.id.ADULT_BURNOUT: Scenes.id.ADULT_BURNOUT:
if title_override == "": title_label.text = TranslationServer.translate("Paperwork") if title_override == "": title_label.text = TranslationServer.translate("Paperwork")
if subtitle_override == "": cn_label.text = "" if subtitle_override == "": cn_label.text = ""
if not Engine.is_editor_hint(): if not Engine.is_editor_hint():
is_collected = Scenes.is_sequence_repeating(scene) is_collected = Scenes.is_sequence_repeating(scene)
@export var is_collected: bool = false: @export var is_collected: bool = false:
@ -161,7 +160,7 @@ func _ready() -> void:
State.settings_changed.connect(_on_context_updated) State.settings_changed.connect(_on_context_updated)
%CollectButton.pressed.connect(collect_memento) %CollectButton.pressed.connect(collect_memento)
##TODO: add functions for remaining buttons ##TODO: add functions for remaining buttons
update_state() update_state()
func _on_context_updated(): func _on_context_updated():
@ -189,7 +188,7 @@ func try_reveal() -> bool:
animation_player.play("reveal") animation_player.play("reveal")
return true return true
return false return false
#func _process(_delta: float) -> void: #func _process(_delta: float) -> void:
# if not visible or Engine.is_editor_hint(): return # if not visible or Engine.is_editor_hint(): return
# if Input.is_action_just_pressed("collect_memento_ui"): # if Input.is_action_just_pressed("collect_memento_ui"):
@ -218,7 +217,7 @@ func _input(event: InputEvent) -> void:
func vanish(): func vanish():
if not visible: return if not visible: return
if is_expanded: if is_expanded:
animation_player.play("vanish_all") animation_player.play("vanish_all")
else: else:
@ -238,5 +237,5 @@ func _on_skip_pressed():
scene_skipped.emit(1) scene_skipped.emit(1)
was_skipped = true was_skipped = true
$Panel/Content/Buttons/VBoxContainer/collect_or_listen.text = "collect (un-skip)" $Panel/Content/Buttons/VBoxContainer/collect_or_listen.text = "collect (un-skip)"
State.leave_stage(self) State.leave_stage(self)

View File

@ -1,4 +1,3 @@
@tool
class_name SaveGameDisplay extends Button class_name SaveGameDisplay extends Button
var _is_built: bool = false var _is_built: bool = false

View File

@ -1,4 +1,3 @@
@tool
class_name SaveGameHandle extends CenterContainer class_name SaveGameHandle extends CenterContainer
signal picked(save_game: SaveGame) signal picked(save_game: SaveGame)
@ -72,8 +71,9 @@ func _on_game_picked(id: int):
if saves[id].current_room == 0: if saves[id].current_room == 0:
picked.emit(id) picked.emit(id)
else: else:
$Popup.show() pass
#picked.emit(id)
#$Popup.show() #FIXME: This popup is missing
else: else:
picked.emit(id) picked.emit(id)

View File

@ -3,7 +3,7 @@
[ext_resource type="Script" uid="uid://16y8yg750rxm" path="res://logic-scenes/main menu/video_settings.gd" id="1_sii8g"] [ext_resource type="Script" uid="uid://16y8yg750rxm" path="res://logic-scenes/main menu/video_settings.gd" id="1_sii8g"]
[sub_resource type="GDScript" id="GDScript_24hb5"] [sub_resource type="GDScript" id="GDScript_24hb5"]
script/source = "@tool script/source = "
extends SpinBox extends SpinBox
func reset(): func reset():

View File

@ -34,7 +34,7 @@ var currently_loading_room: String = "":
else: else:
menu_animation["parameters/conditions/loading_done"] = true menu_animation["parameters/conditions/loading_done"] = true
menu_animation["parameters/conditions/load_save"] = false menu_animation["parameters/conditions/load_save"] = false
currently_loading_room = path currently_loading_room = path
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
@ -45,7 +45,7 @@ func _ready():
await get_tree().process_frame await get_tree().process_frame
currently_loading_room = get_room_path_from_id(main_menu.save_game_handle.get_most_recent_save().current_room) currently_loading_room = get_room_path_from_id(main_menu.save_game_handle.get_most_recent_save().current_room)
State.pass_stage_to(main_menu) State.pass_stage_to(main_menu)
Scenes.scene_starting.connect(prepare_transition) Scenes.scene_starting.connect(prepare_transition)
Scenes.scene_finished.connect(transition) Scenes.scene_finished.connect(transition)
@ -62,7 +62,7 @@ func _process(_delta: float) -> void:
move_child(current_room, 0) move_child(current_room, 0)
currently_loading_room = "" currently_loading_room = ""
room_loaded.emit() room_loaded.emit()
if Input.is_action_just_pressed("reset_demo") and (OS.has_feature("demo") or true): if Input.is_action_just_pressed("reset_demo") and (OS.has_feature("demo") or true):
State.stage_list = [self] State.stage_list = [self]
_return_to_menu() _return_to_menu()
@ -95,11 +95,11 @@ func debug_youth():
func _return_to_menu(): func _return_to_menu():
State.active_save_game = null State.active_save_game = null
menu_animation["parameters/conditions/start_game"] = false menu_animation["parameters/conditions/start_game"] = false
State.pass_stage_to(main_menu) State.pass_stage_to(main_menu)
currently_loading_room = get_room_path_from_id(main_menu.save_game_handle.get_most_recent_save().current_room) currently_loading_room = get_room_path_from_id(main_menu.save_game_handle.get_most_recent_save().current_room)
menu_animation["parameters/conditions/return_to_menu"] = true menu_animation["parameters/conditions/return_to_menu"] = true
@ -108,17 +108,17 @@ func _return_to_menu():
_on_ready_to_unload() _on_ready_to_unload()
func load_save(save: SaveGame): func load_save(save: SaveGame):
if currently_loading_room != "": if currently_loading_room != "":
await(room_loaded) await(room_loaded)
if save.current_room != current_room.id: if save.current_room != current_room.id:
# TODO Prevent race condition from appearing when save is loaded while room is still loading. # TODO Prevent race condition from appearing when save is loaded while room is still loading.
currently_loading_room = get_room_path_from_id(save.current_room) currently_loading_room = get_room_path_from_id(save.current_room)
await(room_loaded) await(room_loaded)
menu_animation["parameters/conditions/start_game"] = true menu_animation["parameters/conditions/start_game"] = true
State.active_save_game = save State.active_save_game = save
in_game = true in_game = true
current_room.start_room() current_room.start_room()
@ -126,7 +126,7 @@ func load_save(save: SaveGame):
func _on_ready_to_unload(): func _on_ready_to_unload():
if get_child(0) is Node3D: if get_child(0) is Node3D:
get_child(0).free() get_child(0).free()
func get_room_path_from_id(id: State.rooms) -> String: func get_room_path_from_id(id: State.rooms) -> String:
match id: match id:
State.rooms.YOUTH, State.rooms.NULL: State.rooms.YOUTH, State.rooms.NULL:
@ -169,7 +169,7 @@ func prepare_transition(scene_id: Scenes.id, _repeat):
if not _repeat: if not _repeat:
currently_loading_room = get_room_path_from_id(State.rooms.TRANSITION) currently_loading_room = get_room_path_from_id(State.rooms.TRANSITION)
else: else:
currently_loading_room = get_room_path_from_id(State.rooms.ADULTHOOD) currently_loading_room = get_room_path_from_id(State.rooms.ADULTHOOD)
func transition(scene_id: Scenes.id, _repeat): func transition(scene_id: Scenes.id, _repeat):
@ -182,4 +182,3 @@ func transition(scene_id: Scenes.id, _repeat):
Scenes.end_current_sequence() Scenes.end_current_sequence()
else: else:
State.pass_stage_to(current_room) State.pass_stage_to(current_room)

View File

@ -446,6 +446,8 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
mouse_filter = 2 mouse_filter = 2
script = ExtResource("8_o0cpj") script = ExtResource("8_o0cpj")
saves = null
update_display = null
metadata/_custom_type_script = "uid://dugfwcvp7i01k" metadata/_custom_type_script = "uid://dugfwcvp7i01k"
[node name="CenterContainer" type="CenterContainer" parent="."] [node name="CenterContainer" type="CenterContainer" parent="."]

View File

@ -1,4 +1,3 @@
@tool
class_name MenuSetting extends Resource class_name MenuSetting extends Resource
enum Receivers { enum Receivers {

View File

@ -1,4 +1,3 @@
@tool
extends Node extends Node
#region configuration #region configuration