grunk/src/props/wall_switch/wall_switch.tscn

279 lines
15 KiB
Plaintext

[gd_scene load_steps=26 format=3 uid="uid://b6eg8t04rkh0c"]
[ext_resource type="Script" uid="uid://bkmn5m47mt1gh" path="res://src/props/wall_switch/wall_switch.gd" id="2_kfvqd"]
[ext_resource type="Texture2D" uid="uid://1wjcyqynwlb6" path="res://assets/props/wall_switch/wall_switch_C.png" id="2_vufqs"]
[ext_resource type="PackedScene" uid="uid://d0yq007888oq5" path="res://assets/props/wall_switch/wall_switch.gltf" id="2_whafo"]
[ext_resource type="Texture2D" uid="uid://bur4dtt4irwgd" path="res://assets/props/wall_switch/wall_switch_M.png" id="3_3fhmv"]
[ext_resource type="Texture2D" uid="uid://ddve6jcfcuthx" path="res://assets/props/wall_switch/wall_switch_N.png" id="4_pg3hp"]
[ext_resource type="Texture2D" uid="uid://rq5e0a3sco88" path="res://assets/props/wall_switch/wall_switch_R.png" id="5_555wb"]
[ext_resource type="Material" uid="uid://c1vy4bkwb1g5m" path="res://assets/materials/gunk_lowrez.material" id="8_2qpft"]
[ext_resource type="PackedScene" uid="uid://cdi5sl60mw1po" path="res://src/world/gunk_body/gunkable.tscn" id="9_eim2y"]
[ext_resource type="Script" uid="uid://deg5xd87cy8rg" path="res://src/props/interactive.gd" id="10_qw6jt"]
[ext_resource type="AudioStream" uid="uid://bgayfws34lg7q" path="res://assets/sfx/click_electronic_04.wav" id="11_7shuc"]
[ext_resource type="AudioStream" uid="uid://cnje66wrijwxw" path="res://assets/sfx/wall_switch.wav" id="12_2qpft"]
[ext_resource type="Script" uid="uid://c5o1d2shq2qig" path="res://src/world/game_sound/game_sound_emitter.gd" id="13_eim2y"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_jtkkw"]
albedo_texture = ExtResource("2_vufqs")
metallic = 1.0
metallic_texture = ExtResource("3_3fhmv")
roughness_texture = ExtResource("5_555wb")
normal_enabled = true
normal_texture = ExtResource("4_pg3hp")
texture_filter = 2
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_2qpft"]
data = PackedVector3Array(-0.192, -0.256, 0.08, -0.24, 0.32, -0.08, -0.192, 0.256, 0.08, -0.192, -0.256, 0.08, -0.24, -0.32, -0.08, -0.24, 0.32, -0.08, -0.24, -0.32, -0.08, 0.24, 0.32, -0.08, -0.24, 0.32, -0.08, -0.24, -0.32, -0.08, 0.24, -0.32, -0.08, 0.24, 0.32, -0.08, 0.24, -0.32, -0.08, 0.192, 0.256, 0.08, 0.24, 0.32, -0.08, 0.24, -0.32, -0.08, 0.192, -0.256, 0.08, 0.192, 0.256, 0.08, -0.192, -0.256, 0.08, 0.24, -0.32, -0.08, -0.24, -0.32, -0.08, 0.24, -0.32, -0.08, -0.192, -0.256, 0.08, 0.08, -0.256, 0.08, 0.24, -0.32, -0.08, 0.08, -0.256, 0.08, 0.192, -0.256, 0.08, 0.192, 0.256, 0.08, -0.24, 0.32, -0.08, 0.24, 0.32, -0.08, -0.24, 0.32, -0.08, 0.192, 0.256, 0.08, 0.08, 0.256, 0.08, -0.24, 0.32, -0.08, 0.08, 0.256, 0.08, -0.192, 0.256, 0.08, 0.192, -0.256, 0.08, 0.08, 0.256, 0.08, 0.192, 0.256, 0.08, 0.192, -0.256, 0.08, 0.08, -0.256, 0.08, 0.08, 0.256, 0.08, 0.04, 0.216, 0.08, 0.08, 0.256, 0.08, 0.08, -0.256, 0.08, -0.152, 0.216, 0.08, 0.08, 0.256, 0.08, 0.04, 0.216, 0.08, 0.04, 0.216, 0.08, 0.08, -0.256, 0.08, 0.04, -0.216, 0.08, -0.152, 0.216, 0.08, -0.192, 0.256, 0.08, 0.08, 0.256, 0.08, 0.04, -0.216, 0.08, 0.08, -0.256, 0.08, -0.192, -0.256, 0.08, -0.152, -0.216, 0.08, -0.192, 0.256, 0.08, -0.152, 0.216, 0.08, 0.04, -0.216, 0.08, -0.192, -0.256, 0.08, -0.152, -0.216, 0.08, -0.152, -0.216, 0.08, -0.192, -0.256, 0.08, -0.192, 0.256, 0.08, -0.152, 0.216, 0.08, -0.152, -0.216, 0.04, -0.152, -0.216, 0.08, -0.152, 0.216, 0.08, -0.152, 0.216, 0.04, -0.152, -0.216, 0.04, 0.04, -0.216, 0.04, -0.152, 0.216, 0.04, 0.04, 0.216, 0.04, 0.04, -0.216, 0.04, -0.152, -0.216, 0.04, -0.152, 0.216, 0.04, -0.152, -0.216, 0.08, 0.04, -0.216, 0.04, 0.04, -0.216, 0.08, -0.152, -0.216, 0.08, -0.152, -0.216, 0.04, 0.04, -0.216, 0.04, 0.04, 0.216, 0.08, -0.152, 0.216, 0.04, -0.152, 0.216, 0.08, 0.04, 0.216, 0.08, 0.04, 0.216, 0.04, -0.152, 0.216, 0.04, 0.04, -0.216, 0.08, 0.04, 0.216, 0.04, 0.04, 0.216, 0.08, 0.04, -0.216, 0.08, 0.04, -0.216, 0.04, 0.04, 0.216, 0.04, -0.14, 0.156, 0.06, -0.14, 0.196, 0.02, -0.14, 0.196, 0.06, -0.14, 0.156, 0.06, -0.14, 0.156, 0.02, -0.14, 0.196, 0.02, -0.14, 0.156, 0.06, -0.14, -0.18, 0.02, -0.14, 0.156, 0.02, -0.14, 0.156, 0.06, -0.14, -0.18, 0.06, -0.14, -0.18, 0.02, -0.14, -0.18, 0.06, -0.14, -0.2, 0.04, -0.14, -0.18, 0.02, 0.014, 0.156, 0.02, 0.028, 0.196, 0.02, 0.014, 0.196, 0.02, 0.014, 0.156, 0.02, 0.028, 0.156, 0.02, 0.028, 0.196, 0.02, 0.014, 0.156, 0.02, 0.028, -0.18, 0.02, 0.028, 0.156, 0.02, 0.014, 0.156, 0.02, 0.014, -0.18, 0.02, 0.028, -0.18, 0.02, 0.028, 0.156, 0.02, 0.028, 0.196, 0.06, 0.028, 0.196, 0.02, 0.028, 0.156, 0.02, 0.028, 0.156, 0.06, 0.028, 0.196, 0.06, 0.028, 0.156, 0.02, 0.028, -0.18, 0.06, 0.028, 0.156, 0.06, 0.028, 0.156, 0.02, 0.028, -0.18, 0.02, 0.028, -0.18, 0.06, 0.028, -0.18, 0.02, 0.028, -0.2, 0.04, 0.028, -0.18, 0.06, -0.126, 0.156, 0.06, -0.14, 0.196, 0.06, -0.126, 0.196, 0.06, -0.126, 0.156, 0.06, -0.14, 0.156, 0.06, -0.14, 0.196, 0.06, -0.126, 0.156, 0.06, -0.14, -0.18, 0.06, -0.14, 0.156, 0.06, -0.126, 0.156, 0.06, -0.126, -0.18, 0.06, -0.14, -0.18, 0.06, 0.014, -0.18, 0.06, 0.014, -0.2, 0.04, 0.014, -0.18, 0.02, 0.014, 0.156, 0.06, 0.014, -0.18, 0.06, 0.014, -0.18, 0.02, 0.014, 0.156, 0.06, 0.014, -0.18, 0.02, 0.014, 0.156, 0.02, -0.126, 0.196, 0.02, -0.14, 0.196, 0.06, -0.14, 0.196, 0.02, -0.126, 0.196, 0.02, -0.126, 0.196, 0.06, -0.14, 0.196, 0.06, 0.028, 0.196, 0.02, 0.014, 0.196, 0.06, 0.014, 0.196, 0.02, 0.028, 0.196, 0.02, 0.028, 0.196, 0.06, 0.014, 0.196, 0.06, 0.014, 0.196, 0.02, -0.126, 0.196, 0.06, -0.126, 0.196, 0.02, 0.014, 0.196, 0.02, 0.014, 0.196, 0.06, -0.126, 0.196, 0.06, -0.126, 0.156, 0.02, 0.014, 0.156, 0.06, 0.014, 0.156, 0.02, -0.126, 0.156, 0.02, -0.126, 0.156, 0.06, 0.014, 0.156, 0.06, 0.028, 0.156, 0.06, 0.014, 0.196, 0.06, 0.028, 0.196, 0.06, 0.028, 0.156, 0.06, 0.014, 0.156, 0.06, 0.014, 0.196, 0.06, 0.028, 0.156, 0.06, 0.014, -0.18, 0.06, 0.014, 0.156, 0.06, 0.028, 0.156, 0.06, 0.028, -0.18, 0.06, 0.014, -0.18, 0.06, 0.014, 0.156, 0.06, -0.126, 0.196, 0.06, 0.014, 0.196, 0.06, 0.014, 0.156, 0.06, -0.126, 0.156, 0.06, -0.126, 0.196, 0.06, -0.14, 0.156, 0.02, -0.126, 0.196, 0.02, -0.14, 0.196, 0.02, -0.14, 0.156, 0.02, -0.126, 0.156, 0.02, -0.126, 0.196, 0.02, -0.14, 0.156, 0.02, -0.126, -0.18, 0.02, -0.126, 0.156, 0.02, -0.14, 0.156, 0.02, -0.14, -0.18, 0.02, -0.126, -0.18, 0.02, -0.126, 0.156, 0.02, 0.014, 0.196, 0.02, -0.126, 0.196, 0.02, -0.126, 0.156, 0.02, 0.014, 0.156, 0.02, 0.014, 0.196, 0.02, -0.126, -0.18, 0.02, -0.126, -0.2, 0.04, -0.126, -0.18, 0.06, -0.126, 0.156, 0.02, -0.126, -0.18, 0.02, -0.126, -0.18, 0.06, -0.126, 0.156, 0.02, -0.126, -0.18, 0.06, -0.126, 0.156, 0.06, -0.126, -0.2, 0.04, -0.14, -0.18, 0.02, -0.14, -0.2, 0.04, -0.126, -0.2, 0.04, -0.126, -0.18, 0.02, -0.14, -0.18, 0.02, 0.014, -0.2, 0.04, 0.028, -0.18, 0.06, 0.028, -0.2, 0.04, 0.014, -0.2, 0.04, 0.014, -0.18, 0.06, 0.028, -0.18, 0.06, 0.028, -0.2, 0.04, 0.014, -0.18, 0.02, 0.014, -0.2, 0.04, 0.028, -0.2, 0.04, 0.028, -0.18, 0.02, 0.014, -0.18, 0.02, -0.14, -0.2, 0.04, -0.126, -0.18, 0.06, -0.126, -0.2, 0.04, -0.14, -0.2, 0.04, -0.14, -0.18, 0.06, -0.126, -0.18, 0.06)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_21svm"]
resource_local_to_scene = true
albedo_color = Color(0, 0, 0, 1)
emission_enabled = true
emission = Color(0.866667, 0.109804, 0.101961, 1)
emission_energy_multiplier = 0.0
[sub_resource type="BoxMesh" id="BoxMesh_g24yf"]
resource_local_to_scene = true
material = SubResource("StandardMaterial3D_21svm")
size = Vector3(0.08, 0.05, 0.025)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0cc87"]
resource_local_to_scene = true
albedo_color = Color(0, 0, 0, 1)
emission_enabled = true
emission = Color(0.137255, 0.984314, 0.34902, 1)
emission_energy_multiplier = 0.0
[sub_resource type="BoxMesh" id="BoxMesh_a6hjm"]
resource_local_to_scene = true
material = SubResource("StandardMaterial3D_0cc87")
size = Vector3(0.08, 0.05, 0.025)
[sub_resource type="Animation" id="Animation_ugm6b"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Lights/DangerLight:mesh:material:emission_energy_multiplier")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Lights/SuccessLight:mesh:material:emission_energy_multiplier")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Lights/SuccessLight/SuccessSFX:playing")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_6aabu"]
resource_name = "disable"
length = 2.0
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Lights/SuccessLight:mesh:material:emission_energy_multiplier")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 2),
"transitions": PackedFloat32Array(0.269, 1),
"update": 0,
"values": [8.0, 0.0]
}
[sub_resource type="Animation" id="Animation_pea1n"]
resource_name = "error_blink"
length = 4.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Lights/DangerLight:mesh:material:emission_energy_multiplier")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1, 3, 4),
"transitions": PackedFloat32Array(0.618, 1, 1.618, 1),
"update": 0,
"values": [0.0, 4.0, 4.0, 0.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Lights/SuccessLight:mesh:material:emission_energy_multiplier")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
[sub_resource type="Animation" id="Animation_njbf4"]
resource_name = "success"
length = 0.5
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Lights/SuccessLight:mesh:material:emission_energy_multiplier")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
"update": 1,
"values": [0.0, 8.0, 0.0, 8.0, 0.0, 8.0, 0.0, 8.0, 0.0, 8.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Lights/DangerLight:mesh:material:emission_energy_multiplier")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Lights/SuccessLight/SuccessSFX:playing")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_6ueib"]
_data = {
&"RESET": SubResource("Animation_ugm6b"),
&"disable": SubResource("Animation_6aabu"),
&"error_blink": SubResource("Animation_pea1n"),
&"success": SubResource("Animation_njbf4")
}
[sub_resource type="BoxShape3D" id="BoxShape3D_6maql"]
size = Vector3(0.3, 0.4, 0.1)
[sub_resource type="SphereShape3D" id="SphereShape3D_mxsyy"]
radius = 3.0
[node name="WallSwitch" groups=["Persistent"] instance=ExtResource("2_whafo")]
script = ExtResource("2_kfvqd")
enabled = true
label = "INTERACTIVE_SWITCH_LABEL"
[node name="WallSwitch_2" parent="Armature/Skeleton3D" index="0"]
surface_material_override/0 = SubResource("StandardMaterial3D_jtkkw")
[node name="AnimationPlayer" parent="." index="1"]
unique_name_in_owner = true
[node name="StaticBody3D" type="StaticBody3D" parent="." index="2" groups=["PlasticMaterial"]]
collision_layer = 5
collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D" index="0"]
shape = SubResource("ConcavePolygonShape3D_2qpft")
[node name="Gunkable" parent="StaticBody3D" index="1" node_paths=PackedStringArray("body", "mesh_instance") instance=ExtResource("9_eim2y")]
unique_name_in_owner = true
mask_dim = 64
body = NodePath("..")
mesh_instance = NodePath("../../Armature/Skeleton3D/WallSwitch_2")
source_gunk_material = ExtResource("8_2qpft")
[node name="Lights" type="Node3D" parent="." index="3"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.137, 0.18, 0.08)
[node name="DangerLight" type="MeshInstance3D" parent="Lights" index="0"]
gi_mode = 2
mesh = SubResource("BoxMesh_g24yf")
[node name="SuccessLight" type="MeshInstance3D" parent="Lights" index="1"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0685843, 0)
gi_mode = 2
mesh = SubResource("BoxMesh_a6hjm")
[node name="SuccessSFX" type="AudioStreamPlayer3D" parent="Lights/SuccessLight" index="0"]
stream = ExtResource("11_7shuc")
volume_db = -16.0
unit_size = 4.0
bus = &"SFX"
[node name="LightAnimation" type="AnimationPlayer" parent="Lights" index="2"]
unique_name_in_owner = true
root_node = NodePath("../..")
libraries = {
&"": SubResource("AnimationLibrary_6ueib")
}
autoplay = "error_blink"
[node name="Interactive" type="StaticBody3D" parent="." index="4"]
unique_name_in_owner = true
collision_layer = 2
collision_mask = 0
script = ExtResource("10_qw6jt")
label = "INTERACTIVE_SWITCH_LABEL"
verb = "INTERACTIVE_SWITCH_VERB"
[node name="CollisionShape3D" type="CollisionShape3D" parent="Interactive" index="0"]
shape = SubResource("BoxShape3D_6maql")
[node name="ActionSFX" type="AudioStreamPlayer3D" parent="." index="5"]
unique_name_in_owner = true
stream = ExtResource("12_2qpft")
volume_db = -12.0
unit_size = 3.0
bus = &"SFX"
[node name="ActionDelay" type="Timer" parent="." index="6"]
unique_name_in_owner = true
wait_time = 2.8
one_shot = true
[node name="WallSwitchGameSoundEmitter" type="Area3D" parent="." index="7"]
collision_layer = 0
collision_mask = 16
script = ExtResource("13_eim2y")
metadata/_custom_type_script = "uid://c5o1d2shq2qig"
[node name="CollisionShape3D" type="CollisionShape3D" parent="WallSwitchGameSoundEmitter" index="0"]
shape = SubResource("SphereShape3D_mxsyy")
[connection signal="clear_total_updated" from="StaticBody3D/Gunkable" to="." method="_on_clear_total_updated"]
[connection signal="activated" from="Interactive" to="." method="_activate"]
[connection signal="timeout" from="ActionDelay" to="." method="_on_action_delay_timeout"]
[connection signal="timeout" from="ActionDelay" to="WallSwitchGameSoundEmitter" method="emit_sound_here"]