Added items

This commit is contained in:
Rob Kelly 2025-03-21 12:07:05 -06:00
parent 654a6118e2
commit 0326667bc0
23 changed files with 376 additions and 7 deletions

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=297 format=4 uid="uid://crydi5cjgfwe5"] [gd_scene load_steps=303 format=4 uid="uid://crydi5cjgfwe5"]
[ext_resource type="PackedScene" uid="uid://oowut88kr2ox" path="res://levels/ghost_ship/player_ship/player_ship.tscn" id="1_2pyr1"] [ext_resource type="PackedScene" uid="uid://oowut88kr2ox" path="res://levels/ghost_ship/player_ship/player_ship.tscn" id="1_2pyr1"]
[ext_resource type="PackedScene" uid="uid://c2omlx4ptrc01" path="res://src/world/gunk_body/gunk_body.tscn" id="2_2egij"] [ext_resource type="PackedScene" uid="uid://c2omlx4ptrc01" path="res://src/world/gunk_body/gunk_body.tscn" id="2_2egij"]
@ -42,6 +42,9 @@
[ext_resource type="Texture2D" uid="uid://bmwmajwul60ti" path="res://assets/level/ceiling/ceiling_1_N.png" id="38_f0xh4"] [ext_resource type="Texture2D" uid="uid://bmwmajwul60ti" path="res://assets/level/ceiling/ceiling_1_N.png" id="38_f0xh4"]
[ext_resource type="PackedScene" uid="uid://d2feet02a603e" path="res://src/props/overhead_light/overhead_light.tscn" id="39_kp5n7"] [ext_resource type="PackedScene" uid="uid://d2feet02a603e" path="res://src/props/overhead_light/overhead_light.tscn" id="39_kp5n7"]
[ext_resource type="Texture2D" uid="uid://8hav47a84uk" path="res://assets/level/ceiling/ceiling_1_R.png" id="39_nmnkj"] [ext_resource type="Texture2D" uid="uid://8hav47a84uk" path="res://assets/level/ceiling/ceiling_1_R.png" id="39_nmnkj"]
[ext_resource type="PackedScene" uid="uid://ctr56p23cvupu" path="res://src/props/retinal_scanner/retinal_scanner.tscn" id="41_u2hqf"]
[ext_resource type="PackedScene" uid="uid://bn8fdu4houoo2" path="res://src/world/world_item/world_item.tscn" id="43_f0xh4"]
[ext_resource type="Resource" uid="uid://c6ynovu3h6twl" path="res://levels/ghost_ship/item_data/eyeballs.tres" id="44_nmnkj"]
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_rp2qp"] [sub_resource type="CompressedTexture2D" id="CompressedTexture2D_rp2qp"]
load_path = "res://.godot/imported/debug_mask.png-fd2bc783338ed9439fe81a4eef9d86da.s3tc.ctex" load_path = "res://.godot/imported/debug_mask.png-fd2bc783338ed9439fe81a4eef9d86da.s3tc.ctex"
@ -3868,6 +3871,63 @@ _surfaces = [{
blend_shape_mode = 0 blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_u2hqf") shadow_mesh = SubResource("ArrayMesh_u2hqf")
[sub_resource type="ArrayMesh" id="ArrayMesh_lfacn"]
resource_local_to_scene = true
_surfaces = [{
"aabb": AABB(-0.375, -0.25, -0.75, 0.75, 0.5, 1.5),
"attribute_data": PackedByteArray("/7//P/9v/7//X/8//7//vwAA/78AAP8//6f/v/9H/7//p/+//7//v/+f//f/v////6cAAP/H/wf/n/83/7//P/+X/7//l/8//zf/P/8P/7//x//H/5//x/+/AAD/n/8H/6f/P//H/zf/X/+//0f/P/9v/z//p/8//6f////H//f/D/8//5f/v/+X/z//p/+//6f/P/83/7//R/+//0f/P/9v/z//b/+//1//P/9f/7//N/+//w//v/83/z//D/8/"),
"format": 34896613399,
"index_count": 84,
"index_data": PackedByteArray("FgANAAwADAANABcAFwANAA4ADgANABgAGAANAA8ADwANABkAGgAHAAIAAgAHABsAEAABABEAEQABABwAHQAAAAYABgAAAAMACQAUAAgACAAUABUAFQAUAAoACgAUAB4AHgAUAAsACwAUAB8AIAATAAUABQATAAQAIQAiACMAIwAiACQAJQASACYAJgASACcAKAApACoAKgApACsALAAtAC4ALgAtAC8A"),
"lods": [0.108952, PackedByteArray("DAANAA4ADgANAA8AEAABABEAEAARAAYAEQAAAAYABgAAAAMAEQABAAIAAgABAAcABwASAAIABwATABIAEgATAAUABQATAAQACQAUAAgACAAUABUAFQAUAAoACgAUAAsA"), 0.261829, PackedByteArray("AAABAAIAAQAAAAYABgAAAAMAAgABAAcABwAEAAIAAgAEAAUACAAJAAoACgAJAAsA"), 0.524037, PackedByteArray("AAABAAIAAQAAAAMAAgABAAQAAgAEAAUA")],
"material": SubResource("StandardMaterial3D_1h5r5"),
"name": "Cube",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 48,
"vertex_data": PackedByteArray("AAAyM///VNXc3f//AAD/////zMz//1TVAAAyMwAAVNUAADIzAAD8xQAAMjP///zFAADMzAAAVNX//zIzAABU1QAAzMwAAP//AAAyMwAA///c3f//AAD/////MjMAAP/////MzP///7/c3QAA///svyEi/////0TBAAAyM///Fr8hIv//AAD//yEi////////3N0AAP///MUhIgAAAAD8xSEiAAAAAP//ISL//wAA/////zIz////v9zd//////+/AADMzP//DMEhIgAA//+cvP//zMwAAFTV//8yM///VNXc3f///////wAAzMz//1TV///MzAAA///c3QAAAAD//yEiAAD///zFISL//wAAqukhIv////+q6QAAzMwAAKrpAADMzP//qunc3QAAAAD8xf//MjMAAPzF//8yM////MXc3f////+q6dzd//8AAKrp///MzP//qun//8zMAACq6dzdAAAAAP+/ISIAAAAA/7/c3QAA////vyEiAAD///+/VFWqqv9//7+qKqoqVFWqqv45/pz+Of6cVFWqqqoqqir/P/+//z//v/7A/0C2QLbA/3//f/9//3//f/9//3//f/9//7//f/+//xwBRv45/pwOQA3A/z//v/9//3//f/9//3//f/9//3+qKqoqqiqqKv9//79UVaqq0sDSQKlCqML+Of6cCWoEtQlqBLUJagS1CWoEtf8cAUb/HAFG/xwBRgQ19hUENfYVBDX2FQQ19hUAAP9/AAD/fwAA/38AAP9/")
}]
blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_u2hqf")
[sub_resource type="ArrayMesh" id="ArrayMesh_wvfch"]
resource_local_to_scene = true
_surfaces = [{
"aabb": AABB(-0.375, -0.25, -0.75, 0.75, 0.5, 1.5),
"attribute_data": PackedByteArray("/7//P/9v/7//X/8//7//vwAA/78AAP8//6f/v/9H/7//p/+//7//v/+f//f/v////6cAAP/H/wf/n/83/7//P/+X/7//l/8//zf/P/8P/7//x//H/5//x/+/AAD/n/8H/6f/P//H/zf/X/+//0f/P/9v/z//p/8//6f////H//f/D/8//5f/v/+X/z//p/+//6f/P/83/7//R/+//0f/P/9v/z//b/+//1//P/9f/7//N/+//w//v/83/z//D/8/"),
"format": 34896613399,
"index_count": 84,
"index_data": PackedByteArray("FgANAAwADAANABcAFwANAA4ADgANABgAGAANAA8ADwANABkAGgAHAAIAAgAHABsAEAABABEAEQABABwAHQAAAAYABgAAAAMACQAUAAgACAAUABUAFQAUAAoACgAUAB4AHgAUAAsACwAUAB8AIAATAAUABQATAAQAIQAiACMAIwAiACQAJQASACYAJgASACcAKAApACoAKgApACsALAAtAC4ALgAtAC8A"),
"lods": [0.108952, PackedByteArray("DAANAA4ADgANAA8AEAABABEAEAARAAYAEQAAAAYABgAAAAMAEQABAAIAAgABAAcABwASAAIABwATABIAEgATAAUABQATAAQACQAUAAgACAAUABUAFQAUAAoACgAUAAsA"), 0.261829, PackedByteArray("AAABAAIAAQAAAAYABgAAAAMAAgABAAcABwAEAAIAAgAEAAUACAAJAAoACgAJAAsA"), 0.524037, PackedByteArray("AAABAAIAAQAAAAMAAgABAAQAAgAEAAUA")],
"material": SubResource("StandardMaterial3D_1h5r5"),
"name": "Cube",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 48,
"vertex_data": PackedByteArray("AAAyM///VNXc3f//AAD/////zMz//1TVAAAyMwAAVNUAADIzAAD8xQAAMjP///zFAADMzAAAVNX//zIzAABU1QAAzMwAAP//AAAyMwAA///c3f//AAD/////MjMAAP/////MzP///7/c3QAA///svyEi/////0TBAAAyM///Fr8hIv//AAD//yEi////////3N0AAP///MUhIgAAAAD8xSEiAAAAAP//ISL//wAA/////zIz////v9zd//////+/AADMzP//DMEhIgAA//+cvP//zMwAAFTV//8yM///VNXc3f///////wAAzMz//1TV///MzAAA///c3QAAAAD//yEiAAD///zFISL//wAAqukhIv////+q6QAAzMwAAKrpAADMzP//qunc3QAAAAD8xf//MjMAAPzF//8yM////MXc3f////+q6dzd//8AAKrp///MzP//qun//8zMAACq6dzdAAAAAP+/ISIAAAAA/7/c3QAA////vyEiAAD///+/VFWqqv9//7+qKqoqVFWqqv45/pz+Of6cVFWqqqoqqir/P/+//z//v/7A/0C2QLbA/3//f/9//3//f/9//3//f/9//7//f/+//xwBRv45/pwOQA3A/z//v/9//3//f/9//3//f/9//3+qKqoqqiqqKv9//79UVaqq0sDSQKlCqML+Of6cCWoEtQlqBLUJagS1CWoEtf8cAUb/HAFG/xwBRgQ19hUENfYVBDX2FQQ19hUAAP9/AAD/fwAA/38AAP9/")
}]
blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_u2hqf")
[sub_resource type="ArrayMesh" id="ArrayMesh_2agve"]
resource_local_to_scene = true
_surfaces = [{
"aabb": AABB(-0.375, -0.25, -0.75, 0.75, 0.5, 1.5),
"attribute_data": PackedByteArray("/7//P/9v/7//X/8//7//vwAA/78AAP8//6f/v/9H/7//p/+//7//v/+f//f/v////6cAAP/H/wf/n/83/7//P/+X/7//l/8//zf/P/8P/7//x//H/5//x/+/AAD/n/8H/6f/P//H/zf/X/+//0f/P/9v/z//p/8//6f////H//f/D/8//5f/v/+X/z//p/+//6f/P/83/7//R/+//0f/P/9v/z//b/+//1//P/9f/7//N/+//w//v/83/z//D/8/"),
"format": 34896613399,
"index_count": 84,
"index_data": PackedByteArray("FgANAAwADAANABcAFwANAA4ADgANABgAGAANAA8ADwANABkAGgAHAAIAAgAHABsAEAABABEAEQABABwAHQAAAAYABgAAAAMACQAUAAgACAAUABUAFQAUAAoACgAUAB4AHgAUAAsACwAUAB8AIAATAAUABQATAAQAIQAiACMAIwAiACQAJQASACYAJgASACcAKAApACoAKgApACsALAAtAC4ALgAtAC8A"),
"lods": [0.108952, PackedByteArray("DAANAA4ADgANAA8AEAABABEAEAARAAYAEQAAAAYABgAAAAMAEQABAAIAAgABAAcABwASAAIABwATABIAEgATAAUABQATAAQACQAUAAgACAAUABUAFQAUAAoACgAUAAsA"), 0.261829, PackedByteArray("AAABAAIAAQAAAAYABgAAAAMAAgABAAcABwAEAAIAAgAEAAUACAAJAAoACgAJAAsA"), 0.524037, PackedByteArray("AAABAAIAAQAAAAMAAgABAAQAAgAEAAUA")],
"material": SubResource("StandardMaterial3D_1h5r5"),
"name": "Cube",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 48,
"vertex_data": PackedByteArray("AAAyM///VNXc3f//AAD/////zMz//1TVAAAyMwAAVNUAADIzAAD8xQAAMjP///zFAADMzAAAVNX//zIzAABU1QAAzMwAAP//AAAyMwAA///c3f//AAD/////MjMAAP/////MzP///7/c3QAA///svyEi/////0TBAAAyM///Fr8hIv//AAD//yEi////////3N0AAP///MUhIgAAAAD8xSEiAAAAAP//ISL//wAA/////zIz////v9zd//////+/AADMzP//DMEhIgAA//+cvP//zMwAAFTV//8yM///VNXc3f///////wAAzMz//1TV///MzAAA///c3QAAAAD//yEiAAD///zFISL//wAAqukhIv////+q6QAAzMwAAKrpAADMzP//qunc3QAAAAD8xf//MjMAAPzF//8yM////MXc3f////+q6dzd//8AAKrp///MzP//qun//8zMAACq6dzdAAAAAP+/ISIAAAAA/7/c3QAA////vyEiAAD///+/VFWqqv9//7+qKqoqVFWqqv45/pz+Of6cVFWqqqoqqir/P/+//z//v/7A/0C2QLbA/3//f/9//3//f/9//3//f/9//7//f/+//xwBRv45/pwOQA3A/z//v/9//3//f/9//3//f/9//3+qKqoqqiqqKv9//79UVaqq0sDSQKlCqML+Of6cCWoEtQlqBLUJagS1CWoEtf8cAUb/HAFG/xwBRgQ19hUENfYVBDX2FQQ19hUAAP9/AAD/fwAA/38AAP9/")
}]
blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_u2hqf")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_45wwf"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_45wwf"]
resource_local_to_scene = true resource_local_to_scene = true
render_priority = 0 render_priority = 0
@ -5860,6 +5920,9 @@ process_material = SubResource("ParticleProcessMaterial_6giaa")
[node name="BurnoutLight" parent="Corridor3/Hallway2" instance=ExtResource("29_lfacn")] [node name="BurnoutLight" parent="Corridor3/Hallway2" instance=ExtResource("29_lfacn")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.31134e-07, 3, -1.5) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.31134e-07, 3, -1.5)
[node name="RetinalScanner" parent="Corridor3/Hallway2" instance=ExtResource("41_u2hqf")]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -1.4, 1.5, 4.5)
[node name="T-Junction1" type="MeshInstance3D" parent="Corridor3"] [node name="T-Junction1" type="MeshInstance3D" parent="Corridor3"]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 12, 0, 0) transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 12, 0, 0)
mesh = ExtResource("28_ji5cn") mesh = ExtResource("28_ji5cn")
@ -6643,15 +6706,15 @@ mesh = SubResource("ArrayMesh_2qkxu")
[node name="CrateLong4" parent="Medbay/Props" instance=ExtResource("26_otfxe")] [node name="CrateLong4" parent="Medbay/Props" instance=ExtResource("26_otfxe")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4, 0.25, -3.6) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4, 0.25, -3.6)
mesh = SubResource("ArrayMesh_2qkxu") mesh = SubResource("ArrayMesh_lfacn")
[node name="CrateLong2" parent="Medbay/Props" instance=ExtResource("26_otfxe")] [node name="CrateLong2" parent="Medbay/Props" instance=ExtResource("26_otfxe")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.9, 0.75, 0.299999) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.9, 0.75, 0.299999)
mesh = SubResource("ArrayMesh_2qkxu") mesh = SubResource("ArrayMesh_wvfch")
[node name="CrateLong3" parent="Medbay/Props" instance=ExtResource("26_otfxe")] [node name="CrateLong3" parent="Medbay/Props" instance=ExtResource("26_otfxe")]
transform = Transform3D(1, 0, 0, 0, 0.707107, 0.707107, 0, -0.707107, 0.707107, 3.9, 0.75, -1.04972) transform = Transform3D(1, 0, 0, 0, 0.707107, 0.707107, 0, -0.707107, 0.707107, 3.9, 0.75, -1.04972)
mesh = SubResource("ArrayMesh_2qkxu") mesh = SubResource("ArrayMesh_2agve")
[node name="FloatingDust" parent="Medbay" instance=ExtResource("25_6giaa")] [node name="FloatingDust" parent="Medbay" instance=ExtResource("25_6giaa")]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 1.5, -4.5) transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 1.5, -4.5)
@ -6687,6 +6750,17 @@ radius = 2.2
height = 0.6 height = 0.6
sides = 16 sides = 16
[node name="WorldItem" parent="Medbay" instance=ExtResource("43_f0xh4")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.2, 0)
item = ExtResource("44_nmnkj")
[node name="Label3D" type="Label3D" parent="Medbay/WorldItem"]
pixel_size = 0.001
billboard = 2
text = "[Eyeballs]"
font_size = 72
outline_size = 24
[node name="BulkheadX" parent="." instance=ExtResource("35_f0xh4")] [node name="BulkheadX" parent="." instance=ExtResource("35_f0xh4")]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -22.5, 0, -51) transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -22.5, 0, -51)
@ -6991,6 +7065,9 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, -12, -60)
[connection signal="activated" from="Corridor3/Hallway/SwitchE2" to="CrewQuarters/CommonArea/SwitchE1" method="disable"] [connection signal="activated" from="Corridor3/Hallway/SwitchE2" to="CrewQuarters/CommonArea/SwitchE1" method="disable"]
[connection signal="activated" from="Corridor3/Hallway/SwitchE2" to="BulkheadE" method="open"] [connection signal="activated" from="Corridor3/Hallway/SwitchE2" to="BulkheadE" method="open"]
[connection signal="activated" from="Corridor3/Hallway/SwitchE2" to="Corridor3/Hallway/SwitchE2" method="disable"] [connection signal="activated" from="Corridor3/Hallway/SwitchE2" to="Corridor3/Hallway/SwitchE2" method="disable"]
[connection signal="activated" from="Corridor3/Hallway2/RetinalScanner" to="BulkheadF" method="open"]
[connection signal="activated" from="Corridor3/Hallway2/RetinalScanner" to="Corridor3/Hallway2/RetinalScanner" method="disable"]
[connection signal="activated" from="Corridor3/Hallway2/RetinalScanner" to="OpsCenter/SwitchF2" method="disable"]
[connection signal="activated" from="Corridor3/ShortHallway3/SwitchH1" to="Corridor3/ShortHallway3/SwitchH1" method="disable"] [connection signal="activated" from="Corridor3/ShortHallway3/SwitchH1" to="Corridor3/ShortHallway3/SwitchH1" method="disable"]
[connection signal="activated" from="Corridor3/ShortHallway3/SwitchH1" to="BulkheadH" method="open"] [connection signal="activated" from="Corridor3/ShortHallway3/SwitchH1" to="BulkheadH" method="open"]
[connection signal="activated" from="Corridor3/ShortHallway3/SwitchH1" to="Medbay/SwitchH2" method="disable"] [connection signal="activated" from="Corridor3/ShortHallway3/SwitchH1" to="Medbay/SwitchH2" method="disable"]
@ -7000,4 +7077,5 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, -12, -60)
[connection signal="activated" from="Medbay/SwitchX" to="Medbay/SwitchX" method="disable"] [connection signal="activated" from="Medbay/SwitchX" to="Medbay/SwitchX" method="disable"]
[connection signal="activated" from="Medbay/SwitchX" to="BulkheadX" method="open"] [connection signal="activated" from="Medbay/SwitchX" to="BulkheadX" method="open"]
[connection signal="activated" from="OpsCenter/SwitchF2" to="BulkheadF" method="open"] [connection signal="activated" from="OpsCenter/SwitchF2" to="BulkheadF" method="open"]
[connection signal="activated" from="OpsCenter/SwitchF2" to="Corridor3/Hallway2/RetinalScanner" method="disable"]
[connection signal="activated" from="OpsCenter/SwitchF2" to="OpsCenter/SwitchF2" method="disable"] [connection signal="activated" from="OpsCenter/SwitchF2" to="OpsCenter/SwitchF2" method="disable"]

