diff --git a/asset_dev/level/bulkhead/bulkhead.blend b/asset_dev/level/bulkhead/bulkhead.blend index 9b4e980..4425ace 100644 Binary files a/asset_dev/level/bulkhead/bulkhead.blend and b/asset_dev/level/bulkhead/bulkhead.blend differ diff --git a/asset_dev/level/bulkhead/bulkhead.blend1 b/asset_dev/level/bulkhead/bulkhead.blend1 index 2c62f77..1457064 100644 Binary files a/asset_dev/level/bulkhead/bulkhead.blend1 and b/asset_dev/level/bulkhead/bulkhead.blend1 differ diff --git a/assets/props/bulkhead/bulkhead.bin b/assets/props/bulkhead/bulkhead.bin index 490c646..8649f17 100644 Binary files a/assets/props/bulkhead/bulkhead.bin and b/assets/props/bulkhead/bulkhead.bin differ diff --git a/assets/props/bulkhead/bulkhead.gltf b/assets/props/bulkhead/bulkhead.gltf index cf1eb1f..48a5b7e 100644 --- a/assets/props/bulkhead/bulkhead.gltf +++ b/assets/props/bulkhead/bulkhead.gltf @@ -20,7 +20,12 @@ }, { "mesh":1, - "name":"Door" + "name":"Door", + "translation":[ + 0, + 2.799999952316284, + 0 + ] } ], "animations":[ @@ -29,26 +34,26 @@ { "sampler":0, "target":{ - "node":0, + "node":1, "path":"translation" } }, { "sampler":1, "target":{ - "node":0, + "node":1, "path":"rotation" } }, { "sampler":2, "target":{ - "node":0, + "node":1, "path":"scale" } } ], - "name":"RESET", + "name":"close", "samplers":[ { "input":8, @@ -56,14 +61,57 @@ "output":9 }, { - "input":8, - "interpolation":"LINEAR", - "output":10 + "input":10, + "interpolation":"STEP", + "output":11 }, + { + "input":10, + "interpolation":"STEP", + "output":12 + } + ] + }, + { + "channels":[ + { + "sampler":0, + "target":{ + "node":1, + "path":"translation" + } + }, + { + "sampler":1, + "target":{ + "node":1, + "path":"rotation" + } + }, + { + "sampler":2, + "target":{ + "node":1, + "path":"scale" + } + } + ], + "name":"close2", + "samplers":[ { "input":8, "interpolation":"LINEAR", - "output":11 + "output":13 + }, + { + "input":10, + "interpolation":"STEP", + "output":14 + }, + { + "input":10, + "interpolation":"STEP", + "output":15 } ] }, @@ -94,19 +142,19 @@ "name":"open", "samplers":[ { - "input":12, + "input":16, "interpolation":"LINEAR", - "output":13 + "output":17 }, { - "input":14, + "input":18, "interpolation":"STEP", - "output":15 + "output":19 }, { - "input":14, + "input":18, "interpolation":"STEP", - "output":16 + "output":20 } ] }, @@ -137,23 +185,57 @@ "name":"RESET", "samplers":[ { - "input":8, + "input":21, "interpolation":"LINEAR", - "output":17 + "output":22 }, { - "input":8, + "input":21, "interpolation":"LINEAR", - "output":18 + "output":23 }, { - "input":8, + "input":21, "interpolation":"LINEAR", - "output":19 + "output":24 } ] } ], + "materials":[ + { + "alphaMode":"BLEND", + "doubleSided":true, + "name":"BulkheadFrame", + "normalTexture":{ + "index":0 + }, + "pbrMetallicRoughness":{ + "baseColorTexture":{ + "index":1 + }, + "metallicRoughnessTexture":{ + "index":2 + } + } + }, + { + "alphaMode":"BLEND", + "doubleSided":true, + "name":"BulkheadMaterial", + "normalTexture":{ + "index":3 + }, + "pbrMetallicRoughness":{ + "baseColorTexture":{ + "index":4 + }, + "metallicRoughnessTexture":{ + "index":5 + } + } + } + ], "meshes":[ { "name":"Cube.001", @@ -164,7 +246,8 @@ "NORMAL":1, "TEXCOORD_0":2 }, - "indices":3 + "indices":3, + "material":0 } ] }, @@ -177,11 +260,70 @@ "NORMAL":5, "TEXCOORD_0":6 }, - "indices":7 + "indices":7, + "material":1 } ] } ], + "textures":[ + { + "sampler":0, + "source":0 + }, + { + "sampler":0, + "source":1 + }, + { + "sampler":0, + "source":2 + }, + { + "sampler":0, + "source":3 + }, + { + "sampler":0, + "source":4 + }, + { + "sampler":0, + "source":5 + } + ], + "images":[ + { + "mimeType":"image/png", + "name":"bulkhead_frame_N", + "uri":"bulkhead_frame_N.png" + }, + { + "mimeType":"image/png", + "name":"bulkhead_frame_C", + "uri":"bulkhead_frame_C.png" + }, + { + "mimeType":"image/png", + "name":"bulkhead_frame_M-bulkhead_frame_R", + "uri":"bulkhead_frame_M-bulkhead_frame_R.png" + }, + { + "mimeType":"image/png", + "name":"bulkhead_door_N", + "uri":"bulkhead_door_N.png" + }, + { + "mimeType":"image/png", + "name":"bulkhead_door_C", + "uri":"bulkhead_door_C.png" + }, + { + "mimeType":"image/png", + "name":"bulkhead_door_M-bulkhead_door_R", + "uri":"bulkhead_door_M-bulkhead_door_R.png" + } + ], "accessors":[ { "bufferView":0, @@ -254,9 +396,9 @@ { "bufferView":8, "componentType":5126, - "count":1, + "count":320, "max":[ - 0.041666666666666664 + 13.333333333333334 ], "min":[ 0.041666666666666664 @@ -266,43 +408,55 @@ { "bufferView":9, "componentType":5126, - "count":1, + "count":320, "type":"VEC3" }, { "bufferView":10, "componentType":5126, - "count":1, - "type":"VEC4" - }, - { - "bufferView":11, - "componentType":5126, - "count":1, - "type":"VEC3" - }, - { - "bufferView":12, - "componentType":5126, - "count":160, + "count":2, "max":[ - 6.666666666666667 + 13.333333333333334 ], "min":[ 0.041666666666666664 ], "type":"SCALAR" }, + { + "bufferView":11, + "componentType":5126, + "count":2, + "type":"VEC4" + }, + { + "bufferView":12, + "componentType":5126, + "count":2, + "type":"VEC3" + }, { "bufferView":13, "componentType":5126, - "count":160, + "count":320, "type":"VEC3" }, { "bufferView":14, "componentType":5126, "count":2, + "type":"VEC4" + }, + { + "bufferView":15, + "componentType":5126, + "count":2, + "type":"VEC3" + }, + { + "bufferView":16, + "componentType":5126, + "count":160, "max":[ 6.666666666666667 ], @@ -311,32 +465,62 @@ ], "type":"SCALAR" }, - { - "bufferView":15, - "componentType":5126, - "count":2, - "type":"VEC4" - }, - { - "bufferView":16, - "componentType":5126, - "count":2, - "type":"VEC3" - }, { "bufferView":17, "componentType":5126, - "count":1, + "count":160, "type":"VEC3" }, { "bufferView":18, "componentType":5126, + "count":2, + "max":[ + 6.666666666666667 + ], + "min":[ + 0.041666666666666664 + ], + "type":"SCALAR" + }, + { + "bufferView":19, + "componentType":5126, + "count":2, + "type":"VEC4" + }, + { + "bufferView":20, + "componentType":5126, + "count":2, + "type":"VEC3" + }, + { + "bufferView":21, + "componentType":5126, + "count":1, + "max":[ + 0.041666666666666664 + ], + "min":[ + 0.041666666666666664 + ], + "type":"SCALAR" + }, + { + "bufferView":22, + "componentType":5126, + "count":1, + "type":"VEC3" + }, + { + "bufferView":23, + "componentType":5126, "count":1, "type":"VEC4" }, { - "bufferView":19, + "bufferView":24, "componentType":5126, "count":1, "type":"VEC3" @@ -393,68 +577,99 @@ }, { "buffer":0, - "byteLength":4, + "byteLength":1280, "byteOffset":3736 }, { "buffer":0, - "byteLength":12, - "byteOffset":3740 - }, - { - "buffer":0, - "byteLength":16, - "byteOffset":3752 - }, - { - "buffer":0, - "byteLength":12, - "byteOffset":3768 - }, - { - "buffer":0, - "byteLength":640, - "byteOffset":3780 - }, - { - "buffer":0, - "byteLength":1920, - "byteOffset":4420 + "byteLength":3840, + "byteOffset":5016 }, { "buffer":0, "byteLength":8, - "byteOffset":6340 + "byteOffset":8856 }, { "buffer":0, "byteLength":32, - "byteOffset":6348 + "byteOffset":8864 }, { "buffer":0, "byteLength":24, - "byteOffset":6380 + "byteOffset":8896 + }, + { + "buffer":0, + "byteLength":3840, + "byteOffset":8920 + }, + { + "buffer":0, + "byteLength":32, + "byteOffset":12760 + }, + { + "buffer":0, + "byteLength":24, + "byteOffset":12792 + }, + { + "buffer":0, + "byteLength":640, + "byteOffset":12816 + }, + { + "buffer":0, + "byteLength":1920, + "byteOffset":13456 + }, + { + "buffer":0, + "byteLength":8, + "byteOffset":15376 + }, + { + "buffer":0, + "byteLength":32, + "byteOffset":15384 + }, + { + "buffer":0, + "byteLength":24, + "byteOffset":15416 + }, + { + "buffer":0, + "byteLength":4, + "byteOffset":15440 }, { "buffer":0, "byteLength":12, - "byteOffset":6404 + "byteOffset":15444 }, { "buffer":0, "byteLength":16, - "byteOffset":6416 + "byteOffset":15456 }, { "buffer":0, "byteLength":12, - "byteOffset":6432 + "byteOffset":15472 + } + ], + "samplers":[ + { + "magFilter":9728, + "minFilter":9984 } ], "buffers":[ { - "byteLength":6444, + "byteLength":15484, "uri":"bulkhead.bin" } ] diff --git a/assets/props/bulkhead/bulkhead_door_M-bulkhead_door_R.png b/assets/props/bulkhead/bulkhead_door_M-bulkhead_door_R.png new file mode 100644 index 0000000..66f6d4e --- /dev/null +++ b/assets/props/bulkhead/bulkhead_door_M-bulkhead_door_R.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28c942e1de148c27e35f0c1446b3ae165ecfd35c7c0954f17946451ca5606952 +size 3622 diff --git a/assets/props/bulkhead/bulkhead_door_M-bulkhead_door_R.png.import b/assets/props/bulkhead/bulkhead_door_M-bulkhead_door_R.png.import new file mode 100644 index 0000000..7a92872 --- /dev/null +++ b/assets/props/bulkhead/bulkhead_door_M-bulkhead_door_R.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ep7ykbhxgcbf" +path="res://.godot/imported/bulkhead_door_M-bulkhead_door_R.png-e1e518a48e3b4ddd72a30986a6ea2d8d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/props/bulkhead/bulkhead_door_M-bulkhead_door_R.png" +dest_files=["res://.godot/imported/bulkhead_door_M-bulkhead_door_R.png-e1e518a48e3b4ddd72a30986a6ea2d8d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/assets/props/bulkhead/bulkhead_frame_M-bulkhead_frame_R.png b/assets/props/bulkhead/bulkhead_frame_M-bulkhead_frame_R.png new file mode 100644 index 0000000..66f6d4e --- /dev/null +++ b/assets/props/bulkhead/bulkhead_frame_M-bulkhead_frame_R.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28c942e1de148c27e35f0c1446b3ae165ecfd35c7c0954f17946451ca5606952 +size 3622 diff --git a/assets/props/bulkhead/bulkhead_frame_M-bulkhead_frame_R.png.import b/assets/props/bulkhead/bulkhead_frame_M-bulkhead_frame_R.png.import new file mode 100644 index 0000000..8496bb0 --- /dev/null +++ b/assets/props/bulkhead/bulkhead_frame_M-bulkhead_frame_R.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://lhs1wiku1xuc" +path="res://.godot/imported/bulkhead_frame_M-bulkhead_frame_R.png-e7661d599085e5b566db00c40178b2c4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/props/bulkhead/bulkhead_frame_M-bulkhead_frame_R.png" +dest_files=["res://.godot/imported/bulkhead_frame_M-bulkhead_frame_R.png-e7661d599085e5b566db00c40178b2c4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/levels/ghost_ship/ghost_ship_level.tscn b/levels/ghost_ship/ghost_ship_level.tscn index 8b535e0..6ef9310 100644 --- a/levels/ghost_ship/ghost_ship_level.tscn +++ b/levels/ghost_ship/ghost_ship_level.tscn @@ -339,50 +339,63 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12, 1.5, -45) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9, 1.5, -57) [connection signal="activated" from="BeastNav/Airlock/SwitchA1" to="BeastNav/Airlock/SwitchA1" method="disable"] -[connection signal="activated" from="BeastNav/Airlock/SwitchA1" to="BeastNav/Bulkheads/BulkheadA" method="open"] [connection signal="activated" from="BeastNav/Airlock/SwitchA1" to="BeastNav/Corridor1/SwitchA2" method="disable"] +[connection signal="activated" from="BeastNav/Airlock/SwitchA1" to="BeastNav/Bulkheads/BulkheadA" method="toggle"] [connection signal="activated" from="BeastNav/Corridor1/SwitchA2" to="BeastNav/Airlock/SwitchA1" method="disable"] -[connection signal="activated" from="BeastNav/Corridor1/SwitchA2" to="BeastNav/Bulkheads/BulkheadA" method="open"] [connection signal="activated" from="BeastNav/Corridor1/SwitchA2" to="BeastNav/Corridor1/SwitchA2" method="disable"] -[connection signal="activated" from="BeastNav/Corridor1/SwitchB1" to="BeastNav/Bulkheads/BulkheadB" method="open"] +[connection signal="activated" from="BeastNav/Corridor1/SwitchA2" to="BeastNav/Bulkheads/BulkheadA" method="toggle"] [connection signal="activated" from="BeastNav/Corridor1/SwitchB1" to="BeastNav/Corridor1/SwitchB1" method="disable"] [connection signal="activated" from="BeastNav/Corridor1/SwitchB1" to="BeastNav/MessHall/SwitchB2" method="disable"] -[connection signal="activated" from="BeastNav/MessHall/SwitchB2" to="BeastNav/Bulkheads/BulkheadB" method="open"] +[connection signal="activated" from="BeastNav/Corridor1/SwitchB1" to="BeastNav/Bulkheads/BulkheadB" method="toggle"] [connection signal="activated" from="BeastNav/MessHall/SwitchB2" to="BeastNav/Corridor1/SwitchB1" method="disable"] [connection signal="activated" from="BeastNav/MessHall/SwitchB2" to="BeastNav/MessHall/SwitchB2" method="disable"] -[connection signal="activated" from="BeastNav/MessHall/SwitchC1" to="BeastNav/Bulkheads/BulkheadC" method="open"] +[connection signal="activated" from="BeastNav/MessHall/SwitchB2" to="BeastNav/Bulkheads/BulkheadB" method="toggle"] [connection signal="activated" from="BeastNav/MessHall/SwitchC1" to="BeastNav/MessHall/SwitchC1" method="disable"] [connection signal="activated" from="BeastNav/MessHall/SwitchC1" to="BeastNav/Corridor2/SwitchC2" method="disable"] -[connection signal="activated" from="BeastNav/Corridor2/SwitchC2" to="BeastNav/Bulkheads/BulkheadC" method="open"] +[connection signal="activated" from="BeastNav/MessHall/SwitchC1" to="BeastNav/Bulkheads/BulkheadC" method="toggle"] [connection signal="activated" from="BeastNav/Corridor2/SwitchC2" to="BeastNav/MessHall/SwitchC1" method="disable"] [connection signal="activated" from="BeastNav/Corridor2/SwitchC2" to="BeastNav/Corridor2/SwitchC2" method="disable"] -[connection signal="activated" from="BeastNav/Corridor2/SwitchD1" to="BeastNav/Bulkheads/BulkheadD" method="open"] +[connection signal="activated" from="BeastNav/Corridor2/SwitchC2" to="BeastNav/Bulkheads/BulkheadC" method="toggle"] [connection signal="activated" from="BeastNav/Corridor2/SwitchD1" to="BeastNav/Corridor2/SwitchD1" method="disable"] [connection signal="activated" from="BeastNav/Corridor2/SwitchD1" to="BeastNav/CrewQuarters/SwitchD2" method="disable"] -[connection signal="activated" from="BeastNav/CrewQuarters/SwitchD2" to="BeastNav/Bulkheads/BulkheadD" method="open"] +[connection signal="activated" from="BeastNav/Corridor2/SwitchD1" to="BeastNav/Bulkheads/BulkheadD" method="toggle"] [connection signal="activated" from="BeastNav/CrewQuarters/SwitchD2" to="BeastNav/Corridor2/SwitchD1" method="disable"] [connection signal="activated" from="BeastNav/CrewQuarters/SwitchD2" to="BeastNav/CrewQuarters/SwitchD2" method="disable"] -[connection signal="activated" from="BeastNav/CrewQuarters/SwitchE1" to="BeastNav/Bulkheads/BulkheadE" method="open"] +[connection signal="activated" from="BeastNav/CrewQuarters/SwitchD2" to="BeastNav/Bulkheads/BulkheadD" method="toggle"] [connection signal="activated" from="BeastNav/CrewQuarters/SwitchE1" to="BeastNav/CrewQuarters/SwitchE1" method="disable"] [connection signal="activated" from="BeastNav/CrewQuarters/SwitchE1" to="BeastNav/Corridor3/SwitchE2" method="disable"] -[connection signal="activated" from="BeastNav/Corridor3/SwitchE2" to="BeastNav/Bulkheads/BulkheadE" method="open"] +[connection signal="activated" from="BeastNav/CrewQuarters/SwitchE1" to="BeastNav/Bulkheads/BulkheadE" method="toggle"] [connection signal="activated" from="BeastNav/Corridor3/SwitchE2" to="BeastNav/CrewQuarters/SwitchE1" method="disable"] [connection signal="activated" from="BeastNav/Corridor3/SwitchE2" to="BeastNav/Corridor3/SwitchE2" method="disable"] -[connection signal="activated" from="BeastNav/Corridor3/RetinalScanner" to="BeastNav/Bulkheads/BulkheadF" method="open"] +[connection signal="activated" from="BeastNav/Corridor3/SwitchE2" to="BeastNav/Bulkheads/BulkheadE" method="toggle"] [connection signal="activated" from="BeastNav/Corridor3/RetinalScanner" to="BeastNav/Corridor3/RetinalScanner" method="disable"] [connection signal="activated" from="BeastNav/Corridor3/RetinalScanner" to="BeastNav/OpsCenter/SwitchF2" method="disable"] -[connection signal="activated" from="BeastNav/Corridor3/SwitchH1" to="BeastNav/Bulkheads/BulkheadH" method="open"] +[connection signal="activated" from="BeastNav/Corridor3/RetinalScanner" to="BeastNav/Bulkheads/BulkheadF" method="open"] [connection signal="activated" from="BeastNav/Corridor3/SwitchH1" to="BeastNav/Corridor3/SwitchH1" method="disable"] [connection signal="activated" from="BeastNav/Corridor3/SwitchH1" to="BeastNav/Medbay/SwitchH2" method="disable"] -[connection signal="activated" from="BeastNav/Medbay/SwitchH2" to="BeastNav/Bulkheads/BulkheadH" method="open"] +[connection signal="activated" from="BeastNav/Corridor3/SwitchH1" to="BeastNav/Bulkheads/BulkheadH" method="toggle"] [connection signal="activated" from="BeastNav/Medbay/SwitchH2" to="BeastNav/Corridor3/SwitchH1" method="disable"] [connection signal="activated" from="BeastNav/Medbay/SwitchH2" to="BeastNav/Medbay/SwitchH2" method="disable"] -[connection signal="activated" from="BeastNav/Medbay/SwitchX" to="BeastNav/Bulkheads/BulkheadX" method="open"] +[connection signal="activated" from="BeastNav/Medbay/SwitchH2" to="BeastNav/Bulkheads/BulkheadH" method="toggle"] [connection signal="activated" from="BeastNav/Medbay/SwitchX" to="BeastNav/Medbay/SwitchX" method="disable"] -[connection signal="activated" from="BeastNav/OpsCenter/SwitchF2" to="BeastNav/Bulkheads/BulkheadF" method="open"] +[connection signal="activated" from="BeastNav/Medbay/SwitchX" to="BeastNav/Bulkheads/BulkheadX" method="open"] [connection signal="activated" from="BeastNav/OpsCenter/SwitchF2" to="BeastNav/Corridor3/RetinalScanner" method="disable"] [connection signal="activated" from="BeastNav/OpsCenter/SwitchF2" to="BeastNav/OpsCenter/SwitchF2" method="disable"] -[connection signal="activated" from="BeastNav/OpsCenter/SwitchY" to="BeastNav/Bulkheads/BulkheadY" method="open"] +[connection signal="activated" from="BeastNav/OpsCenter/SwitchF2" to="BeastNav/Bulkheads/BulkheadF" method="open"] [connection signal="activated" from="BeastNav/OpsCenter/SwitchY" to="BeastNav/OpsCenter/SwitchY" method="disable"] -[connection signal="activated" from="BeastNav/OpsCenter/SwitchG" to="BeastNav/Bulkheads/BulkheadG" method="open"] +[connection signal="activated" from="BeastNav/OpsCenter/SwitchY" to="BeastNav/Bulkheads/BulkheadY" method="open"] [connection signal="activated" from="BeastNav/OpsCenter/SwitchG" to="BeastNav/OpsCenter/SwitchG" method="disable"] +[connection signal="activated" from="BeastNav/OpsCenter/SwitchG" to="BeastNav/Bulkheads/BulkheadG" method="open"] +[connection signal="animation_finished" from="BeastNav/Bulkheads/BulkheadA" to="BeastNav/Airlock/SwitchA1" method="enable"] +[connection signal="animation_finished" from="BeastNav/Bulkheads/BulkheadA" to="BeastNav/Corridor1/SwitchA2" method="enable"] +[connection signal="animation_finished" from="BeastNav/Bulkheads/BulkheadB" to="BeastNav/Corridor1/SwitchB1" method="enable"] +[connection signal="animation_finished" from="BeastNav/Bulkheads/BulkheadB" to="BeastNav/MessHall/SwitchB2" method="enable"] +[connection signal="animation_finished" from="BeastNav/Bulkheads/BulkheadC" to="BeastNav/MessHall/SwitchC1" method="enable"] +[connection signal="animation_finished" from="BeastNav/Bulkheads/BulkheadC" to="BeastNav/Corridor2/SwitchC2" method="enable"] +[connection signal="animation_finished" from="BeastNav/Bulkheads/BulkheadD" to="BeastNav/Corridor2/SwitchD1" method="enable"] +[connection signal="animation_finished" from="BeastNav/Bulkheads/BulkheadD" to="BeastNav/CrewQuarters/SwitchD2" method="enable"] +[connection signal="animation_finished" from="BeastNav/Bulkheads/BulkheadE" to="BeastNav/CrewQuarters/SwitchE1" method="enable"] +[connection signal="animation_finished" from="BeastNav/Bulkheads/BulkheadE" to="BeastNav/Corridor3/SwitchE2" method="enable"] +[connection signal="animation_finished" from="BeastNav/Bulkheads/BulkheadF" to="BeastNav/OpsCenter/SwitchF2" method="enable"] +[connection signal="animation_finished" from="BeastNav/Bulkheads/BulkheadH" to="BeastNav/Corridor3/SwitchH1" method="enable"] +[connection signal="animation_finished" from="BeastNav/Bulkheads/BulkheadH" to="BeastNav/Medbay/SwitchH2" method="enable"] diff --git a/levels/mechanic_test/mechanic_test.tscn b/levels/mechanic_test/mechanic_test.tscn index d987c2b..08af8b8 100644 --- a/levels/mechanic_test/mechanic_test.tscn +++ b/levels/mechanic_test/mechanic_test.tscn @@ -307,9 +307,9 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -13, 0, -2) [connection signal="activated" from="NoduleSpawner/WallSwitch" to="." method="spawn_nodule"] [connection signal="activated" from="AlarmSpawner/WallSwitch" to="." method="spawn_alarm"] [connection signal="activated" from="AlarmTrigger/AlarmTriggerSwitch" to="." method="trigger_spawned_alarm"] -[connection signal="activated" from="Bulkhead/Podium/OpenSwitch" to="Bulkhead" method="open"] [connection signal="activated" from="Bulkhead/Podium/OpenSwitch" to="Bulkhead/Podium/OpenSwitch" method="disable"] [connection signal="activated" from="Bulkhead/Podium/OpenSwitch" to="Bulkhead/Podium2/CloseSwitch" method="enable"] -[connection signal="activated" from="Bulkhead/Podium2/CloseSwitch" to="Bulkhead" method="close"] +[connection signal="activated" from="Bulkhead/Podium/OpenSwitch" to="Bulkhead" method="open"] [connection signal="activated" from="Bulkhead/Podium2/CloseSwitch" to="Bulkhead/Podium/OpenSwitch" method="enable"] [connection signal="activated" from="Bulkhead/Podium2/CloseSwitch" to="Bulkhead/Podium2/CloseSwitch" method="disable"] +[connection signal="activated" from="Bulkhead/Podium2/CloseSwitch" to="Bulkhead" method="close"] diff --git a/levels/prop_test/prop_test.tscn b/levels/prop_test/prop_test.tscn index 3b06a07..a6361de 100644 --- a/levels/prop_test/prop_test.tscn +++ b/levels/prop_test/prop_test.tscn @@ -156,6 +156,7 @@ unique_name_in_owner = true [node name="Bulkhead" parent="Props" instance=ExtResource("4_g7cgy")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9, 0, -9) +close_2_probability = 0.25 [node name="SwitchPodium" type="StaticBody3D" parent="Props"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7, 1, -9) @@ -406,7 +407,8 @@ visible = false [node name="Player" parent="." instance=ExtResource("1_ml0ka")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) -[connection signal="activated" from="Props/SwitchPodium/OpenSwitch" to="Props/Bulkhead" method="open"] +[connection signal="animation_finished" from="Props/Bulkhead" to="Props/SwitchPodium/OpenSwitch" method="enable"] +[connection signal="activated" from="Props/SwitchPodium/OpenSwitch" to="Props/Bulkhead" method="toggle"] [connection signal="activated" from="Props/SwitchPodium/OpenSwitch" to="Props/SwitchPodium/OpenSwitch" method="disable"] [connection signal="activated" from="Props/VendingMachine/Interactive" to="." method="toggle_vending_machine"] [connection signal="activated" from="CleanPodium/ButtonMesh/Interactive" to="." method="clean_all_props"] diff --git a/src/props/bulkhead/bulkhead.gd b/src/props/bulkhead/bulkhead.gd index 3b7fbb6..eaa3964 100644 --- a/src/props/bulkhead/bulkhead.gd +++ b/src/props/bulkhead/bulkhead.gd @@ -1,6 +1,9 @@ extends Node3D +signal animation_finished + @export var start_open := false +@export var close_2_probability := 0.03 @export_category("Editor Tools") @export var debug_open: bool: @@ -35,8 +38,8 @@ func _instant_open() -> void: func _instant_close() -> void: nav_link.enabled = false - animation.play("open") - animation.advance(0) + animation.play("close") + animation.advance(100) animation.stop() @@ -53,14 +56,25 @@ func open() -> void: func close() -> void: - # TODO bespoke close anim? - animation.play_backwards("open") + var close_anim := "close" if randf() > close_2_probability else "close2" + animation.play(close_anim) nav_link.enabled = false +func toggle() -> void: + if is_open(): + close() + else: + open() + + func serialize() -> Dictionary: return {"open": is_open()} func deserialize(state: Dictionary) -> void: start_open = state["open"] + + +func _on_animation_player_animation_finished(_anim_name: StringName) -> void: + animation_finished.emit() diff --git a/src/props/bulkhead/bulkhead.tscn b/src/props/bulkhead/bulkhead.tscn index ac0a68e..c213106 100644 --- a/src/props/bulkhead/bulkhead.tscn +++ b/src/props/bulkhead/bulkhead.tscn @@ -372,3 +372,5 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.45, 0) enabled = false start_position = Vector3(0, 0, -1.5) end_position = Vector3(0, 0, 1.5) + +[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_player_animation_finished"] diff --git a/src/ui/hud/player_hud.tscn b/src/ui/hud/player_hud.tscn index 2763593..4bbb649 100644 --- a/src/ui/hud/player_hud.tscn +++ b/src/ui/hud/player_hud.tscn @@ -372,10 +372,10 @@ anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -offset_left = -19.9658 -offset_top = -20.8966 -offset_right = -19.9658 -offset_bottom = -20.8966 +offset_left = -24.9841 +offset_top = -20.2654 +offset_right = -24.9841 +offset_bottom = -20.2654 grow_horizontal = 2 grow_vertical = 2 script = ExtResource("4_ud8na") diff --git a/src/world/world.tscn b/src/world/world.tscn index a30f187..a293b1d 100644 --- a/src/world/world.tscn +++ b/src/world/world.tscn @@ -4,7 +4,7 @@ [ext_resource type="Resource" uid="uid://tgac5tnfx56r" path="res://src/world/world_manager.tres" id="2_5kmgb"] [ext_resource type="PackedScene" uid="uid://byvjsvavbg5xe" path="res://src/ui/menus/pause_menu/pause_menu.tscn" id="2_6fy3g"] [ext_resource type="Resource" uid="uid://0i72bf8ip1lx" path="res://src/world/spook_manager.tres" id="3_l0av5"] -[ext_resource type="PackedScene" uid="uid://bov4ok76woyc" path="res://levels/ghost_ship/ghost_ship.tscn" id="4_5kmgb"] +[ext_resource type="PackedScene" uid="uid://dc4tts6342cuj" path="res://levels/prop_test/prop_test.tscn" id="4_5kmgb"] [ext_resource type="PackedScene" uid="uid://c0uitm5cg88h1" path="res://src/ui/menus/kill_screen/kill_screen.tscn" id="6_l0av5"] [ext_resource type="PackedScene" uid="uid://brknr57xc2cp0" path="res://src/ui/elements/save_icon/save_icon.tscn" id="7_5kmgb"]