using ColdMint.scripts.item;
using Godot;
namespace ColdMint.scripts.inventory;
///
/// item container
/// 物品容器
///
///
///Item containers can store items. Things like backpacks and Hotbars are containers with visual pages.
///物品容器可以储存物品。像背包和hotbar是具有可视化页面的容器。
///
public interface IItemContainer
{
///
/// Can the specified item be added to the container?
/// 指定的物品是否可添加到容器内?
///
///
///
bool CanAddItem(IItem_New item);
///
/// Implement methods for adding items
/// 实现添加物品的方法
///
///
///
bool AddItem(IItem_New item);
///
/// Gets the selected location
/// 获取选中的位置
///
///
int GetSelectIndex();
///
/// Gets the currently selected node
/// 获取当前选中的节点
///
///
ItemSlotNode? GetSelectItemSlotNode();
///
/// Removes an item from the inventory at the currently selected location
/// 移除当前选中位置物品栏内的物品
///
///
///
bool RemoveItemFromItemSlotBySelectIndex(int number);
///
/// Gets the number of item slots
/// 获取物品槽的数量
///
///
int GetItemSlotCount();
///
/// Gets the item slot for the specified location
/// 获取指定位置的物品槽
///
///
///
ItemSlotNode? GetItemSlotNode(int index);
///
/// Removes an item from the item slot in the specified location
/// 在指定位置的物品槽内移除物品
///
///
///
///
bool RemoveItemFromItemSlot(int itemSlotIndex, int number);
///
/// Based on the given item, match the item slots where it can be placed
/// 根据给定的物品,匹配可放置它的物品槽
///
///
///
///Return null if there is no slot to place the item in
///若没有槽可放置此物品,则返回null
///
ItemSlotNode? Matching(IItem_New item);
///
/// AddItemSlot
/// 添加物品槽
///
///
///
void AddItemSlot(Node rootNode, int index);
///
/// SelectTheNextItemSlot
/// 选择下一个物品槽
///
void SelectTheNextItemSlot();
///
/// SelectThePreviousItemSlot
/// 选择上一个物品槽
///
void SelectThePreviousItemSlot();
///
/// 选择物品槽
/// SelectItemSlot
///
///
void SelectItemSlot(int newSelectIndex);
}