refactor: extract taproom as reusable sub-scene, update lobby

This commit is contained in:
2026-04-14 03:05:57 +02:00
parent bc5e64083b
commit a97be028b2
2 changed files with 125 additions and 63 deletions

View File

@@ -0,0 +1,120 @@
[gd_scene load_steps=22 format=3]
[sub_resource type="StandardMaterial3D" id="Material_wood"]
albedo_color = Color(0.169, 0.102, 0.051, 1)
[sub_resource type="BoxMesh" id="BoxMesh_floor"]
size = Vector3(12, 0.1, 8)
[sub_resource type="BoxShape3D" id="BoxShape3D_floor"]
size = Vector3(12, 0.1, 8)
[sub_resource type="BoxMesh" id="BoxMesh_ceiling"]
size = Vector3(12, 0.1, 8)
[sub_resource type="BoxShape3D" id="BoxShape3D_ceiling"]
size = Vector3(12, 0.1, 8)
[sub_resource type="BoxMesh" id="BoxMesh_wallback"]
size = Vector3(12, 4, 0.1)
[sub_resource type="BoxShape3D" id="BoxShape3D_wallback"]
size = Vector3(12, 4, 0.1)
[sub_resource type="BoxMesh" id="BoxMesh_wallleft"]
size = Vector3(0.1, 4, 8)
[sub_resource type="BoxShape3D" id="BoxShape3D_wallleft"]
size = Vector3(0.1, 4, 8)
[sub_resource type="BoxMesh" id="BoxMesh_wallright"]
size = Vector3(0.1, 4, 8)
[sub_resource type="BoxShape3D" id="BoxShape3D_wallright"]
size = Vector3(0.1, 4, 8)
[sub_resource type="BoxMesh" id="BoxMesh_bar"]
size = Vector3(4, 1.1, 0.3)
[sub_resource type="BoxShape3D" id="BoxShape3D_bar"]
size = Vector3(4, 1.1, 0.3)
[sub_resource type="Environment" id="Environment_1"]
background_mode = 1
background_color = Color(0.102, 0.059, 0, 1)
ambient_light_color = Color(0.6, 0.35, 0.1, 1)
ambient_light_energy = 0.4
fog_enabled = true
fog_light_color = Color(0.102, 0.059, 0, 1)
fog_density = 0.05
[node name="Taproom" type="Node3D"]
[node name="Floor" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.05, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="Floor"]
mesh = SubResource("BoxMesh_floor")
surface_material_override/0 = SubResource("Material_wood")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Floor"]
shape = SubResource("BoxShape3D_floor")
[node name="Ceiling" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.05, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="Ceiling"]
mesh = SubResource("BoxMesh_ceiling")
surface_material_override/0 = SubResource("Material_wood")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ceiling"]
shape = SubResource("BoxShape3D_ceiling")
[node name="WallBack" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, -4)
[node name="MeshInstance3D" type="MeshInstance3D" parent="WallBack"]
mesh = SubResource("BoxMesh_wallback")
surface_material_override/0 = SubResource("Material_wood")
[node name="CollisionShape3D" type="CollisionShape3D" parent="WallBack"]
shape = SubResource("BoxShape3D_wallback")
[node name="WallLeft" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 2, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="WallLeft"]
mesh = SubResource("BoxMesh_wallleft")
surface_material_override/0 = SubResource("Material_wood")
[node name="CollisionShape3D" type="CollisionShape3D" parent="WallLeft"]
shape = SubResource("BoxShape3D_wallleft")
[node name="WallRight" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 2, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="WallRight"]
mesh = SubResource("BoxMesh_wallright")
surface_material_override/0 = SubResource("Material_wood")
[node name="CollisionShape3D" type="CollisionShape3D" parent="WallRight"]
shape = SubResource("BoxShape3D_wallright")
[node name="Bar" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4, 0.55, -3.5)
[node name="MeshInstance3D" type="MeshInstance3D" parent="Bar"]
mesh = SubResource("BoxMesh_bar")
surface_material_override/0 = SubResource("Material_wood")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Bar"]
shape = SubResource("BoxShape3D_bar")
[node name="Light" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, 0)
light_color = Color(0.91, 0.643, 0.29, 1)
light_energy = 1.2
omni_range = 10.0
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_1")

View File

@@ -1,76 +1,18 @@
[gd_scene load_steps=8 format=3]
[gd_scene load_steps=2 format=3]
[ext_resource type="Script" path="res://scripts/tavern_lobby.gd" id="1"]
[ext_resource type="PackedScene" path="res://scenes/taproom.tscn" id="2"]
[sub_resource type="Environment" id="Environment_1"]
background_mode = 1
background_color = Color(0.102, 0.059, 0, 1)
ambient_light_color = Color(0.6, 0.35, 0.1, 1)
ambient_light_energy = 0.4
fog_enabled = true
fog_light_color = Color(0.102, 0.059, 0, 1)
fog_density = 0.05
[sub_resource type="StandardMaterial3D" id="Material_1"]
albedo_color = Color(0.169, 0.102, 0.051, 1)
[sub_resource type="BoxMesh" id="BoxMesh_floor"]
size = Vector3(12, 0.1, 8)
[sub_resource type="BoxMesh" id="BoxMesh_ceiling"]
size = Vector3(12, 0.1, 8)
[sub_resource type="BoxMesh" id="BoxMesh_back"]
size = Vector3(12, 4, 0.1)
[sub_resource type="BoxMesh" id="BoxMesh_left"]
size = Vector3(0.1, 4, 8)
[sub_resource type="BoxMesh" id="BoxMesh_right"]
size = Vector3(0.1, 4, 8)
[node name="Tavern" type="Node3D"]
[node name="TavernLobby" type="Node3D"]
script = ExtResource("1")
[node name="Taproom" parent="." instance=ExtResource("2")]
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.951, 0.309, 0, -0.309, 0.951, 0, 3, 6)
fov = 70.0
current = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_1")
[node name="OmniLight3D" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, 0)
light_color = Color(0.91, 0.643, 0.29, 1)
light_energy = 1.2
omni_range = 10.0
[node name="Floor" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.05, 0)
mesh = SubResource("BoxMesh_floor")
surface_material_override/0 = SubResource("Material_1")
[node name="Ceiling" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.05, 0)
mesh = SubResource("BoxMesh_ceiling")
surface_material_override/0 = SubResource("Material_1")
[node name="WallBack" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, -4)
mesh = SubResource("BoxMesh_back")
surface_material_override/0 = SubResource("Material_1")
[node name="WallLeft" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 2, 0)
mesh = SubResource("BoxMesh_left")
surface_material_override/0 = SubResource("Material_1")
[node name="WallRight" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 2, 0)
mesh = SubResource("BoxMesh_right")
surface_material_override/0 = SubResource("Material_1")
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="JoinPanel" type="VBoxContainer" parent="CanvasLayer"]