Redesign and reimplement inventory menu

Add jewels but no implementation yet (needed redesign of inventory menu to function correctly)
This commit is contained in:
2026-02-11 04:08:42 -08:00
parent 5451f0b31f
commit 8ce38c3c13
51 changed files with 1695 additions and 256 deletions

View File

@@ -0,0 +1,37 @@
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using Chickensoft.Serialization;
using Godot;
using Zennysoft.Game.Ma;
using Zennysoft.Ma.Adapter;
[Meta(typeof(IAutoNode)), Id("jewel")]
public partial class Jewel : InventoryItem
{
public override void _Notification(int what) => this.Notify(what);
[Node] private Sprite3D _sprite { get; set; }
public void OnReady()
{
_sprite.Texture = Stats.Texture;
}
public override string ItemName => Stats.Name;
public override string Description => Stats.Description;
public override float SpawnRate => Stats.SpawnRate;
public override int ThrowDamage => Stats.ThrowDamage;
public override float ThrowSpeed => Stats.ThrowSpeed;
public override ItemTag ItemTag => Stats.ItemTag;
public override Texture2D GetTexture() => Stats.Texture;
[Export]
[Save("jewel_stats")]
public JewelStats Stats { get; set; } = new JewelStats();
}

View File

@@ -0,0 +1,38 @@
[gd_scene load_steps=4 format=3 uid="uid://dqlbkyxqhyqtl"]
[ext_resource type="Script" uid="uid://bou7fk1evvet" path="res://src/items/jewels/Jewel.cs" id="1_sedqc"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_40de3"]
[sub_resource type="BoxShape3D" id="BoxShape3D_qdeu2"]
size = Vector3(0.898941, 2.34974, 0.86676)
[node name="Jewel" type="RigidBody3D"]
collision_layer = 0
axis_lock_linear_x = true
axis_lock_linear_z = true
axis_lock_angular_x = true
axis_lock_angular_y = true
axis_lock_angular_z = true
script = ExtResource("1_sedqc")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.720724, 0)
shape = SubResource("CapsuleShape3D_40de3")
[node name="Pickup" type="Area3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.49274, 0)
collision_layer = 4
collision_mask = 0
[node name="Sprite" type="Sprite3D" parent="Pickup"]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.370004, 0)
pixel_size = 0.025
billboard = 2
texture_filter = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00804907, 0.709896, 0.0675965)
shape = SubResource("BoxShape3D_qdeu2")

View File

@@ -1,4 +1,5 @@
using Chickensoft.Introspection;
using Chickensoft.Serialization;
using Godot;
namespace Zennysoft.Game.Ma;
@@ -7,4 +8,7 @@ namespace Zennysoft.Game.Ma;
[Meta, Id("jewel_stat_type")]
public partial class JewelStats : InventoryItemStats
{
[Save("jewel_tag")]
[Export]
public JewelTags JewelTag { get; set; }
}

View File

@@ -0,0 +1,19 @@
public enum JewelTags
{
None,
AeolicElement,
IncreaseHPRecovery,
HastenVT,
LowerEXPGain,
Glue,
ItemRescue,
HydricElement,
IgneousElement,
IncreaseEXPGain,
LowerHPRecovery,
SlowVTReduction,
AutoIdentifyAllItems,
ReviveUserOnce,
TelluricElement
}

View File

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

View File

@@ -1,18 +0,0 @@
using Godot;
using System;
using Zennysoft.Game.Ma;
using Zennysoft.Ma.Adapter;
public partial class Jewels : InventoryItem
{
public override string ItemName { get; }
public override string Description { get; }
public override float SpawnRate { get; }
public override int ThrowDamage { get; }
public override float ThrowSpeed { get; }
public override ItemTag ItemTag { get; }
public override Texture2D GetTexture() => throw new NotImplementedException();
public JewelStats Stats { get; set; } = new JewelStats();
}

View File

@@ -0,0 +1,28 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://bxen2ertkxmwo"]
[ext_resource type="Texture2D" uid="uid://c47igpgj02war" path="res://src/items/jewels/texture/Aeollic Jewel.png" id="1_p3ar8"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="1_u0a3e"]
[resource]
script = ExtResource("1_u0a3e")
JewelTag = 1
Name = "Aeolic Jewel"
Description = "Add Aeolic damage to Weapon or Aeolic resistance to Armor."
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_p3ar8")
metadata/_custom_type_script = "uid://btikba31yb0tl"

