assuring scenes are unlocked by subway sequence and misc uncommitted changes

This commit is contained in:
betalars 2026-06-03 14:40:21 +02:00
parent 31cbc43c51
commit 70eca755b4
11 changed files with 137 additions and 86 deletions

View File

@ -13,6 +13,16 @@ class_name Fahrplan extends Node3D
$rosenthal : [null, null], # Endstation $rosenthal : [null, null], # Endstation
} }
@onready var sequence_lookup : Dictionary[Station, Scenes.id] = {
$hirschfeld: Scenes.id.ADULT_DND,
$uni_mensa: Scenes.id.ADULT_EATING,
$uni_main: Scenes.id.ADULT_SELF_ADVOCACY,
$parity_square: Scenes.id.ADULT_VOLUNTARY,
$saint_exupery: Scenes.id.ADULT_AUTISM,
$ministry: Scenes.id.ADULT_BURNOUT,
$rosenthal: Scenes.id.ADULT_THERAPY_UNI
}
## List of all registered station nodes, used to unparent them ## List of all registered station nodes, used to unparent them
@onready var stations : Array[Station] = fahrplan.keys() @onready var stations : Array[Station] = fahrplan.keys()
@onready var tracks : Array[Dolly] = [%Track0Dolly, %Track1Dolly] @onready var tracks : Array[Dolly] = [%Track0Dolly, %Track1Dolly]
@ -81,6 +91,7 @@ var cancellation_token : Array
func enter_station(station: Station): func enter_station(station: Station):
prints("------------", "ENTER STATION", station, station.name, "------------") prints("------------", "ENTER STATION", station, station.name, "------------")
Scenes.enabled_sequences += 1 << sequence_lookup[current]
remove_child(current) remove_child(current)
current = station current = station
add_child(station) add_child(station)

View File

@ -4,19 +4,26 @@ class_name VolunteerRoom
func _ready() -> void: func _ready() -> void:
super._ready() # UwU, superclass _ready is not called by Godot automatically... super._ready() # UwU, superclass _ready is not called by Godot automatically...
prints("volunteer_room.gd", "_ready()", self) prints("volunteer_room.gd", "_ready()", self)
func get_ready_async() -> void: func get_ready_async() -> void:
await super.get_ready_async() await super.get_ready_async()
%TherapyVoluntaryInteractable.visible = not save_game.subway_burnout if save_game.subway_uni:
%TherapyUniInteractable.visible = save_game.subway_burnout %TherapyVoluntaryInteractable.queue_free()
else:
%TherapyUniInteractable.queue_free()
card_board.board_completed.connect(func(): card_board.board_completed.connect(func():
save_game.childhood_board_complete = true save_game.childhood_board_complete = true
#%DoorInteractable.show() #%DoorInteractable.show()
) )
for child in $Collectables.get_children():
if child is Interactable:
if child.playable is StoryPlayable:
child.playable.text_finished.connect($Soundtrack._on_text_finished)
func start_room_async(): func start_room_async():
await super.start_room_async() await super.start_room_async()
@ -27,6 +34,10 @@ func start_room_async():
await Main.curtain.open() await Main.curtain.open()
func _input(event: InputEvent) -> void:
if event.is_action_pressed("unlock_cheat"):
Scenes.enabled_sequences = 255
func prepare_transition(): func prepare_transition():
pass pass

View File

@ -9,12 +9,10 @@ func _ready() -> void:
func get_ready() -> void: func get_ready() -> void:
await super.get_ready_async() await super.get_ready_async()
prints("youth_room.gd", "get_ready()", self) prints("youth_room.gd", "get_ready()", self)
await Main.curtain.open()
func start_room_async(): func start_room_async():
await super.start_room_async() await super.start_room_async()
await Main.curtain.open()
# To start breathing etc. # To start breathing etc.
%PlayerController.process_mode = PROCESS_MODE_INHERIT %PlayerController.process_mode = PROCESS_MODE_INHERIT

View File

@ -18,7 +18,7 @@ func create_bug_report():
GPU: %s GPU: %s
Current Scene: %s Current Scene: %s
Mementos: %s Mementos: %s
""" % [OS.get_name(), OS.get_video_adapter_driver_info(), State.room, Scenes.completed_sequences] """ % [OS.get_name(), OS.get_video_adapter_driver_info(), State.active_room, Scenes.completed_sequences]
#debug_text = debug_text.replace(" ", "%20").replace("\n", "%0A").replace("\t", "") #debug_text = debug_text.replace(" ", "%20").replace("\n", "%0A").replace("\t", "")

