Refactor stats
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user