View File

@@ -0,0 +1,28 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://b8f23e2kay1cr"]
[ext_resource type="Texture2D" uid="uid://cdq12s3k2oemt" path="res://src/items/jewels/texture/Anabolic.png" id="1_6jhk1"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="1_6xlbl"]
[resource]
script = ExtResource("1_6xlbl")
JewelTag = 2
Name = "Anabolic Jewel"
Description = "Increase HP regen speed."
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_6jhk1")
metadata/_custom_type_script = "uid://btikba31yb0tl"

View File

@@ -0,0 +1,27 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://ciejgco24n0qo"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="1_dxj8h"]
[ext_resource type="Texture2D" uid="uid://bjpp5hp78g2w6" path="res://src/items/jewels/texture/Black Egg.png" id="1_rbr4o"]
[resource]
script = ExtResource("1_dxj8h")
Name = "Black Egg"
Description = "Increase Attack, Defense, and Luck."
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_rbr4o")
metadata/_custom_type_script = "uid://btikba31yb0tl"

View File

@@ -0,0 +1,27 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://d8186oeld7up"]
[ext_resource type="Texture2D" uid="uid://bnno0bwaxvvq4" path="res://src/items/jewels/texture/Cats Eye.png" id="1_a82hi"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="1_vvfsu"]
[resource]
script = ExtResource("1_vvfsu")
Name = "Cat's Eye"
Description = "Dramatically increases Luck."
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_a82hi")
metadata/_custom_type_script = "uid://btikba31yb0tl"

View File

@@ -0,0 +1,27 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://bfmujwmg1iehy"]
[ext_resource type="Texture2D" uid="uid://b2tnug7fnsqor" path="res://src/items/jewels/texture/Cinnabar Structure.png" id="1_fc5tr"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="1_k60ln"]
[resource]
script = ExtResource("1_k60ln")
Name = "Cinnabar Structure"
Description = "Hastens VT, adds or improves Rust."
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_fc5tr")
metadata/_custom_type_script = "uid://btikba31yb0tl"

View File

@@ -0,0 +1,27 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://cdygc6sdh0oki"]
[ext_resource type="Texture2D" uid="uid://dqqyx7usmyo1k" path="res://src/items/jewels/texture/Foolish Orb.png" id="1_ltr3k"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="1_pn071"]
[resource]
script = ExtResource("1_pn071")
Name = "Foolish Orb"
Description = "Lowers EXP gain."
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_ltr3k")
metadata/_custom_type_script = "uid://btikba31yb0tl"

View File

@@ -0,0 +1,27 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://b00agx6qy6yhv"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="1_c23yr"]
[ext_resource type="Texture2D" uid="uid://d3vv6ea17uifk" path="res://src/items/jewels/texture/Glue Orb.png" id="1_sww4k"]
[resource]
script = ExtResource("1_c23yr")
Name = "Glue Orb"
Description = "Prevents item from being unequipped."
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_sww4k")
metadata/_custom_type_script = "uid://btikba31yb0tl"

View File

@@ -0,0 +1,27 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://bxq5xnxfhatpi"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="1_7gwjj"]
[ext_resource type="Texture2D" uid="uid://4247dwj5g705" path="res://src/items/jewels/texture/Heirloom Stone.png" id="1_gk4x7"]
[resource]
script = ExtResource("1_7gwjj")
Name = "Heirloom Stone"
Description = "Returns item to the surface world."
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_gk4x7")
metadata/_custom_type_script = "uid://btikba31yb0tl"

View File

@@ -0,0 +1,27 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://c65jk6stksnai"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="1_cyti8"]
[ext_resource type="Texture2D" uid="uid://brx581xmqv54k" path="res://src/items/jewels/texture/Hydric Jewel.png" id="1_fdjqp"]
[resource]
script = ExtResource("1_cyti8")
Name = "Hydric Jewel"
Description = "Hydric e"
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_fdjqp")
metadata/_custom_type_script = "uid://btikba31yb0tl"

View File

