2024-06-12 09:57:38 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
using ColdMint.scripts.inventory;
|
2024-06-11 16:51:40 +00:00
|
|
|
|
|
|
|
|
|
using Godot;
|
|
|
|
|
|
|
|
|
|
namespace ColdMint.scripts.item;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-06-12 09:57:38 +00:00
|
|
|
|
/// <para>Item stack of single item</para>
|
2024-06-11 16:51:40 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
//maybe we'd move this into inventory namespace
|
2024-06-12 13:53:27 +00:00
|
|
|
|
public class SingleItemStack(IItem_New item) : IItemStack
|
2024-06-11 16:51:40 +00:00
|
|
|
|
{
|
|
|
|
|
public IItem_New Item { get; init; } = item;
|
|
|
|
|
|
|
|
|
|
public string Id => Item.Id;
|
|
|
|
|
public int MaxQuantity => 1;
|
2024-06-12 09:57:38 +00:00
|
|
|
|
public int Quantity { get; set; } = 1;
|
2024-06-11 16:51:40 +00:00
|
|
|
|
public Texture2D Icon => Item.Icon;
|
|
|
|
|
public string Name => Item.Name;
|
|
|
|
|
public string? Description => Item.Description;
|
2024-06-12 09:57:38 +00:00
|
|
|
|
|
|
|
|
|
public bool CanAddItem(IItem_New item) => false;
|
|
|
|
|
|
|
|
|
|
public bool AddItem(IItem_New item) => false;
|
|
|
|
|
|
|
|
|
|
public int CanTakeFrom(IItemStack itemStack) => 0;
|
|
|
|
|
|
2024-06-12 17:51:51 +00:00
|
|
|
|
public bool TakeFrom(IItemStack itemStack) => false;
|
|
|
|
|
|
2024-06-12 13:53:27 +00:00
|
|
|
|
public IItem_New? GetItem()
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IItem_New? PickItem()
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IItemStack? PickItems(int value)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
2024-06-12 09:57:38 +00:00
|
|
|
|
|
|
|
|
|
public int RemoveItem(int number)
|
|
|
|
|
{
|
2024-06-12 13:53:27 +00:00
|
|
|
|
throw new NotImplementedException();
|
2024-06-12 09:57:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ClearStack()
|
|
|
|
|
{
|
2024-06-12 13:53:27 +00:00
|
|
|
|
throw new NotImplementedException();
|
2024-06-12 09:57:38 +00:00
|
|
|
|
}
|
2024-06-11 16:51:40 +00:00
|
|
|
|
}
|