Added Damageable class that crating_station inherits from. Added new broken state to crafting_station with status light
This commit is contained in:
1 parent
63c0199d77
commit
7289eba670
15 files changed
+180
-72
No files matched your search
@@ -1,8 +1,11 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
[gd_scene load_steps=9 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/item_holder.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://scripts/crafting_station/crafting_station.gd" type="Script" id=2]
|
||||
[ext_resource path="res://scenes/coin_machine.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://scenes/item_dump.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://scenes/status_light.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://item_types/repair_kit.tres" type="Resource" id=6]
|
||||
|
||||
[sub_resource type="CylinderMesh" id=1]
|
||||
height = 0.936
|
||||
@@ -11,8 +14,9 @@ radial_segments = 8
|
||||
[sub_resource type="ConvexPolygonShape" id=2]
|
||||
points = PoolVector3Array( -0.0608763, 0.449247, 0.974783, -0.0608763, -0.464612, -0.974783, -0.0608763, 0.449247, -0.974783, 0.974783, -0.464612, -0.0608763, -0.974783, -0.464612, 0.0608763, 0.974783, 0.449247, 0.0608763, 0.0606902, -0.464648, 0.97486, -0.974783, 0.449247, -0.0608763, 0.7071, 0.453517, -0.7071, -0.705748, -0.468, -0.705748, -0.7071, 0.453517, 0.7071, 0.7071, 0.453517, 0.7071, 0.705748, -0.468, 0.705748, -0.705748, -0.468, 0.705748, 0.705748, -0.468, -0.705748, -0.7071, 0.453517, -0.7071, 0.0606902, -0.464648, -0.97486, -0.974783, -0.464612, -0.0608763, 0.974783, -0.464612, 0.0608763, -0.0608763, -0.464612, 0.974783, 0.0606902, 0.449283, 0.97486, 0.0606902, 0.449283, -0.97486, 0.974783, 0.449247, -0.0608763, -0.974783, 0.449247, 0.0608763, -0.642208, -0.46642, 0.73398, -0.642208, -0.46642, -0.73398, 0.578116, -0.464071, -0.760529, 0.578116, -0.464071, 0.760529, 0.760589, -0.464107, 0.577971, -0.760589, -0.464107, 0.577971, -0.760589, -0.464107, -0.577971, 0.760589, -0.464107, -0.577971 )
|
||||
|
||||
[node name="crafting_station" type="Spatial"]
|
||||
[node name="crafting_station" type="Spatial" groups=["damageable"]]
|
||||
script = ExtResource( 2 )
|
||||
start_broken = true
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="."]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.372095, 0 )
|
||||
@@ -48,6 +52,18 @@ unique_name_in_owner = true
|
||||
unique_name_in_owner = true
|
||||
one_shot = true
|
||||
|
||||
[node name="item_dump" parent="." instance=ExtResource( 4 )]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.366242, 0, 0 )
|
||||
item_type_0 = ExtResource( 6 )
|
||||
item_count_0 = 1
|
||||
|
||||
[node name="status_light" parent="." instance=ExtResource( 5 )]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1.1, 0, 0 )
|
||||
|
||||
[connection signal="item_changed" from="item_holder" to="." method="_on_item_holder_item_changed"]
|
||||
[connection signal="coin_requirement_met" from="coin_machine" to="." method="_on_coin_machine_coin_requirement_met"]
|
||||
[connection signal="timeout" from="gen_timer" to="." method="_on_gen_timer_timeout"]
|
||||
[connection signal="item_dump_completed" from="item_dump" to="." method="_on_item_dump_item_dump_completed"]
|
||||
[connection signal="item_dumped" from="item_dump" to="." method="_on_item_dump_item_dumped"]
|
||||
@@ -295,10 +295,11 @@ modulate = Color( 0, 0, 0, 1 )
|
||||
text = "Galley"
|
||||
|
||||
[node name="dinner_table" parent="Galley_Room" instance=ExtResource( 12 )]
|
||||
transform = Transform( 1, 0, -1.49012e-08, 0, 1, 0, 1.49012e-08, 0, 1, 1.54321, 0, -7.74583 )
|
||||
transform = Transform( 1, 0, -1.11759e-08, 0, 1, 0, 1.11759e-08, 0, 1, 1.77669, 0, -8.88646 )
|
||||
|
||||
[node name="oven" parent="Galley_Room" instance=ExtResource( 14 )]
|
||||
transform = Transform( 1, 0, -7.45058e-09, 0, 1, 0, 7.45058e-09, 0, 1, -2.08601, 0, -7.98964 )
|
||||
transform = Transform( 1.00001, 0, 3.72529e-09, 0, 1, 0, -3.72529e-09, 0, 1.00001, -2.828, 0, -10.6561 )
|
||||
start_broken = true
|
||||
|
||||
[node name="Hydroponics_Room" type="Spatial" parent="."]
|
||||
transform = Transform( 0.690862, 0.000404371, 0.722986, -0.000832856, 1, 0.000236545, -0.722985, -0.000765563, 0.690862, -6.25959, -7.15916e-05, -5.86512 )
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=8 format=2]
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/item_holder.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://scripts/dinner_table.gd" type="Script" id=2]
|
||||
@@ -6,19 +6,6 @@
|
||||
|
||||
[sub_resource type="SphereShape" id=4]
|
||||
|
||||
[sub_resource type="CylinderMesh" id=1]
|
||||
height = 0.1
|
||||
radial_segments = 8
|
||||
|
||||
[sub_resource type="CylinderMesh" id=2]
|
||||
top_radius = 0.1
|
||||
bottom_radius = 0.1
|
||||
height = 0.738
|
||||
radial_segments = 16
|
||||
|
||||
[sub_resource type="CylinderShape" id=3]
|
||||
height = 0.87498
|
||||
|
||||
[node name="dinner_table" type="Area"]
|
||||
collision_layer = 8
|
||||
collision_mask = 4
|
||||
@@ -29,32 +16,6 @@ all_food = [ ExtResource( 3 ) ]
|
||||
transform = Transform( 1.2, 0, 0, 0, 1.2, 0, 0, 0, 1.2, 0, 0, 0 )
|
||||
shape = SubResource( 4 )
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="."]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.648164, 0 )
|
||||
mesh = SubResource( 1 )
|
||||
|
||||
[node name="MeshInstance2" type="MeshInstance" parent="."]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.274821, 0.806474 )
|
||||
mesh = SubResource( 2 )
|
||||
|
||||
[node name="MeshInstance3" type="MeshInstance" parent="."]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.831715, 0.274821, 0.00579381 )
|
||||
mesh = SubResource( 2 )
|
||||
|
||||
[node name="MeshInstance4" type="MeshInstance" parent="."]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.012414, 0.274821, -0.832128 )
|
||||
mesh = SubResource( 2 )
|
||||
|
||||
[node name="MeshInstance5" type="MeshInstance" parent="."]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.809991, 0.274821, 0.00269032 )
|
||||
mesh = SubResource( 2 )
|
||||
|
||||
[node name="StaticBody" type="StaticBody" parent="."]
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="StaticBody"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.439889, 0 )
|
||||
shape = SubResource( 3 )
|
||||
|
||||
[node name="item_holder" parent="." instance=ExtResource( 1 )]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.776869, 0 )
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
[sub_resource type="BoxShape" id=1]
|
||||
|
||||
[node name="item_dump" type="Area"]
|
||||
collision_layer = 8
|
||||
collision_mask = 4
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="."]
|
||||
|
||||
+1
-3
@@ -11,7 +11,6 @@
|
||||
extents = Vector3( 0.648623, 1, 0.516904 )
|
||||
|
||||
[node name="oven" type="Spatial" groups=["damageable"]]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0063355, 0.00319374, -0.00456095 )
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="coin_machine" parent="." instance=ExtResource( 3 )]
|
||||
@@ -19,7 +18,6 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.621351, 0 )
|
||||
|
||||
[node name="item_dump" parent="." instance=ExtResource( 4 )]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.733121, 0 )
|
||||
collision_layer = 8
|
||||
collision_mask = 0
|
||||
item_type_0 = ExtResource( 6 )
|
||||
item_count_0 = 1
|
||||
@@ -32,7 +30,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.14052, 0 )
|
||||
shape = SubResource( 4 )
|
||||
|
||||
[node name="status_light" parent="." instance=ExtResource( 5 )]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.232042, 0.967385 )
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.868397 )
|
||||
|
||||
[node name="cook_timer" type="Timer" parent="."]
|
||||
one_shot = true
|
||||
|
||||
+1
-1
@@ -697,7 +697,7 @@ mesh = SubResource( 1 )
|
||||
skin = SubResource( 2 )
|
||||
|
||||
[node name="head_bone" type="BoneAttachment" parent="model_transform/DungMan/Armature/Skeleton" index="1"]
|
||||
transform = Transform( 1, -2.21502e-16, 1.62129e-17, -2.37146e-19, 0.0719347, 0.997409, -2.22095e-16, -0.997409, 0.0719347, -3.31708e-16, -0.0484204, -1.49945 )
|
||||
transform = Transform( 1, -2.22045e-16, 5.12852e-23, 1.32349e-23, 2.83122e-07, 1, -2.22045e-16, -1, 2.83122e-07, -3.33067e-16, 5.21541e-08, -1.5 )
|
||||
bone_name = "Item"
|
||||
|
||||
[node name="ItemSpawn" type="Spatial" parent="model_transform/DungMan/Armature/Skeleton/head_bone"]
|
||||
|
||||
Reference in new issue
Block a user