View File

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Item" load_steps=2 format=3 uid="uid://c6ynovu3h6twl"]
[ext_resource type="Script" uid="uid://btwfewn35d0hm" path="res://src/items/item.gd" id="1_iey6h"]
[resource]
script = ExtResource("1_iey6h")
name = "Eyeballs"
description = "A pair of eyeballs, formerly belonging to the shift supervisor. Could be used with a retinal scanner."
metadata/_custom_type_script = "uid://btwfewn35d0hm"

View File

@ -0,0 +1,5 @@
extends Node3D
func _on_retinal_scanner_activated() -> void:
print_debug("Retinal scanner activated!!")

View File

@ -0,0 +1 @@
uid://bhx3bug3prp50

View File

@ -0,0 +1,58 @@
[gd_scene load_steps=9 format=3 uid="uid://dbabcsp38wmid"]
[ext_resource type="Script" uid="uid://bhx3bug3prp50" path="res://levels/mechanic_test/item_test.gd" id="1_fcmux"]
[ext_resource type="PackedScene" uid="uid://bn8fdu4houoo2" path="res://src/world/world_item/world_item.tscn" id="1_l8xgj"]
[ext_resource type="Resource" uid="uid://c6ynovu3h6twl" path="res://levels/ghost_ship/item_data/eyeballs.tres" id="2_fcmux"]
[ext_resource type="PackedScene" uid="uid://ctr56p23cvupu" path="res://src/props/retinal_scanner/retinal_scanner.tscn" id="3_8dd7v"]
[sub_resource type="CylinderMesh" id="CylinderMesh_f342o"]
height = 1.0
radial_segments = 8
rings = 0
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_cgmn0"]
data = PackedVector3Array(0, 0.5, 0.5, 0.3536, 0.5, 0.3536, 0, -0.5, 0.5, 0.3536, 0.5, 0.3536, 0.3536, -0.5, 0.3536, 0, -0.5, 0.5, 0.3536, 0.5, 0.3536, 0.5, 0.5, 0, 0.3536, -0.5, 0.3536, 0.5, 0.5, 0, 0.5, -0.5, 0, 0.3536, -0.5, 0.3536, 0.5, 0.5, 0, 0.3536, 0.5, -0.3536, 0.5, -0.5, 0, 0.3536, 0.5, -0.3536, 0.3536, -0.5, -0.3536, 0.5, -0.5, 0, 0.3536, 0.5, -0.3536, 0, 0.5, -0.5, 0.3536, -0.5, -0.3536, 0, 0.5, -0.5, 0, -0.5, -0.5, 0.3536, -0.5, -0.3536, 0, 0.5, -0.5, -0.3536, 0.5, -0.3536, 0, -0.5, -0.5, -0.3536, 0.5, -0.3536, -0.3536, -0.5, -0.3536, 0, -0.5, -0.5, -0.3536, 0.5, -0.3536, -0.5, 0.5, 0, -0.3536, -0.5, -0.3536, -0.5, 0.5, 0, -0.5, -0.5, 0, -0.3536, -0.5, -0.3536, -0.5, 0.5, 0, -0.3536, 0.5, 0.3536, -0.5, -0.5, 0, -0.3536, 0.5, 0.3536, -0.3536, -0.5, 0.3536, -0.5, -0.5, 0, -0.3536, 0.5, 0.3536, 0, 0.5, 0.5, -0.3536, -0.5, 0.3536, 0, 0.5, 0.5, 0, -0.5, 0.5, -0.3536, -0.5, 0.3536, 0, 0.5, 0, 0.3536, 0.5, 0.3536, 0, 0.5, 0.5, 0, 0.5, 0, 0.5, 0.5, 0, 0.3536, 0.5, 0.3536, 0, 0.5, 0, 0.3536, 0.5, -0.3536, 0.5, 0.5, 0, 0, 0.5, 0, 0, 0.5, -0.5, 0.3536, 0.5, -0.3536, 0, 0.5, 0, -0.3536, 0.5, -0.3536, 0, 0.5, -0.5, 0, 0.5, 0, -0.5, 0.5, 0, -0.3536, 0.5, -0.3536, 0, 0.5, 0, -0.3536, 0.5, 0.3536, -0.5, 0.5, 0, 0, 0.5, 0, 0, 0.5, 0.5, -0.3536, 0.5, 0.3536, 0, -0.5, 0, 0, -0.5, 0.5, 0.3536, -0.5, 0.3536, 0, -0.5, 0, 0.3536, -0.5, 0.3536, 0.5, -0.5, 0, 0, -0.5, 0, 0.5, -0.5, 0, 0.3536, -0.5, -0.3536, 0, -0.5, 0, 0.3536, -0.5, -0.3536, 0, -0.5, -0.5, 0, -0.5, 0, 0, -0.5, -0.5, -0.3536, -0.5, -0.3536, 0, -0.5, 0, -0.3536, -0.5, -0.3536, -0.5, -0.5, 0, 0, -0.5, 0, -0.5, -0.5, 0, -0.3536, -0.5, 0.3536, 0, -0.5, 0, -0.3536, -0.5, 0.3536, 0, -0.5, 0.5)
[sub_resource type="BoxMesh" id="BoxMesh_goufh"]
size = Vector3(0.5, 2, 0.5)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_bg05n"]
data = PackedVector3Array(-0.25, 1, 0.25, 0.25, 1, 0.25, -0.25, -1, 0.25, 0.25, 1, 0.25, 0.25, -1, 0.25, -0.25, -1, 0.25, 0.25, 1, -0.25, -0.25, 1, -0.25, 0.25, -1, -0.25, -0.25, 1, -0.25, -0.25, -1, -0.25, 0.25, -1, -0.25, 0.25, 1, 0.25, 0.25, 1, -0.25, 0.25, -1, 0.25, 0.25, 1, -0.25, 0.25, -1, -0.25, 0.25, -1, 0.25, -0.25, 1, -0.25, -0.25, 1, 0.25, -0.25, -1, -0.25, -0.25, 1, 0.25, -0.25, -1, 0.25, -0.25, -1, -0.25, 0.25, 1, 0.25, -0.25, 1, 0.25, 0.25, 1, -0.25, -0.25, 1, 0.25, -0.25, 1, -0.25, 0.25, 1, -0.25, -0.25, -1, 0.25, 0.25, -1, 0.25, -0.25, -1, -0.25, 0.25, -1, 0.25, 0.25, -1, -0.25, -0.25, -1, -0.25)
[node name="ItemTest" type="Node3D"]
script = ExtResource("1_fcmux")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
mesh = SubResource("CylinderMesh_f342o")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cgmn0")
[node name="WorldItem" parent="MeshInstance3D" instance=ExtResource("1_l8xgj")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55, 0)
item = ExtResource("2_fcmux")
[node name="Label3D" type="Label3D" parent="MeshInstance3D/WorldItem"]
pixel_size = 0.001
billboard = 2
text = "[Eyeballs]"
font_size = 72
outline_size = 24
[node name="ScannerPodium" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.5, 1, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="ScannerPodium"]
mesh = SubResource("BoxMesh_goufh")
[node name="CollisionShape3D" type="CollisionShape3D" parent="ScannerPodium"]
shape = SubResource("ConcavePolygonShape3D_bg05n")
[node name="RetinalScanner" parent="ScannerPodium" instance=ExtResource("3_8dd7v")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0.35)
[connection signal="activated" from="ScannerPodium/RetinalScanner" to="." method="_on_retinal_scanner_activated"]