View File

@ -17,4 +17,4 @@ func vanish():
get_parent_control().visible = false get_parent_control().visible = false
#func _input(event: InputEvent) -> void: #func _input(event: InputEvent) -> void:
# print(event : InputEvent) # print(event : InputEvent)

View File

@ -1,19 +1,7 @@
[gd_scene load_steps=12 format=3 uid="uid://g2a27jwdapai"] [gd_scene format=3 uid="uid://g2a27jwdapai"]
[ext_resource type="Script" uid="uid://bbia2hcdwctyn" path="res://logic-scenes/card_burner/card_burner.gd" id="1_copuj"] [ext_resource type="Script" uid="uid://bbia2hcdwctyn" path="res://logic-scenes/card_burner/card_burner.gd" id="1_copuj"]
[ext_resource type="Texture2D" uid="uid://615hvpuiacvm" path="res://addons/input_prompts/icons/xbox/X.png" id="3_ckmi5"]
[ext_resource type="PackedScene" uid="uid://uc6urpgv7n1y" path="res://logic-scenes/card_burner/cursor_candle.tscn" id="3_l4ogr"] [ext_resource type="PackedScene" uid="uid://uc6urpgv7n1y" path="res://logic-scenes/card_burner/cursor_candle.tscn" id="3_l4ogr"]
[ext_resource type="Script" uid="uid://bbs1u7ojno7xo" path="res://addons/input_prompts/action_prompt/action_prompt.gd" id="4_x6cxt"]
[sub_resource type="InputEventKey" id="InputEventKey_j3x3g"]
device = -1
physical_keycode = 88
unicode = 120
[sub_resource type="InputEventJoypadButton" id="InputEventJoypadButton_ckmi5"]
device = -1
button_index = 2
pressed = true
[sub_resource type="InputEventAction" id="InputEventAction_23lqb"] [sub_resource type="InputEventAction" id="InputEventAction_23lqb"]
action = &"scene_skip" action = &"scene_skip"
@ -57,7 +45,7 @@ _data = {
&"vanish": SubResource("Animation_23lqb") &"vanish": SubResource("Animation_23lqb")
} }
[node name="CardBurner" type="CenterContainer"] [node name="CardBurner" type="CenterContainer" unique_id=1017592623]
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
@ -65,10 +53,10 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
script = ExtResource("1_copuj") script = ExtResource("1_copuj")
[node name="Control" type="Control" parent="."] [node name="Control" type="Control" parent="." unique_id=188103677]
layout_mode = 2 layout_mode = 2
[node name="ColorRect" type="ColorRect" parent="Control"] [node name="ColorRect" type="ColorRect" parent="Control" unique_id=1487768071]
show_behind_parent = true show_behind_parent = true
custom_minimum_size = Vector2(8192, 8192) custom_minimum_size = Vector2(8192, 8192)
layout_mode = 0 layout_mode = 0
@ -81,7 +69,7 @@ grow_vertical = 2
mouse_filter = 2 mouse_filter = 2
color = Color(0, 0, 0, 0.6745098) color = Color(0, 0, 0, 0.6745098)
[node name="Label" type="Label" parent="Control"] [node name="Label" type="Label" parent="Control" unique_id=136488023]
layout_mode = 1 layout_mode = 1
anchors_preset = 7 anchors_preset = 7
anchor_left = 0.5 anchor_left = 0.5
@ -99,7 +87,7 @@ text = "Life gave you some thoughts you did not choose to keep.
You may try to burn one." You may try to burn one."
horizontal_alignment = 1 horizontal_alignment = 1
[node name="Ancor1" type="Control" parent="Control"] [node name="Ancor1" type="Control" parent="Control" unique_id=1898529053]
unique_name_in_owner = true unique_name_in_owner = true
anchors_preset = 0 anchors_preset = 0
offset_left = -518.0 offset_left = -518.0
@ -108,7 +96,7 @@ offset_right = -518.0
offset_bottom = 14.0 offset_bottom = 14.0
rotation = -0.0352522 rotation = -0.0352522
[node name="Ancor2" type="Control" parent="Control"] [node name="Ancor2" type="Control" parent="Control" unique_id=285238472]
unique_name_in_owner = true unique_name_in_owner = true
anchors_preset = 0 anchors_preset = 0
offset_left = -183.0 offset_left = -183.0
@ -117,7 +105,7 @@ offset_right = -183.0
offset_bottom = 35.0 offset_bottom = 35.0
rotation = 0.0120591 rotation = 0.0120591
[node name="Ancor3" type="Control" parent="Control"] [node name="Ancor3" type="Control" parent="Control" unique_id=633629101]
unique_name_in_owner = true unique_name_in_owner = true
anchors_preset = 0 anchors_preset = 0
offset_left = 153.0 offset_left = 153.0
@ -126,7 +114,7 @@ offset_right = 153.0
offset_bottom = 22.0 offset_bottom = 22.0
rotation = -0.0139755 rotation = -0.0139755
[node name="Ancor4" type="Control" parent="Control"] [node name="Ancor4" type="Control" parent="Control" unique_id=1562773709]
unique_name_in_owner = true unique_name_in_owner = true
anchors_preset = 0 anchors_preset = 0
offset_left = 495.0 offset_left = 495.0
@ -135,7 +123,7 @@ offset_right = 495.0
offset_bottom = 15.0 offset_bottom = 15.0
rotation = 0.0245775 rotation = 0.0245775
[node name="HSplitContainer" type="HSplitContainer" parent="Control"] [node name="HSplitContainer" type="HSplitContainer" parent="Control" unique_id=1699915430]
layout_mode = 1 layout_mode = 1
anchors_preset = 5 anchors_preset = 5
anchor_left = 0.5 anchor_left = 0.5
@ -146,31 +134,16 @@ offset_right = 157.0
offset_bottom = 244.0 offset_bottom = 244.0
grow_horizontal = 2 grow_horizontal = 2
[node name="ActionPrompt" type="TextureRect" parent="Control/HSplitContainer"] [node name="SkipButton" type="Button" parent="Control/HSplitContainer" unique_id=316770646]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
texture = ExtResource("3_ckmi5")
expand_mode = 2
stretch_mode = 5
script = ExtResource("4_x6cxt")
action = "scene_skip"
icon = 0
events = Array[InputEvent]([null, SubResource("InputEventKey_j3x3g"), SubResource("InputEventJoypadButton_ckmi5")])
metadata/_custom_type_script = "uid://bbs1u7ojno7xo"
[node name="SkipButton" type="Button" parent="Control/HSplitContainer"]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
shortcut = SubResource("Shortcut_57mhv") shortcut = SubResource("Shortcut_57mhv")
text = "Keep all thoughts" text = "Keep all thoughts"
[node name="CandleCursor" parent="." instance=ExtResource("3_l4ogr")] [node name="CandleCursor" parent="." unique_id=2063791702 instance=ExtResource("3_l4ogr")]
unique_name_in_owner = true unique_name_in_owner = true
position = Vector2(1007, 1449) position = Vector2(1007, 1449)
[node name="AnimationPlayer" type="AnimationPlayer" parent="."] [node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=261836616]
root_node = NodePath("../Control/HSplitContainer") root_node = NodePath("../Control/HSplitContainer")
libraries = { libraries/ = SubResource("AnimationLibrary_kaqqi")
&"": SubResource("AnimationLibrary_kaqqi")
}

