Enhanced loot drops system

This commit is contained in:
MaddoScientisto 2026-03-01 19:14:34 +01:00
commit acc61f9a0e
12 changed files with 661 additions and 443 deletions

View file

@ -1,10 +1,12 @@
[gd_scene load_steps=9 format=3 uid="uid://jffyxmft3nbw"]
[gd_scene format=3 uid="uid://jffyxmft3nbw"]
[ext_resource type="PackedScene" uid="uid://ninnis3a3jbn" path="res://3D/BlockbenchModels/Box/Box_Red.gltf" id="1_fi646"]
[ext_resource type="Script" uid="uid://ccxnvbthsvka3" path="res://Scripts/Actors/Destructible3D.cs" id="1_kvqx7"]
[ext_resource type="Resource" uid="uid://bes254wblt1lm" path="res://Resources/Bullets/3D/Explosion_Harmless_Small_3D.tres" id="2_jolck"]
[ext_resource type="Script" uid="uid://ddsqqfx1usc3j" path="res://Scripts/Resources/DamageResistance.cs" id="3_7px86"]
[ext_resource type="Script" uid="uid://cq65aed620ijo" path="res://Scripts/Resources/Loot/LootDrop.cs" id="4_hlryi"]
[ext_resource type="Script" uid="uid://hkmutmmjqh1e" path="res://Scripts/Actors/3D/PropGravityModule3D.cs" id="5_qq3cg"]
[ext_resource type="Resource" uid="uid://dy53gia1tmkah" path="res://Resources/Items/Points_Pickup.tres" id="5_r3p83"]
[sub_resource type="Resource" id="Resource_7px86"]
script = ExtResource("3_7px86")
@ -12,33 +14,41 @@ DamageType = 4
Attribute = 2
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
[sub_resource type="Resource" id="Resource_fkd2x"]
script = ExtResource("4_hlryi")
Item = ExtResource("5_r3p83")
Chance = 100.0
Count = 4
metadata/_custom_type_script = "uid://cq65aed620ijo"
[sub_resource type="BoxShape3D" id="BoxShape3D_hsg1w"]
size = Vector3(0.763428, 0.469452, 0.77832)
[sub_resource type="BoxShape3D" id="BoxShape3D_hlryi"]
size = Vector3(0.60668945, 0.09439087, 0.595726)
[node name="BoxRed" type="StaticBody3D" groups=["Destroyable"]]
[node name="BoxRed" type="StaticBody3D" unique_id=1876150911 groups=["Destroyable"]]
collision_layer = 16
collision_mask = 0
script = ExtResource("1_kvqx7")
Health = 8.0
ExplosionData = ExtResource("2_jolck")
DamageResistances = Array[ExtResource("3_7px86")]([SubResource("Resource_7px86")])
LootDrops = Array[ExtResource("4_hlryi")]([SubResource("Resource_fkd2x")])
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=169677373]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00549316, 0.0253752, -0.000488281)
shape = SubResource("BoxShape3D_hsg1w")
[node name="blockbench_export" parent="." instance=ExtResource("1_fi646")]
[node name="blockbench_export" parent="." unique_id=1273956257 instance=ExtResource("1_fi646")]
[node name="Node" type="Area3D" parent="."]
[node name="Node" type="Area3D" parent="." unique_id=1769689463]
collision_layer = 0
collision_mask = 17
script = ExtResource("5_qq3cg")
FallingSpeed = -2.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Node"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Node" unique_id=1831177562]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.024291992, -0.19599915, 0.013088226)
shape = SubResource("BoxShape3D_hlryi")

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=5 format=3 uid="uid://c2enjjxlfb5or"]
[gd_scene format=3 uid="uid://c2enjjxlfb5or"]
[ext_resource type="Texture2D" uid="uid://du8xcvbnf30o2" path="res://ExternalMaterial/Barrel/Barrels.png" id="1_2libs"]
[ext_resource type="Script" uid="uid://ccxnvbthsvka3" path="res://Scripts/Actors/Destructible3D.cs" id="1_gafco"]
@ -8,19 +8,20 @@
height = 0.564575
radius = 0.321777
[node name="StaticBody3D" type="StaticBody3D" groups=["Destroyable"]]
[node name="StaticBody3D" type="StaticBody3D" unique_id=1481124290 groups=["Destroyable"]]
collision_layer = 16
collision_mask = 0
script = ExtResource("1_gafco")
Health = 0.6
ExplosionData = ExtResource("2_g54tg")
[node name="Barrel" type="Sprite3D" parent="."]
[node name="Barrel" type="Sprite3D" parent="." unique_id=1883029792]
transform = Transform3D(0.707107, -0.5, 0.5, 0, 0.707107, 0.707107, -0.707107, -0.5, 0.5, 0, 0, 0)
pixel_size = 0.05
texture_filter = 0
texture = ExtResource("1_2libs")
hframes = 4
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=287417792]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0376587, 0)
shape = SubResource("CylinderShape3D_2libs")