8462a2fde7
- Added SymptomManager autoload for managing symptom intensities. - Introduced nausea tilt effect for camera roll based on nausea intensity. - Created color desaturation shader and overlay for visual feedback. - Developed TreatmentManager to handle nausea ramping during IV treatment. - Added hospital room scene with first-person controller and interactions. - Implemented sit-down interaction for the treatment chair. - Created IV insertion sequence with animations and completion signal. - Added player controller with movement and interaction capabilities. - Integrated nausea effects into the player experience with smooth transitions.
201 lines
7.3 KiB
Plaintext
201 lines
7.3 KiB
Plaintext
[gd_scene load_steps=20 format=3 uid="uid://b1hosp1room01a"]
|
|
|
|
[ext_resource type="PackedScene" path="res://scenes/hospital/player.tscn" id="1_player"]
|
|
[ext_resource type="PackedScene" path="res://scenes/hospital/chair_interaction.tscn" id="2_chair"]
|
|
[ext_resource type="PackedScene" path="res://scenes/hospital/iv_insertion.tscn" id="3_iv"]
|
|
[ext_resource type="PackedScene" path="res://scenes/symptoms/nausea_overlay.tscn" id="4_overlay"]
|
|
[ext_resource type="Script" path="res://scripts/game_systems/treatment_manager.gd" id="5_treatment"]
|
|
|
|
; --- Materials ---
|
|
[sub_resource type="StandardMaterial3D" id="Mat_Floor"]
|
|
albedo_color = Color(0.72, 0.74, 0.76, 1)
|
|
roughness = 0.6
|
|
|
|
[sub_resource type="StandardMaterial3D" id="Mat_Wall"]
|
|
albedo_color = Color(0.86, 0.88, 0.85, 1)
|
|
roughness = 0.85
|
|
|
|
[sub_resource type="StandardMaterial3D" id="Mat_Ceiling"]
|
|
albedo_color = Color(0.93, 0.94, 0.94, 1)
|
|
roughness = 0.9
|
|
|
|
[sub_resource type="StandardMaterial3D" id="Mat_Bed"]
|
|
albedo_color = Color(0.3, 0.45, 0.55, 1)
|
|
roughness = 0.7
|
|
|
|
[sub_resource type="StandardMaterial3D" id="Mat_Chair"]
|
|
albedo_color = Color(0.2, 0.5, 0.4, 1)
|
|
roughness = 0.7
|
|
|
|
[sub_resource type="StandardMaterial3D" id="Mat_Metal"]
|
|
albedo_color = Color(0.8, 0.82, 0.85, 1)
|
|
metallic = 0.7
|
|
roughness = 0.3
|
|
|
|
[sub_resource type="StandardMaterial3D" id="Mat_Wood"]
|
|
albedo_color = Color(0.55, 0.42, 0.3, 1)
|
|
roughness = 0.6
|
|
|
|
; --- Meshes ---
|
|
[sub_resource type="PlaneMesh" id="Mesh_Floor"]
|
|
size = Vector2(6, 8)
|
|
|
|
[sub_resource type="BoxMesh" id="Mesh_BedFrame"]
|
|
size = Vector3(1, 0.5, 2)
|
|
|
|
[sub_resource type="BoxMesh" id="Mesh_BedMattress"]
|
|
size = Vector3(0.95, 0.2, 1.95)
|
|
|
|
[sub_resource type="BoxMesh" id="Mesh_ChairSeat"]
|
|
size = Vector3(0.7, 0.15, 0.7)
|
|
|
|
[sub_resource type="BoxMesh" id="Mesh_ChairBack"]
|
|
size = Vector3(0.7, 0.8, 0.15)
|
|
|
|
[sub_resource type="CylinderMesh" id="Mesh_IVPole"]
|
|
top_radius = 0.02
|
|
bottom_radius = 0.02
|
|
height = 1.8
|
|
|
|
[sub_resource type="BoxMesh" id="Mesh_Table"]
|
|
size = Vector3(0.5, 0.7, 0.5)
|
|
|
|
[sub_resource type="BoxMesh" id="Mesh_Wall"]
|
|
size = Vector3(0.1, 3, 8)
|
|
|
|
; --- Collision shapes ---
|
|
[sub_resource type="WorldBoundaryShape3D" id="Shape_Floor"]
|
|
|
|
[sub_resource type="BoxShape3D" id="Shape_Wall"]
|
|
size = Vector3(0.1, 3, 8)
|
|
|
|
[node name="HospitalRoom" type="Node3D"]
|
|
|
|
; ---------------- Structure ----------------
|
|
[node name="Floor" type="StaticBody3D" parent="."]
|
|
|
|
[node name="FloorMesh" type="MeshInstance3D" parent="Floor"]
|
|
mesh = SubResource("Mesh_Floor")
|
|
surface_material_override/0 = SubResource("Mat_Floor")
|
|
|
|
[node name="FloorCollision" type="CollisionShape3D" parent="Floor"]
|
|
shape = SubResource("Shape_Floor")
|
|
|
|
[node name="Ceiling" type="MeshInstance3D" parent="."]
|
|
transform = Transform3D(1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 3, 0)
|
|
mesh = SubResource("Mesh_Floor")
|
|
surface_material_override/0 = SubResource("Mat_Ceiling")
|
|
|
|
[node name="WallNorth" type="StaticBody3D" parent="."]
|
|
transform = Transform3D(0, 0, 1, 0, 1, 0, -1, 0, 0, 0, 1.5, -4)
|
|
|
|
[node name="WallNorthMesh" type="MeshInstance3D" parent="WallNorth"]
|
|
mesh = SubResource("Mesh_Wall")
|
|
surface_material_override/0 = SubResource("Mat_Wall")
|
|
|
|
[node name="WallNorthCollision" type="CollisionShape3D" parent="WallNorth"]
|
|
shape = SubResource("Shape_Wall")
|
|
|
|
[node name="WallSouth" type="StaticBody3D" parent="."]
|
|
transform = Transform3D(0, 0, 1, 0, 1, 0, -1, 0, 0, 0, 1.5, 4)
|
|
|
|
[node name="WallSouthMesh" type="MeshInstance3D" parent="WallSouth"]
|
|
mesh = SubResource("Mesh_Wall")
|
|
surface_material_override/0 = SubResource("Mat_Wall")
|
|
|
|
[node name="WallSouthCollision" type="CollisionShape3D" parent="WallSouth"]
|
|
shape = SubResource("Shape_Wall")
|
|
|
|
[node name="WallEast" type="StaticBody3D" parent="."]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 1.5, 0)
|
|
|
|
[node name="WallEastMesh" type="MeshInstance3D" parent="WallEast"]
|
|
mesh = SubResource("Mesh_Wall")
|
|
surface_material_override/0 = SubResource("Mat_Wall")
|
|
|
|
[node name="WallEastCollision" type="CollisionShape3D" parent="WallEast"]
|
|
shape = SubResource("Shape_Wall")
|
|
|
|
[node name="WallWest" type="StaticBody3D" parent="."]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3, 1.5, 0)
|
|
|
|
[node name="WallWestMesh" type="MeshInstance3D" parent="WallWest"]
|
|
mesh = SubResource("Mesh_Wall")
|
|
surface_material_override/0 = SubResource("Mat_Wall")
|
|
|
|
[node name="WallWestCollision" type="CollisionShape3D" parent="WallWest"]
|
|
shape = SubResource("Shape_Wall")
|
|
|
|
; ---------------- Furniture ----------------
|
|
[node name="Bed" type="Node3D" parent="."]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.8, 0, -2)
|
|
|
|
[node name="BedFrame" type="MeshInstance3D" parent="Bed"]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.25, 0)
|
|
mesh = SubResource("Mesh_BedFrame")
|
|
surface_material_override/0 = SubResource("Mat_Metal")
|
|
|
|
[node name="BedMattress" type="MeshInstance3D" parent="Bed"]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6, 0)
|
|
mesh = SubResource("Mesh_BedMattress")
|
|
surface_material_override/0 = SubResource("Mat_Bed")
|
|
|
|
[node name="Chair" type="Node3D" parent="."]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.2, 0, 1.5)
|
|
|
|
[node name="ChairSeat" type="MeshInstance3D" parent="Chair"]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
|
mesh = SubResource("Mesh_ChairSeat")
|
|
surface_material_override/0 = SubResource("Mat_Chair")
|
|
|
|
[node name="ChairBack" type="MeshInstance3D" parent="Chair"]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.95, -0.27)
|
|
mesh = SubResource("Mesh_ChairBack")
|
|
surface_material_override/0 = SubResource("Mat_Chair")
|
|
|
|
[node name="ChairInteraction" parent="." instance=ExtResource("2_chair")]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.2, 0, 1.5)
|
|
|
|
[node name="IVStand" type="MeshInstance3D" parent="."]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0.9, 1.5)
|
|
mesh = SubResource("Mesh_IVPole")
|
|
surface_material_override/0 = SubResource("Mat_Metal")
|
|
|
|
[node name="BedsideTable" type="MeshInstance3D" parent="."]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5, 0.35, 1.5)
|
|
mesh = SubResource("Mesh_Table")
|
|
surface_material_override/0 = SubResource("Mat_Wood")
|
|
|
|
; ---------------- Lighting ----------------
|
|
[node name="OverheadLight" type="DirectionalLight3D" parent="."]
|
|
transform = Transform3D(1, 0, 0, 0, 0.5, 0.866, 0, -0.866, 0.5, 0, 2.9, 0)
|
|
light_energy = 0.9
|
|
shadow_enabled = true
|
|
|
|
[node name="CeilingLamp" type="OmniLight3D" parent="."]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.7, 0)
|
|
light_energy = 1.5
|
|
omni_range = 8.0
|
|
|
|
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
|
|
|
; ---------------- Player ----------------
|
|
; Spawn near south wall (z=3), rotated ~ -45deg to face the chair (chair at x=1.2, z=1.5).
|
|
[node name="Player" parent="." instance=ExtResource("1_player")]
|
|
transform = Transform3D(0.7071, 0, 0.7071, 0, 1, 0, -0.7071, 0, 0.7071, -1.5, 0, 3)
|
|
|
|
; ---------------- IV Insertion ----------------
|
|
; Positioned roughly in front of and below the seated player's view.
|
|
[node name="IVInsertion" parent="." instance=ExtResource("3_iv")]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.0, 1.1, 1.4)
|
|
|
|
; ---------------- Symptom Overlay ----------------
|
|
[node name="NauseaOverlay" parent="." instance=ExtResource("4_overlay")]
|
|
|
|
; ---------------- Treatment Manager ----------------
|
|
[node name="TreatmentManager" type="Node" parent="."]
|
|
script = ExtResource("5_treatment")
|
|
|
|
[connection signal="player_seated" from="ChairInteraction" to="IVInsertion" method="begin_sequence"]
|
|
[connection signal="iv_completed" from="IVInsertion" to="TreatmentManager" method="start_ramp"]
|