@@ -0,0 +1,27 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://duk8un4sdv0cs"]
[ext_resource type="Texture2D" uid="uid://d3bx1j5irhdes" path="res://src/items/jewels/texture/Igneous Jewel.png" id="1_knm0p"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="1_qh03l"]
[resource]
script = ExtResource("1_qh03l")
Name = "Igneous Jewel"
Description = ""
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_knm0p")
metadata/_custom_type_script = "uid://btikba31yb0tl"

View File

@@ -0,0 +1,27 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://d2rdaghcccw0f"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="1_6e2y5"]
[ext_resource type="Texture2D" uid="uid://drfx1s7mc3j0h" path="res://src/items/jewels/texture/Meditative Stone.png" id="1_cyim2"]
[resource]
script = ExtResource("1_6e2y5")
Name = "Meditative Stone"
Description = ""
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_cyim2")
metadata/_custom_type_script = "uid://btikba31yb0tl"

View File

@@ -0,0 +1,27 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://djim1rdpt03ai"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="1_ivvck"]
[ext_resource type="Texture2D" uid="uid://rl6df2udk2ui" path="res://src/items/jewels/texture/Mercury.png" id="1_rw1fk"]
[resource]
script = ExtResource("1_ivvck")
Name = "Mercury Prism"
Description = ""
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_rw1fk")
metadata/_custom_type_script = "uid://btikba31yb0tl"

View File

@@ -0,0 +1,27 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://dd5stvt4g531e"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="1_cabnq"]
[ext_resource type="Texture2D" uid="uid://vxeil6eo3hdp" path="res://src/items/jewels/texture/Metabolic Jewel.png" id="1_pscn1"]
[resource]
script = ExtResource("1_cabnq")
Name = "Metabolic Jewel"
Description = ""
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_pscn1")
metadata/_custom_type_script = "uid://btikba31yb0tl"

View File

@@ -0,0 +1,27 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://bdd7xh6v03xul"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="1_75k4l"]
[ext_resource type="Texture2D" uid="uid://bxa1kqlqhbyi3" path="res://src/items/jewels/texture/Ossified Cortex.png" id="1_cq6jp"]
[resource]
script = ExtResource("1_75k4l")
Name = "Ossified Cortex"
Description = ""
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_cq6jp")
metadata/_custom_type_script = "uid://btikba31yb0tl"

View File

@@ -0,0 +1,27 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://byufike6hontv"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="1_fkhpb"]
[ext_resource type="Texture2D" uid="uid://c6fu3kd5yelwi" path="res://src/items/jewels/texture/Rejection Stone.png" id="1_rh6wh"]
[resource]
script = ExtResource("1_fkhpb")
Name = "Rejection Stone"
Description = ""
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_rh6wh")
metadata/_custom_type_script = "uid://btikba31yb0tl"

View File

@@ -0,0 +1,27 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://blghjvef7p6fm"]
[ext_resource type="Texture2D" uid="uid://cgs0hr24h5g6q" path="res://src/items/jewels/texture/Tarnished Jewel.png" id="1_6qtep"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="1_868vv"]
[resource]
script = ExtResource("1_868vv")
Name = "Tarnished Jewel"
Description = ""
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_6qtep")
metadata/_custom_type_script = "uid://btikba31yb0tl"

View File

@@ -0,0 +1,27 @@
[gd_resource type="Resource" script_class="JewelStats" load_steps=3 format=3 uid="uid://d3fipjd8sayiw"]
[ext_resource type="Texture2D" uid="uid://r36ecoqigs2o" path="res://src/items/jewels/texture/Telleric Jewel.png" id="1_yooxp"]
[ext_resource type="Script" uid="uid://btikba31yb0tl" path="res://src/items/jewels/JewelStats.cs" id="2_c8kww"]
[resource]
script = ExtResource("2_c8kww")
Name = "Telluric Jewel"
Description = "Add Telluric damage to Weapon or Telluric resistance to Armor."
SpawnRate = 0.5
BonusAttack = 0
BonusDefense = 0
BonusLuck = 5
BonusHP = 0
BonusVT = 0
AeolicResistance = 0
TelluricResistance = 0
HydricResistance = 0
IgneousResistance = 0
FerrumResistance = 0
HolyResistance = 0
CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_yooxp")
metadata/_custom_type_script = "uid://btikba31yb0tl"