diff --git a/src/base-environments/transition/misc/subway_map.tscn b/src/base-environments/transition/misc/subway_map.tscn index 48d3e99..b75996b 100644 --- a/src/base-environments/transition/misc/subway_map.tscn +++ b/src/base-environments/transition/misc/subway_map.tscn @@ -299,6 +299,7 @@ _data = { } [node name="SubwayMap" type="Node2D"] +clip_children = 1 script = ExtResource("1_to33c") current_station = 3 diff --git a/src/base-environments/transition/subway_sequence.gd b/src/base-environments/transition/subway_sequence.gd index bc70eea..5ade2e4 100644 --- a/src/base-environments/transition/subway_sequence.gd +++ b/src/base-environments/transition/subway_sequence.gd @@ -6,17 +6,17 @@ extends RoomTemplate func _ready() -> void: super._ready() id = State.rooms.TRANSITION + +func start_room(): + super.start_room() + %LeftDetection.body_entered.connect(on_left_train_enter) %RightDetection.body_entered.connect(on_right_train_enter) %LeftDetection.body_exited.connect(on_left_train_exit) %RightDetection.body_exited.connect(on_right_train_exit) %burnout_station.leave_room.connect(func(): proceed.emit(Main.adulthood_room_path)) - -func start_room(): - super.start_room() - %UI.show() %PlayerController.process_mode = Node.PROCESS_MODE_INHERIT # Give player control immediately, then open @@ -54,7 +54,7 @@ func pull_save_state(save: SaveGame) -> void: save.sequences_enabled = Scenes.enabled_sequences save.current_room = State.rooms.ADULTHOOD save_game = save - + # Call parent to restore player position super.pull_save_state(save) @@ -105,8 +105,8 @@ func on_left_train_enter(_body) -> void: %Train2.get_child(0).door_open = false on_second_transition() await get_tree().create_timer(5.0).timeout - Scenes.enabled_sequences += 1 << Scenes.id.ADULT_THERAPY - %SubwayMap.current_station = Scenes.id.ADULT_THERAPY + save_game.seen.append(str(Scenes.id.ADULT_THERAPY_UNI)) + %SubwayMap.current_station = Scenes.id.ADULT_THERAPY_UNI %RightLabel.text = "do not board" %LeftLabel.text = "do not board" on_final = true diff --git a/src/base-environments/transition/transition.tscn b/src/base-environments/transition/transition.tscn index 6ed66ae..b968114 100644 --- a/src/base-environments/transition/transition.tscn +++ b/src/base-environments/transition/transition.tscn @@ -396,8 +396,7 @@ shader_parameter/vertical_emission = SubResource("GradientTexture1D_v43sq") [sub_resource type="QuadMesh" id="QuadMesh_ppxbm"] -[sub_resource type="BoxShape3D" id="BoxShape3D_1dsor"] -size = Vector3(8, 0.5, 66.5) +[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_0vobo"] [sub_resource type="BoxShape3D" id="BoxShape3D_sofnd"] size = Vector3(8, 2.5, 0.5) @@ -435,15 +434,6 @@ size = Vector3(0.5, 3, 5.547009) [sub_resource type="BoxShape3D" id="BoxShape3D_e75no"] size = Vector3(0.5661621, 3, 1.411961) -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_sofnd"] -albedo_color = Color(0.7203754, 0.28277883, 3.85046e-07, 1) - -[sub_resource type="BoxMesh" id="BoxMesh_8c5ii"] -size = Vector3(0.15, 1.2, 1.7) - -[sub_resource type="BoxMesh" id="BoxMesh_symoa"] -size = Vector3(0.3, 1, 1.5) - [sub_resource type="ViewportTexture" id="ViewportTexture_820wi"] viewport_path = NodePath("SubViewport") @@ -458,6 +448,15 @@ emission_texture = SubResource("ViewportTexture_820wi") [sub_resource type="QuadMesh" id="QuadMesh_c3uo7"] size = Vector2(1.505, 1) +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_sofnd"] +albedo_color = Color(0.7203754, 0.28277883, 3.85046e-07, 1) + +[sub_resource type="BoxMesh" id="BoxMesh_8c5ii"] +size = Vector3(0.15, 1.2, 1.7) + +[sub_resource type="BoxMesh" id="BoxMesh_symoa"] +size = Vector3(0.3, 1, 1.5) + [sub_resource type="Animation" id="Animation_ppxbm"] length = 0.001 tracks/0/type = "value" @@ -1058,7 +1057,7 @@ transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 6.24 transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.7804413, 0, 0) [node name="MeshInstance3D8" type="MeshInstance3D" parent="Train/Visuals/Train"] -transform = Transform3D(-42.01, 4.0756228e-07, 4.3401067e-07, -6.330816e-06, -2.8743172, -0.1808367, -5.945045e-06, 0.1808367, -2.8743172, -3.9468384, 1.286, 2.488358) +transform = Transform3D(-42.01, 4.0756228e-07, 4.340107e-07, -6.330816e-06, -2.8743172, -0.1808367, -5.945046e-06, 0.1808367, -2.8743172, -3.9468384, 1.286, 2.488358) visible = false material_override = SubResource("ShaderMaterial_0vobo") mesh = SubResource("QuadMesh_ppxbm") @@ -1078,276 +1077,279 @@ material_override = SubResource("ShaderMaterial_0vobo") mesh = SubResource("QuadMesh_ppxbm") skeleton = NodePath("../../../GPUParticles3D4") -[node name="Collider" type="Node3D" parent="Train"] +[node name="Collision" type="Node3D" parent="Train"] -[node name="StaticBody3D" type="StaticBody3D" parent="Train/Collider"] +[node name="Body3D" type="StaticBody3D" parent="Train/Collision"] -[node name="CollisionShape3D" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="WorldBoundary (Ground)" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.1428833, -0.24993896, -32.937317) -shape = SubResource("BoxShape3D_1dsor") +shape = SubResource("WorldBoundaryShape3D_0vobo") -[node name="CollisionShape3D3" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D3" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.143, 1, -66.5) shape = SubResource("BoxShape3D_sofnd") -[node name="CollisionShape3D4" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D4" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.143, 1, 0.25) shape = SubResource("BoxShape3D_sofnd") -[node name="CollisionShape3D5" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D5" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 1.8523458, 1, -1.1576476) shape = SubResource("BoxShape3D_csq32") -[node name="CollisionShape3D7" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D7" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 1.567, 1.031, -2) shape = SubResource("BoxShape3D_grftg") -[node name="CollisionShape3D8" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D8" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -1.567, 1.031, -2) shape = SubResource("BoxShape3D_l33v1") -[node name="CollisionShape3D9" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D9" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 0, 1.031, -2) shape = SubResource("BoxShape3D_0vobo") -[node name="CollisionShape3D10" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D10" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -7.783883) shape = SubResource("BoxShape3D_ppxbm") -[node name="CollisionShape3D11" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D11" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -9.45743) shape = SubResource("BoxShape3D_wgcl8") -[node name="CollisionShape3D12" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D12" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -17.783882) shape = SubResource("BoxShape3D_ppxbm") -[node name="CollisionShape3D13" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D13" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -19.45743) shape = SubResource("BoxShape3D_wgcl8") -[node name="CollisionShape3D14" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D14" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -16.102852) shape = SubResource("BoxShape3D_wgcl8") -[node name="CollisionShape3D15" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D15" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -27.783882) shape = SubResource("BoxShape3D_ppxbm") -[node name="CollisionShape3D16" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D16" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -29.45743) shape = SubResource("BoxShape3D_wgcl8") -[node name="CollisionShape3D17" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D17" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -26.102852) shape = SubResource("BoxShape3D_wgcl8") -[node name="CollisionShape3D18" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D18" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -37.783882) shape = SubResource("BoxShape3D_ppxbm") -[node name="CollisionShape3D19" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D19" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -39.457428) shape = SubResource("BoxShape3D_wgcl8") -[node name="CollisionShape3D20" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D20" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -36.10285) shape = SubResource("BoxShape3D_wgcl8") -[node name="CollisionShape3D21" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D21" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -47.783882) shape = SubResource("BoxShape3D_ppxbm") -[node name="CollisionShape3D22" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D22" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -49.457428) shape = SubResource("BoxShape3D_wgcl8") -[node name="CollisionShape3D23" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D23" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -46.10285) shape = SubResource("BoxShape3D_wgcl8") -[node name="CollisionShape3D24" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D24" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -57.783882) shape = SubResource("BoxShape3D_ppxbm") -[node name="CollisionShape3D26" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D26" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -56.10285) shape = SubResource("BoxShape3D_wgcl8") -[node name="CollisionShape3D6" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D6" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -1.8618617, 1, -1.1576476) shape = SubResource("BoxShape3D_csq32") -[node name="CollisionShape3D2" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D2" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.0680046, -0.24993896, -32.189793) shape = SubResource("BoxShape3D_0gtr1") -[node name="CollisionShape3D25" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D25" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.9860983, 1.558737, -32.189793) shape = SubResource("BoxShape3D_8c5ii") -[node name="CollisionShape3D27" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D27" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.4406133, 1.558737, -32.189793) shape = SubResource("BoxShape3D_symoa") -[node name="CollisionShape3D28" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D28" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.4406133, 1.558737, -44.749306) shape = SubResource("BoxShape3D_820wi") -[node name="CollisionShape3D29" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D29" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 7.3510947, 1.558737, -45.8734) shape = SubResource("BoxShape3D_820wi") -[node name="CollisionShape3D30" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D30" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.4406133, 1.558737, -19.857431) shape = SubResource("BoxShape3D_820wi") -[node name="CollisionShape3D31" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D31" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 7.3510947, 1.558737, -18.627045) shape = SubResource("BoxShape3D_820wi") -[node name="CollisionShape3D32" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D32" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 7.4562984, 1.558737, -26.163954) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D33" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D33" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 7.4562984, 1.558737, -27.810856) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D34" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D34" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 7.4562984, 1.558737, -24.465235) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D35" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D35" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 7.4562984, 1.558737, -22.334576) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D36" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D36" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 4.9864135, 1.558737, -26.121748) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D37" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D37" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 4.9864135, 1.558737, -24.465235) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D38" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D38" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1.3113416e-07, 0, 1, 0, 1, 0, -1, 0, 1.3113416e-07, 4.8871417, 1.558737, -38.4807) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D40" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D40" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1.3113416e-07, 0, 1, 0, 1, 0, -1, 0, 1.3113416e-07, 4.8871417, 1.558737, -40.179424) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D41" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D41" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1.3113416e-07, 0, 1, 0, 1, 0, -1, 0, 1.3113416e-07, 4.887142, 1.558737, -42.31008) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D42" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D42" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1.3113416e-07, 0, 1, 0, 1, 0, -1, 0, 1.3113416e-07, 7.357026, 1.558737, -38.522907) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D43" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D43" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1.3113416e-07, 0, 1, 0, 1, 0, -1, 0, 1.3113416e-07, 7.357027, 1.558737, -40.179424) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D39" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D39" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, -5.9222555, -0.24993896, -32.045853) shape = SubResource("BoxShape3D_0gtr1") -[node name="CollisionShape3D44" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D44" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, -7.840349, 1.558737, -32.045853) shape = SubResource("BoxShape3D_8c5ii") -[node name="CollisionShape3D45" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D45" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, -4.2948637, 1.558737, -32.045853) shape = SubResource("BoxShape3D_symoa") -[node name="CollisionShape3D46" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D46" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, -4.2948647, 1.558737, -19.486341) shape = SubResource("BoxShape3D_820wi") -[node name="CollisionShape3D47" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D47" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1.3113416e-07, 0, 1, 0, 1, 0, -1, 0, 1.3113416e-07, -7.205347, 1.558737, -18.362246) shape = SubResource("BoxShape3D_820wi") -[node name="CollisionShape3D48" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D48" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, -4.2948627, 1.558737, -44.37822) shape = SubResource("BoxShape3D_820wi") -[node name="CollisionShape3D49" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D49" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1.3113416e-07, 0, 1, 0, 1, 0, -1, 0, 1.3113416e-07, -7.205344, 1.558737, -45.608604) shape = SubResource("BoxShape3D_820wi") -[node name="CollisionShape3D50" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D50" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1.3113416e-07, 0, 1, 0, 1, 0, -1, 0, 1.3113416e-07, -7.310549, 1.558737, -38.071693) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D51" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D51" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1.3113416e-07, 0, 1, 0, 1, 0, -1, 0, 1.3113416e-07, -7.310549, 1.558737, -36.42479) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D52" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D52" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1.3113416e-07, 0, 1, 0, 1, 0, -1, 0, 1.3113416e-07, -7.310549, 1.558737, -39.770416) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D53" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D53" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1.3113416e-07, 0, 1, 0, 1, 0, -1, 0, 1.3113416e-07, -7.310548, 1.558737, -41.90107) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D54" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D54" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1.3113416e-07, 0, 1, 0, 1, 0, -1, 0, 1.3113416e-07, -4.840664, 1.558737, -38.1139) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D55" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D55" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(1.3113416e-07, 0, 1, 0, 1, 0, -1, 0, 1.3113416e-07, -4.840664, 1.558737, -39.770416) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D56" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D56" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-2.1855693e-07, 0, -1, 0, 1, 0, 1, 0, -2.1855693e-07, -4.741393, 1.558737, -25.754946) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D57" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D57" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-2.1855693e-07, 0, -1, 0, 1, 0, 1, 0, -2.1855693e-07, -4.741394, 1.558737, -24.056223) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D58" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D58" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-2.1855693e-07, 0, -1, 0, 1, 0, 1, 0, -2.1855693e-07, -4.741394, 1.558737, -21.925566) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D59" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D59" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-2.1855693e-07, 0, -1, 0, 1, 0, 1, 0, -2.1855693e-07, -7.211277, 1.558737, -25.71274) shape = SubResource("BoxShape3D_e75no") -[node name="CollisionShape3D60" type="CollisionShape3D" parent="Train/Collider/StaticBody3D"] +[node name="CollisionShape3D60" type="CollisionShape3D" parent="Train/Collision/Body3D"] transform = Transform3D(-2.1855693e-07, 0, -1, 0, 1, 0, 1, 0, -2.1855693e-07, -7.211279, 1.558737, -24.056223) shape = SubResource("BoxShape3D_e75no") -[node name="CSGCombiner3D" type="CSGCombiner3D" parent="Train"] -transform = Transform3D(1.46175, 0, 0, 0, 1.46175, 0, 0, 0, 1.46175, 0, 1.409, -22.624) +[node name="SubwayMap3D" type="Node3D" parent="Train"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.409, -22.624) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Train/SubwayMap3D"] +transform = Transform3D(0, 0, 1.46175, 0, 1.46175, 0, -1.46175, 0, 0, 0.075, 0, 0) +material_override = SubResource("StandardMaterial3D_e75no") +mesh = SubResource("QuadMesh_c3uo7") +skeleton = NodePath("") + +[node name="MeshInstance3D2" type="MeshInstance3D" parent="Train/SubwayMap3D"] +transform = Transform3D(-6.389512e-08, 0, -1.46175, 0, 1.46175, 0, 1.46175, 0, -6.389512e-08, -0.075, 0, 0) +material_override = SubResource("StandardMaterial3D_e75no") +mesh = SubResource("QuadMesh_c3uo7") +skeleton = NodePath("") + +[node name="CSGCombiner3D" type="CSGCombiner3D" parent="Train/SubwayMap3D"] +transform = Transform3D(1.46175, 0, 0, 0, 1.46175, 0, 0, 0, 1.46175, 0, 0, 0) material_override = SubResource("StandardMaterial3D_sofnd") use_collision = true -[node name="CSGMesh3D" type="CSGMesh3D" parent="Train/CSGCombiner3D"] +[node name="CSGMesh3D" type="CSGMesh3D" parent="Train/SubwayMap3D/CSGCombiner3D"] transform = Transform3D(1, 0, -7.1054274e-15, 0, 1, 0, 7.1054274e-15, 0, 1, 0, 0, 0) mesh = SubResource("BoxMesh_8c5ii") -[node name="CSGMesh3D2" type="CSGMesh3D" parent="Train/CSGCombiner3D"] +[node name="CSGMesh3D2" type="CSGMesh3D" parent="Train/SubwayMap3D/CSGCombiner3D"] transform = Transform3D(1, 0, -7.1054274e-15, 0, 1, 0, 7.1054274e-15, 0, 1, 0, 0, 0) operation = 2 mesh = SubResource("BoxMesh_symoa") -[node name="MeshInstance3D" type="MeshInstance3D" parent="Train"] -transform = Transform3D(0, 0, 1.46175, 0, 1.46175, 0, -1.46175, 0, 0, 0.075, 1.409, -22.624) -material_override = SubResource("StandardMaterial3D_e75no") -mesh = SubResource("QuadMesh_c3uo7") -skeleton = NodePath("") - -[node name="MeshInstance3D2" type="MeshInstance3D" parent="Train"] -transform = Transform3D(-6.389512e-08, 0, -1.46175, 0, 1.46175, 0, 1.46175, 0, -6.389512e-08, -0.075, 1.409, -22.624) -material_override = SubResource("StandardMaterial3D_e75no") -mesh = SubResource("QuadMesh_c3uo7") -skeleton = NodePath("") - [node name="Stations" type="Node3D" parent="."] unique_name_in_owner = true diff --git a/src/base-environments/volunteer_room/volunteer_room.tscn b/src/base-environments/volunteer_room/volunteer_room.tscn index 77e8415..cd7a44c 100644 --- a/src/base-environments/volunteer_room/volunteer_room.tscn +++ b/src/base-environments/volunteer_room/volunteer_room.tscn @@ -28,8 +28,7 @@ size = Vector3(1, 2.778, 1.353) radius = 1.14469 height = 3.78697 -[sub_resource type="BoxShape3D" id="BoxShape3D_e1uao"] -size = Vector3(7, 0.5, 12) +[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_5s6pb"] [sub_resource type="BoxShape3D" id="BoxShape3D_my8p4"] size = Vector3(2.5496612, 0.8709717, 2.9011602) @@ -276,99 +275,99 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.08276367, 1.3269348, 0.0531 size = Vector3(6.132324, 2.9212036, 12.054474) data = ExtResource("8_fli74") -[node name="Colision" type="Node3D" parent="."] +[node name="Collision" type="Node3D" parent="."] -[node name="RigidBody3D" type="StaticBody3D" parent="Colision"] +[node name="StaticBody" type="StaticBody3D" parent="Collision"] -[node name="CollisionShape3D" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="WorldBoundary (Floor)" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.25, 0) -shape = SubResource("BoxShape3D_e1uao") +shape = SubResource("WorldBoundaryShape3D_5s6pb") -[node name="CollisionShape3D2" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D2" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.0295625, 0.43548584, -1.5359472) shape = SubResource("BoxShape3D_my8p4") -[node name="CollisionShape3D14" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D14" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.473804, 0.43548584, -5.2581515) shape = SubResource("BoxShape3D_my8p4") -[node name="CollisionShape3D15" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D15" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5582857, 0.43548584, -4.6777506) shape = SubResource("BoxShape3D_my8p4") -[node name="CollisionShape3D18" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D18" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.318601, 0.43548584, 5.4479933) shape = SubResource("BoxShape3D_my8p4") -[node name="CollisionShape3D20" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D20" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.3467457, 0.91555786, 3.809821) shape = SubResource("BoxShape3D_ri8p0") -[node name="CollisionShape3D23" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D23" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 0.28132415, 0.91555786, -4.867077) shape = SubResource("BoxShape3D_ri8p0") -[node name="CollisionShape3D22" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D22" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 0.17872827, 0.43548584, 2.4474537) shape = SubResource("BoxShape3D_ri8p0") -[node name="CollisionShape3D19" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D19" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.02912116, 0.43548584, 5.6458735) shape = SubResource("SphereShape3D_br20t") -[node name="CollisionShape3D21" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D21" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.3792989, 0.43548584, 3.8899004) shape = SubResource("SphereShape3D_br20t") -[node name="CollisionShape3D16" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D16" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(0.99368984, 0, 0.11216268, 0, 1, 0, -0.11216268, 0, 0.99368984, -2.8277857, 0.43548584, -0.90668166) shape = SubResource("BoxShape3D_my8p4") -[node name="CollisionShape3D17" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D17" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(0.9997138, 0, -0.023926191, 0, 1, 0, 0.023926191, 0, 0.9997138, 0.20360646, 0.43548584, -1.0235084) shape = SubResource("BoxShape3D_sunku") -[node name="CollisionShape3D8" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D8" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.5631266, 2, -0.06579882) shape = SubResource("BoxShape3D_mumj5") -[node name="CollisionShape3D10" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D10" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.0312304, 2, -0.06579882) shape = SubResource("BoxShape3D_pdgua") -[node name="CollisionShape3D11" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D11" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.1283288, 2, 1.3899179) shape = SubResource("BoxShape3D_0bxa6") -[node name="CollisionShape3D12" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D12" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 0.50890803, 2, -1.4181784) shape = SubResource("BoxShape3D_0bxa6") -[node name="CollisionShape3D13" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D13" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 0.50890803, 2, -4.862812) shape = SubResource("BoxShape3D_0bxa6") -[node name="CollisionShape3D9" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D9" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.6831162, 2, 1.4073527) shape = SubResource("BoxShape3D_mumj5") -[node name="CollisionShape3D7" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D7" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.981, 2, 3.8725982) shape = SubResource("BoxShape3D_3k3rl") -[node name="CollisionShape3D3" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D3" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.197, 2, -2.25) shape = SubResource("BoxShape3D_rwcbo") -[node name="CollisionShape3D4" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D4" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.2058272, 2, 0.12251377) shape = SubResource("BoxShape3D_7klvh") -[node name="CollisionShape3D5" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D5" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0043058395, 2, 6.437253) shape = SubResource("BoxShape3D_2ixm0") -[node name="CollisionShape3D6" type="CollisionShape3D" parent="Colision/RigidBody3D"] +[node name="CollisionShape3D6" type="CollisionShape3D" parent="Collision/StaticBody"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0043058395, 2, -6.174767) shape = SubResource("BoxShape3D_2ixm0") diff --git a/src/base-environments/youth_room/youth_room.gd b/src/base-environments/youth_room/youth_room.gd index 5654930..767af55 100644 --- a/src/base-environments/youth_room/youth_room.gd +++ b/src/base-environments/youth_room/youth_room.gd @@ -11,9 +11,6 @@ func start_room(): super.start_room() %UI.show() - # To start breathing etc. - %PlayerController.process_mode = Node.PROCESS_MODE_INHERIT - await Main.curtain.open() # Skip intro if already loaded. @@ -23,10 +20,14 @@ func start_room(): else: %LightAnimation.lights_on() + # To start breathing etc. + %PlayerController.process_mode = Node.PROCESS_MODE_INHERIT + # Give player control after intro (or immediately if repeating) Scenes.player_enable.emit(true) + func _play_intro_scene() -> void: # The intro scene is auto-played, not triggered by CollectableUi var intro: Interactable = $logic/CeilingInteractable diff --git a/src/base-environments/youth_room/youth_room.tscn b/src/base-environments/youth_room/youth_room.tscn index 5c8ee4e..56dd758 100644 --- a/src/base-environments/youth_room/youth_room.tscn +++ b/src/base-environments/youth_room/youth_room.tscn @@ -73,8 +73,7 @@ size = Vector3(0.82534, 0.820503, 0.503813) [sub_resource type="SphereShape3D" id="SphereShape3D_4ckrq"] radius = 0.981137 -[sub_resource type="BoxShape3D" id="BoxShape3D_wdkxn"] -size = Vector3(5.75304, 0.238875, 4.229) +[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_dqyng"] [sub_resource type="BoxShape3D" id="BoxShape3D_3lwkl"] size = Vector3(2.02493, 2.13981, 1) @@ -1580,9 +1579,8 @@ shape = SubResource("SphereShape3D_4ckrq") [node name="Room_Colission" type="StaticBody3D" parent="logic/Collision"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.811571, 0, 0) -[node name="Floor2" type="CollisionShape3D" parent="logic/Collision/Room_Colission"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.931684, -0.12195, 0.721855) -shape = SubResource("BoxShape3D_wdkxn") +[node name="WorldBoundary (Floor)" type="CollisionShape3D" parent="logic/Collision/Room_Colission"] +shape = SubResource("WorldBoundaryShape3D_dqyng") [node name="Wall1" type="CollisionShape3D" parent="logic/Collision/Room_Colission"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.02419, 1.06708, 2.75985) diff --git a/src/dev-util/savegame.gd b/src/dev-util/savegame.gd index a7c252d..47cb25e 100644 --- a/src/dev-util/savegame.gd +++ b/src/dev-util/savegame.gd @@ -19,9 +19,11 @@ class_name SaveGame extends Resource @export var seen : Array[StringName] = [] @export var is_childhood_board_complete: bool = false -@export var player_position: Vector3 = Vector3.ZERO -@export var player_yaw: float = 0.0 -@export var player_pitch: float = 0.0 + +@export var player_position : Vector3 = Vector3.ZERO +@export var player_yaw : float = 0.0 +@export var player_pitch : float = 0.0 + @export var last_saved: int = 0 # === Computed Properties === @@ -126,7 +128,7 @@ func capture_player_state() -> void: print_debug("SaveGame: Captured player state - pos: %s, yaw: %.2f, pitch: %.2f" % [player_position, player_yaw, player_pitch]) ## Saves to disk with thumbnail -func save_to_file(screen_shot: Texture) -> void: +func save_to_file(screen_shot: Texture2D) -> void: if file_name == "DEBUG": push_warning("SaveGame: DEBUG save skipped (intentional).") return @@ -152,9 +154,9 @@ func save_to_file(screen_shot: Texture) -> void: print_debug("Successfully saved to: %s" % file_name) ## Processes and saves thumbnail as PNG -func _save_thumbnail(screen_shot: Texture) -> void: +func _save_thumbnail(screen_shot: Texture2D) -> void: var img: Image = screen_shot.get_image() - img.convert(Image.Format.FORMAT_RGB8) + img.convert(Image.FORMAT_RGB8) img.linear_to_srgb() img.resize(384, 216, Image.INTERPOLATE_LANCZOS) img.crop(384, 216) @@ -184,7 +186,7 @@ func _validate_board_state() -> bool: # Validate attachments (sticky must exist, card must exist) for sticky_name in board_attachments.keys(): - var card_name = board_attachments[sticky_name] + var card_name := board_attachments[sticky_name] if not board_positions.has(card_name): push_error("Save %s: Sticky '%s' attached to non-existent card '%s'" % [unique_save_name, sticky_name, card_name]) return false diff --git a/src/logic-scenes/card_picker/card_picker.gd b/src/logic-scenes/card_picker/card_picker.gd index 7861bc9..e0f4ea3 100644 --- a/src/logic-scenes/card_picker/card_picker.gd +++ b/src/logic-scenes/card_picker/card_picker.gd @@ -70,7 +70,7 @@ func fill_card_slots(id: int): $cards.get_child(i).remove_child($cards.get_child(i).get_child(1)) var new_card:Card = new_cards[i] $cards.get_child(i).add_child(new_card) - new_card.owner = self + #new_card.owner = self # No need to connect signals - Draggable base class handles this options.append(new_card) @@ -92,7 +92,7 @@ func fill_post_slots(): for i in range(sticky_notes.size()): options.append(sticky_notes[i]) $sticky_notes.get_child(i).add_child(options[i], false) - options[i].owner = self + #options[i].owner = self # TODO: I think this is not necessary. var picked_player: AnimationPlayer diff --git a/src/logic-scenes/player_controller/player_controller.gd b/src/logic-scenes/player_controller/player_controller.gd index e45f1f9..15c546e 100644 --- a/src/logic-scenes/player_controller/player_controller.gd +++ b/src/logic-scenes/player_controller/player_controller.gd @@ -13,7 +13,7 @@ func _apply_enabled_state() -> void: # Kill any existing jitter tween to prevent stacking if jitter_tween and jitter_tween.is_valid(): jitter_tween.kill() - + if enabled: camera.make_current() get_viewport().gui_release_focus() @@ -86,7 +86,7 @@ var crouched:bool = false: else: $PlayerAnimationPlayer.play("fast_stand_up") crouched = set_crouching - + @onready var yaw: Node3D = $Yaw @onready var pitch: Node3D = $Yaw/Pitch @onready var mount: Node3D = $Yaw/Pitch/Mount @@ -109,32 +109,32 @@ var zoomed:bool = false: else: var zoom_tween := create_tween() zoom_tween.tween_property(camera, "fov", base_fov, 0.5) - zoomed = zoom + zoomed = zoom signal ui_entered signal ui_exited func _ready(): State.player = self State.player_view = %Camera3D - + _handle_jitter(0) pitch.rotation_degrees.x = initial_pitch - + ui_prober.area_entered.connect(_on_ray_entered) ui_prober.area_exited.connect(_on_ray_exited) $CrouchDetector.area_entered.connect(enter_crouch) $CrouchDetector.area_exited.connect(exit_crouch) - + # Setup hand cursor _setup_hand_cursor() - + # Connect to central player enable signal. # Guard for standalone test scenes without autoloads. if get_node_or_null("/root/Scenes"): Scenes.player_enable.connect(_on_player_enable) - + # Apply exported enabled state now that nodes are ready _apply_enabled_state() @@ -152,16 +152,15 @@ func _setup_hand_cursor() -> void: func restore_from_save(save: SaveGame) -> void: if save.player_position != Vector3.ZERO: global_position = save.player_position + if save.player_yaw != 0: yaw.rotation.y = save.player_yaw + if save.player_pitch != 0: pitch.rotation.x = save.player_pitch - print_debug("PlayerController: Restored position %s, yaw %.2f, pitch %.2f" % [save.player_position, save.player_yaw, save.player_pitch]) - else: - print_debug("PlayerController: No saved position data, using default spawn") func _process(_delta) -> void: if not enabled: return - + if not has_entered: camera.fov = base_fov / (1 + Input.get_action_raw_strength("zoom_in_controller")) @@ -180,7 +179,7 @@ var delay_passed:bool = false func _on_ray_entered(_area : Area3D): var parent := _area.get_parent() as Interactable if not parent.visible: return - assert(parent != null, "Ray entered non-interactable area!") + assert(parent != null, "Ray entered non-interactable area!") printt("ray entered", parent.name, parent) parent.hover = true # Switch to pointing hand cursor when hovering over interactable @@ -195,7 +194,7 @@ func _on_ray_exited(_area): # Switch back to default cursor when not hovering if hand_cursor: hand_cursor.texture = cursor_default - + func _physics_process(delta: float): if enabled: @@ -207,43 +206,43 @@ func _physics_process(delta: float): func _handle_movement(delta:float): var input:Vector2 = Vector2(Input.get_action_strength("player_right") - Input.get_action_strength("player_left"), Input.get_action_strength("player_backwards")*0.8 - Input.get_action_strength("player_forwards")) - + if input.length()>1: input = input.normalized() - + var direction: Vector3 = Vector3(input.x, 0, input.y) - - direction = yaw.global_transform.basis.x * direction.x + transform.basis.y * direction.y + yaw.global_transform.basis.z * direction.z - + + direction = yaw.global_transform.basis.x * direction.x + transform.basis.y * direction.y + yaw.global_transform.basis.z * direction.z + if linear_velocity.length() > (linear_velocity + (direction*max_speed - linear_velocity)).length(): direction = Vector3.ZERO else: direction *= (direction*max_speed - linear_velocity).length()*max_acceleration - + linear_damp = damp * max(0.5, 1 - input.length()) - + apply_central_impulse(direction*delta) func _handle_rotation(delta:float): var smoothness = min(3, 60.0/Engine.get_frames_per_second()) - + var input_speed := Vector2( Input.get_action_strength("look_right")-Input.get_action_strength("look_left"), Input.get_action_strength("look_up")-Input.get_action_strength("look_down")) * gamepad_response - + # secretly, inverted y axis is the default if not State.inverty_y_axis: input_speed *= Vector2(1, -1) - + if current_mouse_rotation.length()>0: input_speed = current_mouse_rotation current_mouse_rotation = Vector2.ZERO - + rotation_speed = rotation_speed * (1-mouse_jerk*smoothness) + input_speed * mouse_jerk * smoothness - + if rotation_speed.y > 0 and pitch.rotation_degrees.x < 0: rotation_speed.y *= 1-pow(pitch.rotation_degrees.x/-max_angle, 4) elif rotation_speed.y < 0 and pitch.rotation_degrees.x > 0 : rotation_speed.y *= 1-pow(pitch.rotation_degrees.x/max_angle, 4) - - + + yaw.rotate_y(deg_to_rad(-rotation_speed.x * delta * mouse_sensitivity.x * State.input_sensitivity)) pitch.rotate_x(deg_to_rad(-rotation_speed.y * delta * mouse_sensitivity.y * State.input_sensitivity)) @@ -255,13 +254,13 @@ func _handle_jitter(delta): noise.get_noise_1d(loc_noise_spot.y), noise.get_noise_1d(loc_noise_spot.z) ) * location_jitter * jitter_strength - + if not State.reduce_motion: mount.rotation = Vector3( noise.get_noise_1d(rot_noise_spot.x), noise.get_noise_1d(rot_noise_spot.y), noise.get_noise_1d(rot_noise_spot.z) ) * angular_jitter * jitter_strength - + func _handle_mouse_input(event:InputEventMouseMotion): if event.relative.length() < mouse_jerk_rejection: @@ -276,24 +275,24 @@ var crouch_start_time: float = 0 func _input(event: InputEvent) -> void: if not enabled: return - + if event is InputEventMouseMotion and Input.mouse_mode == Input.MOUSE_MODE_CAPTURED: _handle_mouse_input(event) get_viewport().set_input_as_handled() - + if event is InputEventMouseButton and event.pressed: if Input.is_action_just_pressed("zoom_in_mouse"): zoomed = true elif Input.is_action_just_pressed("zoom_out_mouse"): zoomed = false - + if event.is_action_pressed("collect_memento_ui") or event.is_action_pressed("option_memento_ui"): if focus_ray.is_colliding(): var collider := focus_ray.get_collider() if collider is InteractiveSprite: collider.handle(event) get_viewport().set_input_as_handled() - + if event.is_action_pressed("crouch"): crouch_start_time = Time.get_unix_time_from_system() if crouch_toggled: @@ -318,7 +317,7 @@ func _on_bed_enter(_body): func _on_bed_exit(_body): if crouched and not crouch_held: trigger_slow_crouch = true - crouched = false + crouched = false var inside_crouch_volume: Array[CrouchVolume] = [] @@ -336,4 +335,3 @@ func enter_crouch(body): func exit_crouch(body): if body is CrouchVolume: crouched = false -