View File

@ -89,6 +89,11 @@ func _process_billboard() -> void:
frame.look_at(player_view.global_position, Vector3.UP, true) frame.look_at(player_view.global_position, Vector3.UP, true)
func _process_hover() -> void: func _process_hover() -> void:
# Make sure playbale remains uninteractive if it has not been unlocked. Maybe this needs to move to room?
if playable is StoryPlayable:
if not Scenes.is_sequence_unlocked(playable.scene_id):
return
if active and hover and not shown: if active and hover and not shown:
expand() expand()
elif shown and not hover: elif shown and not hover:

View File

@ -49,4 +49,4 @@ func _visibility_change():
prints(name, "NOTIFICATION_VISIBILITY_CHANGED", is_visible_in_tree()) prints(name, "NOTIFICATION_VISIBILITY_CHANGED", is_visible_in_tree())
self.set_process_input(is_visible_in_tree()) self.set_process_input(is_visible_in_tree())
self.set_process_unhandled_input(is_visible_in_tree()) self.set_process_unhandled_input(is_visible_in_tree())

View File

@ -30,15 +30,14 @@ buses/default_bus_layout="uid://djkwd76o033io"
[autoload] [autoload]
HardCards="*res://dev-util/hardcoded_cards.tscn"
State="*res://singletons/global_state.gd" State="*res://singletons/global_state.gd"
Scenes="*res://singletons/scene_reference.gd" Scenes="*res://singletons/scene_reference.gd"
Steamworks="*res://dev-util/steamworks.gd" Steamworks="*res://dev-util/steamworks.gd"
PromptManager="*uid://7tdmg25cjdqd"
Steam="*res://dev-util/steam.gd"
Main="*res://singletons/main/main.tscn" Main="*res://singletons/main/main.tscn"
I18n="*res://dev-util/i18n.gd" I18n="*res://dev-util/i18n.gd"
Prompts="*res://ui/prompter/prompter.tscn" Prompts="*res://ui/prompter/prompter.tscn"
SteamInputManager="*uid://10u2ea21g7sy"
PromptManager="*uid://ifbebpb7754g"
[debug] [debug]
@ -121,40 +120,30 @@ ui_menu={
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":6,"pressure":0.0,"pressed":true,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":6,"pressure":0.0,"pressed":true,"script":null)
] ]
} }
player_right={ walk_right={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":1.0,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":1.0,"script":null)
] ]
} }
player_left={ walk_left={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":-1.0,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":-1.0,"script":null)
] ]
} }
player_forwards={ walk_positive={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":-1.0,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":-1.0,"script":null)
] ]
} }
player_backwards={ walk_negative={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":1.0,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":1.0,"script":null)
] ]
} }
mouse_left={
"deadzone": 0.5,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
]
}
mouse_right={
"deadzone": 0.5,
"events": [null, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":2,"canceled":false,"pressed":false,"double_click":false,"script":null)
]
}
look_right={ look_right={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":2,"axis_value":1.0,"script":null) "events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":2,"axis_value":1.0,"script":null)
@ -165,33 +154,23 @@ look_left={
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":2,"axis_value":-1.0,"script":null) "events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":2,"axis_value":-1.0,"script":null)
] ]
} }
look_up={ look_positive={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":-1.0,"script":null) "events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":-1.0,"script":null)
] ]
} }
look_down={ look_negative={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null) "events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null)
] ]
} }
scene_skip={ skip={
"deadzone": 0.5, "deadzone": 0.5,
"events": [null, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":88,"key_label":0,"unicode":120,"location":0,"echo":false,"script":null) "events": [null, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":88,"key_label":0,"unicode":120,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":true,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":true,"script":null)
] ]
} }
zoom_in_mouse={ zoom={
"deadzone": 0.5,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":4,"canceled":false,"pressed":false,"double_click":false,"script":null)
]
}
zoom_out_mouse={
"deadzone": 0.5,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":5,"canceled":false,"pressed":false,"double_click":false,"script":null)
]
}
zoom_in_controller={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":5,"axis_value":1.0,"script":null) "events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":5,"axis_value":1.0,"script":null)
] ]
@ -213,7 +192,7 @@ collect_memento_ui={
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194309,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194309,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
] ]
} }
option_memento_ui={ show_summary={
"deadzone": 0.2, "deadzone": 0.2,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":2,"canceled":false,"pressed":false,"double_click":false,"script":null) "events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":2,"canceled":false,"pressed":false,"double_click":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":false,"script":null)
@ -225,7 +204,7 @@ crouch={
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":7,"pressure":0.0,"pressed":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":7,"pressure":0.0,"pressed":false,"script":null)
] ]
} }
ui_pause={ pause={
"deadzone": 0.2, "deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194313,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194313,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
@ -234,10 +213,19 @@ ui_pause={
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":5,"pressure":0.0,"pressed":true,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":5,"pressure":0.0,"pressed":true,"script":null)
] ]
} }
unlock_cheat={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":true,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":85,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
summarize={
"deadzone": 0.2,
"events": []
}
[internationalization] [internationalization]
locale/translations=PackedStringArray("res://internationalisation.de.translation", "res://internationalisation.en.translation", "res://internationalisation.es.translation", "res://internationalisation.ja.translation") locale/translations=PackedStringArray("res://internationalisation.de.translation", "res://internationalisation.en.translation")
locale/test="de" locale/test="de"
[layer_names] [layer_names]

View File

@ -44,6 +44,11 @@ const user_saves_path:String = "user://savegames"
reduce_motion = value reduce_motion = value
if _settings_initialized: if _settings_initialized:
settings_changed.emit() settings_changed.emit()
@export var disable_bobbing: bool = false:
set(value):
disable_bobbing = value
if _settings_initialized:
settings_changed.emit()
@export var screen_reader_enabled:bool = false: @export var screen_reader_enabled:bool = false:
set(value): set(value):
screen_reader_enabled = value screen_reader_enabled = value
@ -216,6 +221,7 @@ func save_settings():
var out_dict := { var out_dict := {
"accessability": { "accessability": {
"reduce_motion:": reduce_motion, "reduce_motion:": reduce_motion,
"disable_bobbing": disable_bobbing,
"screen_reader_enabled": screen_reader_enabled, "screen_reader_enabled": screen_reader_enabled,
"rendering_disabled": rendering_disabled, "rendering_disabled": rendering_disabled,
"use_simplified_navigation": use_simplified_navigation, "use_simplified_navigation": use_simplified_navigation,
@ -297,6 +303,66 @@ func queue_for_stage(target: Object, index: int = 1):
#endregion #endregion
#region input set handling
func _input(event: InputEvent) -> void:
if event is InputEventKey or event is InputEventMouse or event is InputEventMouseMotion or event is InputEventScreenTouch:
last_input_source = InputSource.KEYBOARD_MOUSE
if event is InputEventJoypadButton or event is InputEventJoypadMotion:
last_input_source = InputSource.JOYPAD
signal game_context_updated(new: GameContext)
signal input_device_updated(new: InputSource)
enum InputSource {
INVALID = -1,
KEYBOARD_MOUSE,
JOYPAD
}
var last_input_source : InputSource = InputSource.INVALID:
set(new_source):
if new_source != last_input_source:
if new_source == InputSource.KEYBOARD_MOUSE:
_awaiting_mouse_input = false
_update_mouse_mode()
else:
Input.mouse_mode = Input.MOUSE_MODE_HIDDEN
last_input_source = new_source
input_device_updated.emit(new_source)
enum GameContext {
## Player moves about in the world.
WALK,
## Player interacts with a menu.
MENU,
## Player is in a special menu, but has not moved their mouse yet. Is never set to [current_context], but changes behavior of [update_mouse_mode].
LISTEN
}
var current_context: GameContext = GameContext.MENU:
set(new_context):
if new_context != current_context:
if new_context == GameContext.WALK:
current_context = GameContext.WALK
else:
current_context = GameContext.MENU
_awaiting_mouse_input = new_context == GameContext.LISTEN
if last_input_source == InputSource.KEYBOARD_MOUSE:
_update_mouse_mode()
game_context_updated.emit()
var _awaiting_mouse_input: bool = false
func _update_mouse_mode():
if current_context == GameContext.WALK:
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
elif _awaiting_mouse_input:
Input.mouse_mode = Input.MOUSE_MODE_HIDDEN
else:
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
#endregion
#region utility functions #region utility functions
func get_room_id(if_game_active = false) -> Room.ids: func get_room_id(if_game_active = false) -> Room.ids:

View File

@ -4,14 +4,13 @@ class_name SceneReference
# State tracking # State tracking
var started_sequences: int = 0 var started_sequences: int = 0
var completed_sequences: int = 0 var completed_sequences: int = 0
var enabled_sequences: int = 255: var enabled_sequences: int = 63
set(stuff): pass
## Returns true if a scene is currently playing. ## Returns true if a scene is currently playing.
var is_playing: bool = false var is_playing: bool = false
enum id { enum id {
NONE = -1, NONE,
YOUTH_DRAVEN, YOUTH_DRAVEN,
YOUTH_CHILDHOOD, YOUTH_CHILDHOOD,
YOUTH_VOICE_TRAINING, YOUTH_VOICE_TRAINING,