Refactor stats

This commit is contained in:
2025-10-22 16:24:07 -07:00
parent 6ec45c4805
commit f0c4e65783
77 changed files with 565 additions and 372 deletions

View File

@@ -4,6 +4,7 @@ using Chickensoft.Introspection;
using Godot;
using System.Linq;
using System.Threading.Tasks;
using Zennysoft.Game.Implementation;
using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma;
@@ -344,7 +345,7 @@ public partial class InventoryMenu : Control, IInventoryMenu
if (equipableItem.IsEquipped)
{
ItemEffectLabel.Text = $"{itemSlot.Item.GetType()} unequipped.";
Player.Unequip(equipableItem);
Player.EquipmentComponent.Unequip(equipableItem);
itemSlot.SetSelectedItemStyle();
if (equipableItem.ItemTag == ItemTag.BreaksOnChange)
Player.Inventory.Remove(equipableItem);
@@ -352,7 +353,7 @@ public partial class InventoryMenu : Control, IInventoryMenu
else
{
ItemEffectLabel.Text = $"{itemSlot.Item.GetType()} equipped.";
Player.Equip(equipableItem);
Player.EquipmentComponent.Equip(equipableItem);
itemSlot.SetEquippedSelectedItemStyle();
}