idk
This commit is contained in:
@@ -1,17 +1,107 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://cgwtjleqvgubc"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://cgwtjleqvgubc"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/weapons/Weapon.cs" id="1_7pkyf"]
|
||||
[ext_resource type="Resource" uid="uid://cgbbc4mavlwn1" path="res://src/items/weapons/resources/SealingRod.tres" id="2_0p7rx"]
|
||||
[ext_resource type="Texture2D" uid="uid://wd6jh5q51e4k" path="res://src/items/weapons/models/sword.png" id="2_bwl3y"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_wll7p"]
|
||||
radius = 0.470016
|
||||
|
||||
[sub_resource type="Animation" id="Animation_w4iur"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Pickup:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Pickup:monitoring")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Pickup:monitorable")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_gkdye"]
|
||||
resource_name = "drop"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Pickup:position")
|
||||
tracks/0/interp = 2
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.5, 1),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 1, 0), Vector3(-0.752, 0.8, 0), Vector3(-1.50473, 0.09512, 0)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Pickup:monitoring")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 1,
|
||||
"values": [false, true]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Pickup:monitorable")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 1,
|
||||
"values": [false, true]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_s2htf"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_w4iur"),
|
||||
"drop": SubResource("Animation_gkdye")
|
||||
}
|
||||
|
||||
[node name="SealingRod" type="Node3D"]
|
||||
script = ExtResource("1_7pkyf")
|
||||
Info = ExtResource("2_0p7rx")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
[node name="Pickup" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 4
|
||||
collision_mask = 4
|
||||
monitoring = false
|
||||
monitorable = false
|
||||
|
||||
[node name="Sprite" type="Sprite3D" parent="Pickup"]
|
||||
unique_name_in_owner = true
|
||||
billboard = 2
|
||||
double_sided = false
|
||||
alpha_cut = 1
|
||||
@@ -20,10 +110,11 @@ alpha_antialiasing_mode = 1
|
||||
texture_filter = 0
|
||||
texture = ExtResource("2_bwl3y")
|
||||
|
||||
[node name="Pickup" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 4
|
||||
collision_mask = 4
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
|
||||
shape = SubResource("CapsuleShape3D_wll7p")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_s2htf")
|
||||
}
|
||||
|
||||
@@ -17,8 +17,13 @@ public partial class Weapon : InventoryItem
|
||||
[Export]
|
||||
internal override InventoryItemInfo Info { get; set; }
|
||||
|
||||
[Node]
|
||||
public RigidBody3D Rigid { get; set; } = default!;
|
||||
|
||||
public WeaponInfo WeaponInfo { get => (WeaponInfo)Info; }
|
||||
|
||||
private Vector3 _targetPosition = Vector3.Zero;
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
Pickup.BodyEntered += OnEntered;
|
||||
@@ -26,6 +31,9 @@ public partial class Weapon : InventoryItem
|
||||
|
||||
public void OnEntered(Node3D body)
|
||||
{
|
||||
if (GameRepo.InventoryItems.Value.Count() >= GameRepo.MaxItemSize)
|
||||
return;
|
||||
|
||||
var inventoryList = GameRepo.InventoryItems.Value.Append(this).ToList();
|
||||
GameRepo.InventoryItems.OnNext(inventoryList);
|
||||
QueueFree();
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://b6atdgf2e6e2t"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/weapons/Weapon.cs" id="1_sr3bh"]
|
||||
[ext_resource type="Resource" uid="uid://dq8tdmjhrqsrh" path="res://src/items/weapons/resources/CommonSword.tres" id="2_krjts"]
|
||||
[ext_resource type="Texture2D" uid="uid://wd6jh5q51e4k" path="res://src/items/weapons/models/sword.png" id="3_ixjdd"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_j2it8"]
|
||||
radius = 0.470016
|
||||
|
||||
[node name="CommonSword" type="Node3D"]
|
||||
script = ExtResource("1_sr3bh")
|
||||
Info = ExtResource("2_krjts")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
billboard = 2
|
||||
double_sided = false
|
||||
alpha_cut = 1
|
||||
alpha_scissor_threshold = 0.511
|
||||
alpha_antialiasing_mode = 1
|
||||
texture_filter = 0
|
||||
texture = ExtResource("3_ixjdd")
|
||||
|
||||
[node name="Pickup" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 4
|
||||
collision_mask = 4
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
|
||||
shape = SubResource("CapsuleShape3D_j2it8")
|
||||
@@ -1,9 +1,53 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://c10nhqq8su6pp"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://c10nhqq8su6pp"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/weapons/Weapon.cs" id="1_f8v7v"]
|
||||
[ext_resource type="Resource" uid="uid://b4oxsf4k3nr43" path="res://src/items/weapons/resources/RareSword.tres" id="2_6nmyd"]
|
||||
[ext_resource type="Texture2D" uid="uid://wd6jh5q51e4k" path="res://src/items/weapons/models/sword.png" id="3_meaac"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_w4iur"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Rigid/Pickup:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_gkdye"]
|
||||
resource_name = "drop"
|
||||
length = 0.75
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Rigid/Pickup:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.0333333, 0.3, 0.733333),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0), Vector3(0, 2, 0), Vector3(0, 1, -2), Vector3(0, 0, -4)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_s2htf"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_w4iur"),
|
||||
"drop": SubResource("Animation_gkdye")
|
||||
}
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_n11ob"]
|
||||
rough = true
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_uhvnd"]
|
||||
radius = 0.4
|
||||
height = 1.4
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_4ic28"]
|
||||
radius = 0.470016
|
||||
|
||||
@@ -11,7 +55,30 @@ radius = 0.470016
|
||||
script = ExtResource("1_f8v7v")
|
||||
Info = ExtResource("2_6nmyd")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_s2htf")
|
||||
}
|
||||
|
||||
[node name="Rigid" type="RigidBody3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -4)
|
||||
mass = 50.0
|
||||
physics_material_override = SubResource("PhysicsMaterial_n11ob")
|
||||
sleeping = true
|
||||
lock_rotation = true
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Rigid"]
|
||||
shape = SubResource("CapsuleShape3D_uhvnd")
|
||||
|
||||
[node name="Pickup" type="Area3D" parent="Rigid"]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 4
|
||||
collision_mask = 4
|
||||
|
||||
[node name="Sprite" type="Sprite3D" parent="Rigid/Pickup"]
|
||||
unique_name_in_owner = true
|
||||
billboard = 2
|
||||
double_sided = false
|
||||
alpha_cut = 1
|
||||
@@ -20,10 +87,5 @@ alpha_antialiasing_mode = 1
|
||||
texture_filter = 0
|
||||
texture = ExtResource("3_meaac")
|
||||
|
||||
[node name="Pickup" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 4
|
||||
collision_mask = 4
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Rigid/Pickup"]
|
||||
shape = SubResource("CapsuleShape3D_4ic28")
|
||||
|
||||
7
src/items/weapons/models/Rigid.cs
Normal file
7
src/items/weapons/models/Rigid.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class Rigid : RigidBody3D
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://cbb1fxllrnlyr"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/weapons/Weapon.cs" id="1_3o4dy"]
|
||||
[ext_resource type="Resource" uid="uid://e0t7swnl2sfd" path="res://src/items/weapons/resources/UncommonSword.tres" id="2_ga52m"]
|
||||
[ext_resource type="Texture2D" uid="uid://wd6jh5q51e4k" path="res://src/items/weapons/models/sword.png" id="3_r8wg3"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_cbafi"]
|
||||
radius = 0.470016
|
||||
|
||||
[node name="UncommonSword" type="Node3D"]
|
||||
script = ExtResource("1_3o4dy")
|
||||
Info = ExtResource("2_ga52m")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
billboard = 2
|
||||
double_sided = false
|
||||
alpha_cut = 1
|
||||
alpha_scissor_threshold = 0.511
|
||||
alpha_antialiasing_mode = 1
|
||||
texture_filter = 0
|
||||
texture = ExtResource("3_r8wg3")
|
||||
|
||||
[node name="Pickup" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 4
|
||||
collision_mask = 4
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
|
||||
shape = SubResource("CapsuleShape3D_cbafi")
|
||||
@@ -1,13 +0,0 @@
|
||||
[gd_resource type="Resource" script_class="WeaponInfo" load_steps=2 format=3 uid="uid://dq8tdmjhrqsrh"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/weapons/WeaponInfo.cs" id="1_k7yyo"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_k7yyo")
|
||||
Damage = 3
|
||||
TelluricDamageBonus = 0.0
|
||||
AeolicDamageBonus = 0.0
|
||||
BaseHydricDamageBonus = 0.0
|
||||
IgneousDamageBonus = 0.0
|
||||
Name = "Common sword"
|
||||
Description = "Common"
|
||||
@@ -5,10 +5,13 @@
|
||||
[resource]
|
||||
script = ExtResource("1_re512")
|
||||
Damage = 5
|
||||
Luck = 0.05
|
||||
AttackSpeed = 1.0
|
||||
TelluricDamageBonus = 0.0
|
||||
AeolicDamageBonus = 0.0
|
||||
BaseHydricDamageBonus = 0.0
|
||||
IgneousDamageBonus = 0.0
|
||||
FerrumDamageBonus = 0.0
|
||||
WeaponTags = Array[int]([])
|
||||
Name = "Jiblett"
|
||||
Description = "A halberd for the tasteful."
|
||||
|
||||
@@ -5,10 +5,13 @@
|
||||
[resource]
|
||||
script = ExtResource("1_vroib")
|
||||
Damage = 12
|
||||
Luck = 0.05
|
||||
AttackSpeed = 1.0
|
||||
TelluricDamageBonus = 0.0
|
||||
AeolicDamageBonus = 25.0
|
||||
BaseHydricDamageBonus = 0.0
|
||||
IgneousDamageBonus = 0.0
|
||||
FerrumDamageBonus = 0.0
|
||||
WeaponTags = Array[int]([])
|
||||
Name = "Love Judgement"
|
||||
Description = "A mace only wieldable by the strong of heart."
|
||||
|
||||
@@ -12,5 +12,6 @@ AeolicDamageBonus = 0.0
|
||||
BaseHydricDamageBonus = 0.0
|
||||
IgneousDamageBonus = 0.0
|
||||
FerrumDamageBonus = 0.0
|
||||
WeaponTags = Array[int]([])
|
||||
Name = "Rare sword"
|
||||
Description = "Rare"
|
||||
|
||||
@@ -5,11 +5,14 @@
|
||||
[resource]
|
||||
script = ExtResource("1_40b5j")
|
||||
Damage = 2
|
||||
Luck = 0.05
|
||||
AttackSpeed = 1.0
|
||||
TelluricDamageBonus = 0.0
|
||||
AeolicDamageBonus = 0.0
|
||||
BaseHydricDamageBonus = 0.0
|
||||
IgneousDamageBonus = 0.0
|
||||
FerrumDamageBonus = 0.0
|
||||
WeaponTags = Array[int]([])
|
||||
Name = "Sealing Rod"
|
||||
Description = "A wand fitted with charms said to cleanse and purify that which belongs to other worlds.
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
[gd_resource type="Resource" script_class="WeaponInfo" load_steps=2 format=3 uid="uid://e0t7swnl2sfd"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/weapons/WeaponInfo.cs" id="1_8os8m"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_8os8m")
|
||||
Damage = 5
|
||||
TelluricDamageBonus = 0.0
|
||||
AeolicDamageBonus = 0.0
|
||||
BaseHydricDamageBonus = 0.0
|
||||
IgneousDamageBonus = 0.0
|
||||
Name = "Uncommon sword"
|
||||
Description = "Uncommon"
|
||||
Reference in New Issue
Block a user