This commit is contained in:
Guillaume Vern
2025-10-09 16:03:18 +02:00
parent 4693cfb552
commit 80a4c128cc
16 changed files with 1029 additions and 179 deletions
+17
View File
@@ -0,0 +1,17 @@
extends Node3D
func _ready() -> void:
# Avoid duplicating again if already created
if has_node("extinguisher_model_0"):
return
var original = find_child("extinguisher_model", true, false)
if not original:
push_warning("No node named 'extinguisher_model' found.")
return
for i in range(10):
var copy = original.duplicate()
copy.name = "extinguisher_model_%d" % i
copy.position = original.position + Vector3(0, 0, i * 0.5)
add_child(copy)
+1
View File
@@ -0,0 +1 @@
uid://elfxvp7ojn1s
+40 -135
View File
@@ -1,80 +1,73 @@
[gd_scene load_steps=39 format=3 uid="uid://cjat5u6nsihgw"]
[gd_scene load_steps=27 format=3 uid="uid://cjat5u6nsihgw"]
[ext_resource type="PackedScene" uid="uid://cvn48xcmsmkrb" path="res://game/zones/zone_base.tscn" id="1_sk0kv"]
[ext_resource type="Material" uid="uid://csepeix2yvih" path="res://assets/prototype_materials/grass.tres" id="2_uryyw"]
[ext_resource type="Material" uid="uid://c7prktlpm7tmm" path="res://assets/prototype_materials/forest.tres" id="3_wfk2d"]
[ext_resource type="Resource" uid="uid://to5lown6orfd" path="res://game/zones/outside/outside_zone_info.tres" id="3_wyepd"]
[ext_resource type="Script" uid="uid://dn6lkhk3gbq4n" path="res://components/helpers/scatter.gd" id="4_v2d8i"]
[ext_resource type="Material" uid="uid://c386ygo86nqfc" path="res://assets/prototype_materials/wood_brown.tres" id="4_yw2go"]
[ext_resource type="Material" uid="uid://cjylinr1vdjcw" path="res://assets/prototype_materials/dark_brown.tres" id="5_peq87"]
[ext_resource type="Material" uid="uid://ccdofvku4c7w3" path="res://assets/prototype_materials/stone_grey.tres" id="6_y2a7s"]
[ext_resource type="PackedScene" uid="uid://vm423o6hdlya" path="res://components/helpers/zone_switch_area.tscn" id="7_omnq0"]
[ext_resource type="Environment" uid="uid://er867l7dl10j" path="res://default_env.tres" id="8_82q6b"]
[ext_resource type="Script" uid="uid://elfxvp7ojn1s" path="res://game/zones/outside/extinguishers.gd" id="8_cuabg"]
[ext_resource type="PackedScene" uid="uid://bhdq6md7l8avi" path="res://assets/psx-fire-extinguisher/source/extinguisher_model.tscn" id="9_twjr1"]
[ext_resource type="PackedScene" uid="uid://c4rpcr7s5pt3v" path="res://game/items/rock/rock.tscn" id="12_cxbia"]
[ext_resource type="PackedScene" uid="uid://chch4r7wddwdj" path="res://game/objects/storage/storage_box.tscn" id="13_galon"]
[ext_resource type="PackedScene" uid="uid://dbepe4i2q62yy" path="res://game/items/crate/crate.tscn" id="13_mtgv7"]
[ext_resource type="PackedScene" uid="uid://c33bpwxnrb0gr" path="res://game/items/toolbox/toolbox.tscn" id="14_68l3l"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_vljgg"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_cuabg"]
animation = &"Grip"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_tk2pl"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_j0qyq"]
animation = &"Grip"
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_twjr1"]
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_2oy5v"]
filter_enabled = true
filters = ["Armature/Skeleton3D:Little_Distal_L", "Armature/Skeleton3D:Little_Intermediate_L", "Armature/Skeleton3D:Little_Metacarpal_L", "Armature/Skeleton3D:Little_Proximal_L", "Armature/Skeleton3D:Middle_Distal_L", "Armature/Skeleton3D:Middle_Intermediate_L", "Armature/Skeleton3D:Middle_Metacarpal_L", "Armature/Skeleton3D:Middle_Proximal_L", "Armature/Skeleton3D:Ring_Distal_L", "Armature/Skeleton3D:Ring_Intermediate_L", "Armature/Skeleton3D:Ring_Metacarpal_L", "Armature/Skeleton3D:Ring_Proximal_L", "Armature/Skeleton3D:Thumb_Distal_L", "Armature/Skeleton3D:Thumb_Metacarpal_L", "Armature/Skeleton3D:Thumb_Proximal_L", "Armature/Skeleton:Little_Distal_L", "Armature/Skeleton:Little_Intermediate_L", "Armature/Skeleton:Little_Proximal_L", "Armature/Skeleton:Middle_Distal_L", "Armature/Skeleton:Middle_Intermediate_L", "Armature/Skeleton:Middle_Proximal_L", "Armature/Skeleton:Ring_Distal_L", "Armature/Skeleton:Ring_Intermediate_L", "Armature/Skeleton:Ring_Proximal_L", "Armature/Skeleton:Thumb_Distal_L", "Armature/Skeleton:Thumb_Proximal_L"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_u7c0g"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_vljgg"]
animation = &"Grip 5"
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_gfaum"]
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_tk2pl"]
filter_enabled = true
filters = ["Armature/Skeleton3D:Index_Distal_L", "Armature/Skeleton3D:Index_Intermediate_L", "Armature/Skeleton3D:Index_Metacarpal_L", "Armature/Skeleton3D:Index_Proximal_L", "Armature/Skeleton:Index_Distal_L", "Armature/Skeleton:Index_Intermediate_L", "Armature/Skeleton:Index_Proximal_L"]
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_mpg1a"]
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_twjr1"]
graph_offset = Vector2(-536, 11)
nodes/ClosedHand1/node = SubResource("AnimationNodeAnimation_vljgg")
nodes/ClosedHand1/node = SubResource("AnimationNodeAnimation_cuabg")
nodes/ClosedHand1/position = Vector2(-600, 300)
nodes/ClosedHand2/node = SubResource("AnimationNodeAnimation_tk2pl")
nodes/ClosedHand2/node = SubResource("AnimationNodeAnimation_j0qyq")
nodes/ClosedHand2/position = Vector2(-360, 300)
nodes/Grip/node = SubResource("AnimationNodeBlend2_twjr1")
nodes/Grip/node = SubResource("AnimationNodeBlend2_2oy5v")
nodes/Grip/position = Vector2(0, 20)
nodes/OpenHand/node = SubResource("AnimationNodeAnimation_u7c0g")
nodes/OpenHand/node = SubResource("AnimationNodeAnimation_vljgg")
nodes/OpenHand/position = Vector2(-600, 100)
nodes/Trigger/node = SubResource("AnimationNodeBlend2_gfaum")
nodes/Trigger/node = SubResource("AnimationNodeBlend2_tk2pl")
nodes/Trigger/position = Vector2(-360, 20)
node_connections = [&"output", 0, &"Grip", &"Grip", 0, &"Trigger", &"Grip", 1, &"ClosedHand2", &"Trigger", 0, &"OpenHand", &"Trigger", 1, &"ClosedHand1"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_airyt"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_u7c0g"]
animation = &"Grip"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_qeajv"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_gfaum"]
animation = &"Grip"
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_rejpy"]
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_mpg1a"]
filter_enabled = true
filters = ["Armature/Skeleton3D:Little_Distal_R", "Armature/Skeleton3D:Little_Intermediate_R", "Armature/Skeleton3D:Little_Metacarpal_R", "Armature/Skeleton3D:Little_Proximal_R", "Armature/Skeleton3D:Middle_Distal_R", "Armature/Skeleton3D:Middle_Intermediate_R", "Armature/Skeleton3D:Middle_Metacarpal_R", "Armature/Skeleton3D:Middle_Proximal_R", "Armature/Skeleton3D:Ring_Distal_R", "Armature/Skeleton3D:Ring_Intermediate_R", "Armature/Skeleton3D:Ring_Metacarpal_R", "Armature/Skeleton3D:Ring_Proximal_R", "Armature/Skeleton3D:Thumb_Distal_R", "Armature/Skeleton3D:Thumb_Metacarpal_R", "Armature/Skeleton3D:Thumb_Proximal_R", "Armature/Skeleton:Little_Distal_R", "Armature/Skeleton:Little_Intermediate_R", "Armature/Skeleton:Little_Proximal_R", "Armature/Skeleton:Middle_Distal_R", "Armature/Skeleton:Middle_Intermediate_R", "Armature/Skeleton:Middle_Proximal_R", "Armature/Skeleton:Ring_Distal_R", "Armature/Skeleton:Ring_Intermediate_R", "Armature/Skeleton:Ring_Proximal_R", "Armature/Skeleton:Thumb_Distal_R", "Armature/Skeleton:Thumb_Proximal_R"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_xhwk3"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_airyt"]
animation = &"Grip 5"
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_if2vo"]
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_qeajv"]
filter_enabled = true
filters = ["Armature/Skeleton3D:Index_Distal_R", "Armature/Skeleton3D:Index_Intermediate_R", "Armature/Skeleton3D:Index_Metacarpal_R", "Armature/Skeleton3D:Index_Proximal_R", "Armature/Skeleton:Index_Distal_R", "Armature/Skeleton:Index_Intermediate_R", "Armature/Skeleton:Index_Proximal_R"]
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_qimua"]
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_rejpy"]
graph_offset = Vector2(-552.664, 107.301)
nodes/ClosedHand1/node = SubResource("AnimationNodeAnimation_airyt")
nodes/ClosedHand1/node = SubResource("AnimationNodeAnimation_u7c0g")
nodes/ClosedHand1/position = Vector2(-600, 300)
nodes/ClosedHand2/node = SubResource("AnimationNodeAnimation_qeajv")
nodes/ClosedHand2/node = SubResource("AnimationNodeAnimation_gfaum")
nodes/ClosedHand2/position = Vector2(-360, 300)
nodes/Grip/node = SubResource("AnimationNodeBlend2_rejpy")
nodes/Grip/node = SubResource("AnimationNodeBlend2_mpg1a")
nodes/Grip/position = Vector2(0, 40)
nodes/OpenHand/node = SubResource("AnimationNodeAnimation_xhwk3")
nodes/OpenHand/node = SubResource("AnimationNodeAnimation_airyt")
nodes/OpenHand/position = Vector2(-600, 100)
nodes/Trigger/node = SubResource("AnimationNodeBlend2_if2vo")
nodes/Trigger/node = SubResource("AnimationNodeBlend2_qeajv")
nodes/Trigger/position = Vector2(-360, 40)
node_connections = [&"output", 0, &"Grip", &"Grip", 0, &"Trigger", &"Grip", 1, &"ClosedHand2", &"Trigger", 0, &"OpenHand", &"Trigger", 1, &"ClosedHand1"]
@@ -99,29 +92,12 @@ size = Vector2(0.02, 0.1)
cull_mode = 2
albedo_color = Color(0, 0.603922, 0.0901961, 1)
[sub_resource type="SphereMesh" id="SphereMesh_6ysum"]
material = ExtResource("6_y2a7s")
radius = 3.0
height = 4.0
radial_segments = 5
rings = 3
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_f4wyk"]
points = PackedVector3Array(-1.7634, 0, -2.42705, -1.24728, -1.41425, -1.71626, -2.85317, 0, 0.926607, -1.24728, 1.41386, -1.71626, 1.76284, 0, -2.42705, 1.24673, -1.41425, -1.71626, 0, -2, -0.000390053, -2.01755, -1.41425, 0.655149, -2.01755, 1.41386, 0.655149, 0, 0, 3, 0, 2, -0.000390053, 1.24673, 1.41386, -1.71626, 2.85317, 0, 0.926607, 2.01699, -1.41425, 0.655149, 0, -1.41425, 2.12081, 0, 1.41386, 2.12081, 2.01699, 1.41386, 0.655149)
[sub_resource type="BoxMesh" id="BoxMesh_s0cu3"]
material = ExtResource("5_peq87")
size = Vector3(1, 3, 0.2)
[sub_resource type="BoxShape3D" id="BoxShape3D_lsqhn"]
size = Vector3(1, 3, 0.1)
[sub_resource type="BoxShape3D" id="BoxShape3D_wdgkd"]
size = Vector3(1, 3, 0.2)
[node name="OutsideZone" instance=ExtResource("1_sk0kv")]
zone_info = ExtResource("3_wyepd")
[node name="BackPocket" parent="XROrigin3D/XRCamera3D" index="0"]
visible = false
[node name="Skeleton3D" parent="XROrigin3D/LeftHand/CollisionHandLeft/LeftHand/Hand_Nails_low_L/Armature" index="0"]
bones/1/rotation = Quaternion(0.323537, -2.5658142e-05, -0.027220426, 0.9458239)
bones/2/rotation = Quaternion(-0.09044407, -0.04151748, -0.16629349, 0.98104167)
@@ -148,7 +124,7 @@ transform = Transform3D(0.5408296, 0.8408128, -0.023173608, -0.08262672, 0.08052
[node name="AnimationTree" parent="XROrigin3D/LeftHand/CollisionHandLeft/LeftHand" index="1"]
root_node = NodePath("../Hand_Nails_low_L")
tree_root = SubResource("AnimationNodeBlendTree_mpg1a")
tree_root = SubResource("AnimationNodeBlendTree_twjr1")
[node name="WristUI" parent="XROrigin3D/LeftHand/CollisionHandLeft" index="7"]
scene_properties_keys = PackedStringArray("zone_wrist_ui.gd")
@@ -179,7 +155,13 @@ transform = Transform3D(0.5408295, -0.8408129, 0.023173586, 0.08262676, 0.080524
[node name="AnimationTree" parent="XROrigin3D/RightHand/CollisionHandRight/RightHand" index="1"]
root_node = NodePath("../Hand_Nails_low_R")
tree_root = SubResource("AnimationNodeBlendTree_qimua")
tree_root = SubResource("AnimationNodeBlendTree_rejpy")
[node name="LeftPocket" parent="XROrigin3D/PlayerBody" index="0"]
visible = false
[node name="RightPocket" parent="XROrigin3D/PlayerBody" index="1"]
visible = false
[node name="World" type="Node3D" parent="." index="1"]
@@ -247,89 +229,12 @@ instance_count = 3000
mesh = SubResource("QuadMesh_pt6e2")
material_override = SubResource("StandardMaterial3D_srm7c")
[node name="Stone1" type="StaticBody3D" parent="World" index="8"]
transform = Transform3D(0.764321, 0.0519332, 0.642742, -0.26228, 0.935615, 0.236294, -0.589087, -0.349183, 0.72873, 7, 0, 8)
[node name="extinguishers" type="Node3D" parent="World" index="8"]
transform = Transform3D(0.38699996, 1.8626451e-09, 0, -1.8626451e-09, 0.387, -1.8626451e-09, 1.4901161e-08, -9.313226e-10, 0.38699996, 0, 0.06884384, -2.2083645)
script = ExtResource("8_cuabg")
[node name="MeshInstance3D" type="MeshInstance3D" parent="World/Stone1" index="0"]
transform = Transform3D(1, -1.42492e-07, 0, 3.63216e-08, 1, 0, 0, 1.49012e-08, 1, 0, 0, 0)
mesh = SubResource("SphereMesh_6ysum")
[node name="CollisionShape3D" type="CollisionShape3D" parent="World/Stone1" index="1"]
transform = Transform3D(1, -1.42492e-07, 0, 3.63216e-08, 1, 0, 0, 1.49012e-08, 1, 0, 0, 0)
shape = SubResource("ConvexPolygonShape3D_f4wyk")
[node name="Stone2" type="StaticBody3D" parent="World" index="9"]
transform = Transform3D(0.417223, -0.0502081, 0.907416, -0.0618827, 0.994586, 0.0834845, -0.906695, -0.0909851, 0.411857, -8, -0.4, 8)
[node name="MeshInstance3D" type="MeshInstance3D" parent="World/Stone2" index="0"]
transform = Transform3D(1, -1.56462e-07, 0, 4.47035e-08, 1, 3.35276e-08, 0, 1.49012e-08, 1, 0, 0, 0)
mesh = SubResource("SphereMesh_6ysum")
[node name="CollisionShape3D" type="CollisionShape3D" parent="World/Stone2" index="1"]
transform = Transform3D(1, -1.42492e-07, 0, 3.63216e-08, 1, 0, 0, 1.49012e-08, 1, 0, 0, 0)
shape = SubResource("ConvexPolygonShape3D_f4wyk")
[node name="extinguisher_model" parent="World" index="10" instance=ExtResource("9_twjr1")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.06884384, -2.2083645)
[node name="HouseEntrance" type="Node3D" parent="." index="2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -8.6)
[node name="Exterior" type="CSGPolygon3D" parent="HouseEntrance" index="0"]
use_collision = true
polygon = PackedVector2Array(-3, 0, -3, 3, 0, 5, 3, 3, 3, 0, 0.5, 0, 0.5, 3, -0.5, 3, -0.5, 0)
material = ExtResource("4_yw2go")
[node name="Door" type="StaticBody3D" parent="HouseEntrance" index="1"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, -0.5)
[node name="MeshInstance3D" type="MeshInstance3D" parent="HouseEntrance/Door" index="0"]
mesh = SubResource("BoxMesh_s0cu3")
[node name="CollisionShape3D" type="CollisionShape3D" parent="HouseEntrance/Door" index="1"]
shape = SubResource("BoxShape3D_lsqhn")
[node name="ToHouseInterior" parent="." index="3" instance=ExtResource("7_omnq0")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -8.7)
zone_scene = "res://game/zones/house_interior/house_interior_zone.tscn"
spawn_node_name = "FromOutside"
[node name="CollisionShape3D" type="CollisionShape3D" parent="ToHouseInterior" index="0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)
shape = SubResource("BoxShape3D_wdgkd")
[node name="FromHouseInterior" type="Marker3D" parent="." index="4"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, -7.6)
[node name="Rock1" parent="." index="5" instance=ExtResource("12_cxbia")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.02816, 0.159056, 5.29193)
item_id = "rock_outside_1"
[node name="Rock2" parent="." index="6" instance=ExtResource("12_cxbia")]
transform = Transform3D(0.5, 0, 0.866025, 0, 1, 0, -0.866025, 0, 0.5, 4.52816, 0.159056, 5.29193)
item_id = "rock_outside_2"
[node name="Rock3" parent="." index="7" instance=ExtResource("12_cxbia")]
transform = Transform3D(0.258819, 0, 0.965926, 0, 1, 0, -0.965926, 0, 0.258819, 4.82816, 0.159056, 5.69193)
item_id = "rock_outside_3"
[node name="Crate1" parent="." index="8" instance=ExtResource("13_mtgv7")]
transform = Transform3D(0.965926, 0, -0.258819, 0, 1, 0, 0.258819, 0, 0.965926, -6, 0.5, -8.6)
item_id = "crate_outside_1"
[node name="Crate2" parent="." index="9" instance=ExtResource("13_mtgv7")]
transform = Transform3D(0.996195, 0, 0.0871557, 0, 1, 0, -0.0871557, 0, 0.996195, -4.7, 0.5, -8.6)
item_id = "crate_outside_2"
[node name="Crate3" parent="." index="10" instance=ExtResource("13_mtgv7")]
transform = Transform3D(1, 0, -2.23517e-08, 0, 1, 0, 2.23517e-08, 0, 1, -5.4, 1.5, -8.6)
item_id = "crate_outside_3"
[node name="StorageBox" parent="." index="11" instance=ExtResource("13_galon")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4, 0, -9)
[node name="Toolbox" parent="." index="12" instance=ExtResource("14_68l3l")]
transform = Transform3D(0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, 0.707107, 6, 0.117771, 4)
[node name="extinguisher_model" parent="World/extinguishers" index="0" instance=ExtResource("9_twjr1")]
transform = Transform3D(0.78, -3.754169e-09, 3.0033352e-08, 3.754169e-09, 0.78, -1.8770845e-09, -3.0033352e-08, 1.8770847e-09, 0.78, 0, 0, 0)
[editable path="XROrigin3D/LeftHand/CollisionHandLeft/LeftHand"]
[editable path="XROrigin3D/LeftHand/CollisionHandLeft/LeftHand/Hand_Nails_low_L"]