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 item); /// /// Implement methods for adding items /// 实现添加物品的方法 /// /// /// bool AddItem(IItem item); /// /// Gets the currently selected node /// 获取当前选中的节点 /// /// ItemSlotNode? GetSelectItemSlotNode(); /// /// 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 item); }