View File

@ -11,11 +11,13 @@ extends Node3D
@onready var alarm_spawn_point: Marker3D = %AlarmSpawnPoint @onready var alarm_spawn_point: Marker3D = %AlarmSpawnPoint
@onready var signal_test_spawn_point: Marker3D = %SignalTestSpawnPoint @onready var signal_test_spawn_point: Marker3D = %SignalTestSpawnPoint
@onready var prop_test_spawn_point: Marker3D = %PropTestSpawnPoint @onready var prop_test_spawn_point: Marker3D = %PropTestSpawnPoint
@onready var item_test_spawn_point: Marker3D = %ItemTestSpawnPoint
static var nodule_scene: PackedScene = load("res://src/world/gunk_node/grunk_nodule.tscn") static var nodule_scene: PackedScene = load("res://src/world/gunk_node/grunk_nodule.tscn")
static var alarm_scene: PackedScene = load("res://src/world/mechanics/alarm/gunk_alarm.tscn") static var alarm_scene: PackedScene = load("res://src/world/mechanics/alarm/gunk_alarm.tscn")
static var signal_test_scene: PackedScene = load("res://levels/mechanic_test/signal_test.tscn") static var signal_test_scene: PackedScene = load("res://levels/mechanic_test/signal_test.tscn")
static var prop_test_scene: PackedScene = load("res://levels/mechanic_test/prop_test.tscn") static var prop_test_scene: PackedScene = load("res://levels/mechanic_test/prop_test.tscn")
static var item_test_scene: PackedScene = load("res://levels/mechanic_test/item_test.tscn")
func reset() -> void: func reset() -> void:
@ -26,6 +28,7 @@ func reset() -> void:
Callable(close_switch, "disable").call() Callable(close_switch, "disable").call()
_do_spawn(signal_test_spawn_point, signal_test_scene) _do_spawn(signal_test_spawn_point, signal_test_scene)
_do_spawn(prop_test_spawn_point, prop_test_scene) _do_spawn(prop_test_spawn_point, prop_test_scene)
_do_spawn(item_test_spawn_point, item_test_scene)
func _do_spawn(spawn_point: Node3D, scene: PackedScene) -> void: func _do_spawn(spawn_point: Node3D, scene: PackedScene) -> void:

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=30 format=4 uid="uid://b8rv6dg4tgaeb"] [gd_scene load_steps=31 format=4 uid="uid://b8rv6dg4tgaeb"]
[ext_resource type="Script" uid="uid://bvua1l2hb3an6" path="res://levels/mechanic_test/mechanic_test.gd" id="1_bg05n"] [ext_resource type="Script" uid="uid://bvua1l2hb3an6" path="res://levels/mechanic_test/mechanic_test.gd" id="1_bg05n"]
[ext_resource type="PackedScene" uid="uid://bwe2jdmvinhqd" path="res://src/player/player.tscn" id="1_goufh"] [ext_resource type="PackedScene" uid="uid://bwe2jdmvinhqd" path="res://src/player/player.tscn" id="1_goufh"]
@ -10,6 +10,7 @@
[ext_resource type="PackedScene" uid="uid://cubwniraol1qn" path="res://src/props/bulkhead/bulkhead.tscn" id="8_f342o"] [ext_resource type="PackedScene" uid="uid://cubwniraol1qn" path="res://src/props/bulkhead/bulkhead.tscn" id="8_f342o"]
[ext_resource type="PackedScene" uid="uid://b5jubpjj3d277" path="res://levels/mechanic_test/signal_test.tscn" id="9_x2vho"] [ext_resource type="PackedScene" uid="uid://b5jubpjj3d277" path="res://levels/mechanic_test/signal_test.tscn" id="9_x2vho"]
[ext_resource type="PackedScene" uid="uid://cfqirm2o3uo4k" path="res://levels/mechanic_test/prop_test.tscn" id="10_f342o"] [ext_resource type="PackedScene" uid="uid://cfqirm2o3uo4k" path="res://levels/mechanic_test/prop_test.tscn" id="10_f342o"]
[ext_resource type="PackedScene" uid="uid://dbabcsp38wmid" path="res://levels/mechanic_test/item_test.tscn" id="11_iyuyb"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_goufh"] [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_goufh"]
@ -292,6 +293,12 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.5, 0, 4.5)
[node name="PropTest" parent="PropTestSpawnPoint" instance=ExtResource("10_f342o")] [node name="PropTest" parent="PropTestSpawnPoint" instance=ExtResource("10_f342o")]
[node name="ItemTestSpawnPoint" type="Marker3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -13, 0, -2)
[node name="ItemTest" parent="ItemTestSpawnPoint" instance=ExtResource("11_iyuyb")]
[connection signal="activated" from="ResetPodium/ResetSwitch" to="." method="reset"] [connection signal="activated" from="ResetPodium/ResetSwitch" to="." method="reset"]
[connection signal="activated" from="NoduleSpawner/WallSwitch" to="." method="spawn_nodule"] [connection signal="activated" from="NoduleSpawner/WallSwitch" to="." method="spawn_nodule"]
[connection signal="activated" from="AlarmSpawner/WallSwitch" to="." method="spawn_alarm"] [connection signal="activated" from="AlarmSpawner/WallSwitch" to="." method="spawn_alarm"]

View File

@ -22,6 +22,7 @@ run/max_fps=60
[autoload] [autoload]
ItemCatalog="*res://src/items/item_catalog.tscn"
GameManager="*res://src/game/game_manager.tscn" GameManager="*res://src/game/game_manager.tscn"
[debug] [debug]

View File

@ -13,6 +13,9 @@ signal alert_raised(new_value: int)
## Emitted just before the alert level is reset to zero. ## Emitted just before the alert level is reset to zero.
signal alert_cleared signal alert_cleared
## Emitted just after the player collects an item.
signal item_collected(item: Item)
const MAX_ALERT := 6 const MAX_ALERT := 6
## Maximum amount of grunk the player can carry in their tank. ## Maximum amount of grunk the player can carry in their tank.

10
src/items/item.gd Normal file
View File

@ -0,0 +1,10 @@
class_name Item extends Resource
## An item which can be collected, held in the player's inventory, and used.
@export var name: String
@export_multiline var description: String
## Handy typed singleton access.
static var catalog: ItemCatalogType:
get():
return ItemCatalog

1
src/items/item.gd.uid Normal file
View File

@ -0,0 +1 @@
uid://btwfewn35d0hm

View File

@ -0,0 +1,4 @@
class_name ItemCatalogType extends Node
## Autoloaded singleton catalog of all game items
@export var eyeballs: Item

View File

@ -0,0 +1 @@
uid://irxsuvrmtndr

View File

@ -0,0 +1,8 @@
[gd_scene load_steps=3 format=3 uid="uid://wpccpkt5fl22"]
[ext_resource type="Script" uid="uid://irxsuvrmtndr" path="res://src/items/item_catalog.gd" id="1_7eu5k"]
[ext_resource type="Resource" uid="uid://c6ynovu3h6twl" path="res://levels/ghost_ship/item_data/eyeballs.tres" id="2_vxbmx"]
[node name="ItemCatalog" type="Node"]
script = ExtResource("1_7eu5k")
eyeballs = ExtResource("2_vxbmx")

View File

@ -8,6 +8,8 @@ const JUMP_FORCE := 4.5
const GROUND_FRICTION := 0.3 const GROUND_FRICTION := 0.3
const AIR_FRICTION := 0.03 const AIR_FRICTION := 0.03
@export var inventory: Dictionary[Item, int] = {}
var gravity: Vector3 = ( var gravity: Vector3 = (
ProjectSettings.get_setting("physics/3d/default_gravity") ProjectSettings.get_setting("physics/3d/default_gravity")
* ProjectSettings.get_setting("physics/3d/default_gravity_vector") * ProjectSettings.get_setting("physics/3d/default_gravity_vector")
@ -55,10 +57,26 @@ func get_tool() -> Tool:
return tool_mount.get_active() return tool_mount.get_active()
## Add the given item to the player's inventory.
func add_item(item: Item, amount: int = 1) -> void:
inventory[item] = inventory.get(item, 0) + amount
if inventory[item] > 0:
Game.manager.item_collected.emit(item)
## Remove the given item from the player's inventory.
func remove_item(item: Item, amount: int = 1) -> void:
inventory[item] = inventory.get(item, 0) - amount
if inventory[item] <= 0:
inventory.erase(item)
func _physics_process(delta: float) -> void: func _physics_process(delta: float) -> void:
# Will be null if no valid interactor is selected. # Will be null if no valid interactor is selected.
var interactive: Interactive = interact_ray.get_collider() as Interactive var interactive: Interactive = interact_ray.get_collider() as Interactive
hud.select_interactive(interactive) hud.select_interactive(interactive)
if interactive:
interactive.select()
# World interaction # World interaction
if interactive and Input.is_action_just_pressed("interact"): if interactive and Input.is_action_just_pressed("interact"):

View File

@ -2,13 +2,30 @@ class_name Interactive extends StaticBody3D
## Props the player can interact with. ## Props the player can interact with.
signal activated signal activated
signal selected
@export var enabled := false @export var enabled := false
@export var label := "" @export var label := ""
@export var verb := "use" @export var verb := "use"
var _is_selected := false
var _selected_this_frame := false
func activate() -> void: func activate() -> void:
if enabled: if enabled:
activated.emit() activated.emit()
# TODO: bonk # TODO: bonk
func select() -> void:
if not _is_selected:
selected.emit()
_is_selected = true
_selected_this_frame = true
func _process(_delta: float) -> void:
if not _selected_this_frame:
_is_selected = false
_selected_this_frame = false

View File

@ -0,0 +1,42 @@
extends Node3D
signal activated
@export var enabled := true
@onready var interactive: Interactive = %Interactive
func _ready() -> void:
if enabled:
enable()
else:
disable()
func enable() -> void:
enabled = true
interactive.enabled = _has_item()
func disable() -> void:
enabled = false
interactive.enabled = false
func _has_item() -> bool:
return Player.instance and Item.catalog.eyeballs in Player.instance.inventory
func _activate() -> void:
if enabled and Item.catalog.eyeballs in Player.instance.inventory:
# TODO play animation/sfx
activated.emit()
else:
# TODO bonk
pass
func _on_interactive_selected() -> void:
if enabled:
interactive.enabled = _has_item()

View File

@ -0,0 +1 @@
uid://brao0ea0tgfgc

View File

@ -0,0 +1,37 @@
[gd_scene load_steps=5 format=3 uid="uid://ctr56p23cvupu"]
[ext_resource type="Script" uid="uid://brao0ea0tgfgc" path="res://src/props/retinal_scanner/retinal_scanner.gd" id="1_c71b5"]
[ext_resource type="Script" uid="uid://deg5xd87cy8rg" path="res://src/props/interactive.gd" id="1_ldtbm"]
[sub_resource type="BoxMesh" id="BoxMesh_c71b5"]
size = Vector3(0.475, 0.65, 0.2)
[sub_resource type="BoxShape3D" id="BoxShape3D_5bfyo"]
size = Vector3(0.475, 0.65, 0.2)
[node name="RetinalScanner" type="Node3D"]
script = ExtResource("1_c71b5")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("BoxMesh_c71b5")
[node name="Label3D" type="Label3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.18, 0.105)
pixel_size = 0.001
text = "Retinal
Scanner"
font_size = 96
outline_size = 24
[node name="Interactive" type="StaticBody3D" parent="."]
unique_name_in_owner = true
collision_layer = 3
collision_mask = 0
script = ExtResource("1_ldtbm")
metadata/_custom_type_script = "uid://deg5xd87cy8rg"
[node name="CollisionShape3D" type="CollisionShape3D" parent="Interactive"]
shape = SubResource("BoxShape3D_5bfyo")
[connection signal="activated" from="Interactive" to="." method="_activate"]
[connection signal="selected" from="Interactive" to="." method="_on_interactive_selected"]

View File

@ -0,0 +1,34 @@
@tool
class_name WorldItem extends MeshInstance3D
## A collectable item in the world.
@export var item: Item:
set = _set_item
@export var interact_radius: float = 0.25:
set = _set_radius
@onready var interactive: Interactive = %Interactive
@onready var collision_shape_3d: CollisionShape3D = %CollisionShape3D
func _ready() -> void:
_set_item(item)
_set_radius(interact_radius)
func _set_item(value: Item) -> void:
item = value
if item and interactive:
interactive.label = item.name
func _set_radius(value: float) -> void:
interact_radius = value
if collision_shape_3d:
(collision_shape_3d.shape as SphereShape3D).radius = interact_radius
func _on_interactive_activated() -> void:
Player.instance.add_item(item)
# TODO: animation, sfx on collect?
queue_free()

View File

@ -0,0 +1 @@
uid://cn360k7cnl1uu

View File

@ -0,0 +1,25 @@
[gd_scene load_steps=4 format=3 uid="uid://bn8fdu4houoo2"]
[ext_resource type="Script" uid="uid://cn360k7cnl1uu" path="res://src/world/world_item/world_item.gd" id="1_sptcj"]
[ext_resource type="Script" uid="uid://deg5xd87cy8rg" path="res://src/props/interactive.gd" id="2_ngll7"]
[sub_resource type="SphereShape3D" id="SphereShape3D_0mein"]
radius = 0.25
[node name="WorldItem" type="MeshInstance3D"]
script = ExtResource("1_sptcj")
[node name="Interactive" type="StaticBody3D" parent="."]
unique_name_in_owner = true
collision_layer = 2
collision_mask = 0
script = ExtResource("2_ngll7")
enabled = true
verb = "pick up"
metadata/_custom_type_script = "uid://deg5xd87cy8rg"
[node name="CollisionShape3D" type="CollisionShape3D" parent="Interactive"]
unique_name_in_owner = true
shape = SubResource("SphereShape3D_0mein")
[connection signal="activated" from="Interactive" to="." method="_on_interactive_activated"]

View File

@ -67,7 +67,7 @@
- [ ] ship - [ ] ship
- [ ] bunk - [ ] bunk
- [ ] tank terminal - [ ] tank terminal
- [ ] tank animations - [x] tank animations
- [ ] control console & launch button - [ ] control console & launch button
- [ ] door - [ ] door
- [ ] counters - [ ] counters
@ -84,4 +84,9 @@
- [ ] [[crew quarters]] props: - [ ] [[crew quarters]] props:
- [ ] sofa - [ ] sofa
- [ ] coffee table - [ ] coffee table
- [ ] bed - [ ] bed
- [ ] [[medbay]] props:
- [ ] operating table
- [ ] wraparound desk
- [ ] OR cart
- [ ] OR monitor cart