Overhaul item and inventory and clean up bits and pieces
This commit is contained in:
5
Zennysoft.Game.Ma.Implementation/Item/IAccessory.cs
Normal file
5
Zennysoft.Game.Ma.Implementation/Item/IAccessory.cs
Normal file
@@ -0,0 +1,5 @@
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
public interface IAccessory : IEquipableItem, IAugmentableItem
|
||||
{
|
||||
}
|
||||
5
Zennysoft.Game.Ma.Implementation/Item/IArmor.cs
Normal file
5
Zennysoft.Game.Ma.Implementation/Item/IArmor.cs
Normal file
@@ -0,0 +1,5 @@
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
public interface IArmor : IEquipableItem, IAugmentableItem
|
||||
{
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
namespace Zennysoft.Ma.Adapter
|
||||
public interface IAugmentItem : IBaseInventoryItem
|
||||
{
|
||||
public interface IAugmentItem
|
||||
{
|
||||
public JewelTags Augment { get; }
|
||||
}
|
||||
|
||||
public IAugmentType Augment { get; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Zennysoft.Ma.Adapter
|
||||
{
|
||||
public interface IAugmentableItem
|
||||
{
|
||||
public Augment? Augment { get; }
|
||||
}
|
||||
}
|
||||
15
Zennysoft.Game.Ma.Implementation/Item/IBaseInventoryItem.cs
Normal file
15
Zennysoft.Game.Ma.Implementation/Item/IBaseInventoryItem.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
using Godot;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
public interface IBaseInventoryItem
|
||||
{
|
||||
public string ItemName { get; }
|
||||
public string Description { get; }
|
||||
public float SpawnRate { get; }
|
||||
public int ThrowDamage { get; }
|
||||
public float ThrowSpeed { get; }
|
||||
public ItemTag ItemTag { get; }
|
||||
|
||||
public abstract Texture2D GetTexture();
|
||||
}
|
||||
@@ -4,6 +4,6 @@
|
||||
{
|
||||
void RescueItem();
|
||||
|
||||
public InventoryItem Item { get; }
|
||||
public IBaseInventoryItem Item { get; }
|
||||
}
|
||||
}
|
||||
|
||||
14
Zennysoft.Game.Ma.Implementation/Item/IEquipableItem.cs
Normal file
14
Zennysoft.Game.Ma.Implementation/Item/IEquipableItem.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Zennysoft.Ma.Adapter.Entity;
|
||||
|
||||
public interface IEquipableItem : IBaseInventoryItem
|
||||
{
|
||||
public int BonusAttack { get; }
|
||||
public int BonusDefense { get; }
|
||||
public int BonusHP { get; }
|
||||
public int BonusVT { get; }
|
||||
public int BonusLuck { get; }
|
||||
|
||||
public bool Glued { get; set; }
|
||||
|
||||
public ElementalResistanceSet ElementalResistance { get; }
|
||||
}
|
||||
@@ -2,17 +2,17 @@
|
||||
|
||||
public interface IInventory
|
||||
{
|
||||
public bool PickUpItem(InventoryItem item);
|
||||
public bool PickUpItem(IBaseInventoryItem item);
|
||||
|
||||
public List<InventoryItem> Items { get; }
|
||||
public List<IBaseInventoryItem> Items { get; }
|
||||
|
||||
public bool TryAdd(InventoryItem inventoryItem);
|
||||
public bool TryAdd(IBaseInventoryItem inventoryItem);
|
||||
|
||||
public bool TryInsert(InventoryItem inventoryItem, int index);
|
||||
public bool TryInsert(IBaseInventoryItem inventoryItem, int index);
|
||||
|
||||
public void Remove(InventoryItem inventoryItem);
|
||||
public void Remove(IBaseInventoryItem inventoryItem);
|
||||
|
||||
public bool Sort(EquipableItem currentWeapon, EquipableItem currentArmor, EquipableItem currentAccessory, EquipableItem ammo);
|
||||
public bool Sort(IWeapon currentWeapon, IArmor currentArmor, IAccessory currentAccessory, IEquipableItem ammo);
|
||||
|
||||
public bool AtCapacity();
|
||||
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
|
||||
public interface IThrownItem
|
||||
{
|
||||
public InventoryItem ItemThatIsThrown { get; set; }
|
||||
public IBaseInventoryItem ItemThatIsThrown { get; set; }
|
||||
}
|
||||
|
||||
5
Zennysoft.Game.Ma.Implementation/Item/IWeapon.cs
Normal file
5
Zennysoft.Game.Ma.Implementation/Item/IWeapon.cs
Normal file
@@ -0,0 +1,5 @@
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
public interface IWeapon : IEquipableItem, IAugmentableItem
|
||||
{
|
||||
}
|
||||
@@ -7,10 +7,10 @@ namespace Zennysoft.Ma.Adapter;
|
||||
public partial class RescuedItemDatabase
|
||||
{
|
||||
[Save("rescued_item_list")]
|
||||
public List<InventoryItem> Items { get; init; }
|
||||
public List<IBaseInventoryItem> Items { get; init; }
|
||||
|
||||
public RescuedItemDatabase()
|
||||
{
|
||||
Items = new List<InventoryItem>();
|
||||
Items = new List<IBaseInventoryItem>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user