2024-04-28 13:55:19 +00:00
|
|
|
|
using System;
|
|
|
|
|
using Godot;
|
|
|
|
|
|
|
|
|
|
namespace ColdMint.scripts.inventory;
|
|
|
|
|
|
2024-06-11 18:22:04 +00:00
|
|
|
|
/*
|
2024-04-28 13:55:19 +00:00
|
|
|
|
public interface IItem
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <para>Item and ID</para>
|
|
|
|
|
/// <para>物品还有ID</para>
|
|
|
|
|
/// </summary>
|
2024-05-08 10:22:04 +00:00
|
|
|
|
string? Id { get; set; }
|
2024-04-28 13:55:19 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <para>Represents the quantity of this item</para>
|
|
|
|
|
/// <para>表示此物品的数量</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
int Quantity { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <para>How many can this item stack up to</para>
|
|
|
|
|
/// <para>这个物品最多叠加到多少个</para>
|
|
|
|
|
/// </summary>
|
2024-04-29 15:25:03 +00:00
|
|
|
|
int MaxStackQuantity { get; set; }
|
2024-04-28 13:55:19 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <para>Items can be set with Icon</para>
|
|
|
|
|
/// <para>物品可以设置图标</para>
|
|
|
|
|
/// </summary>
|
2024-05-06 10:59:39 +00:00
|
|
|
|
Texture2D? Icon { get; set; }
|
2024-04-28 13:55:19 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <para>Item has a name</para>
|
|
|
|
|
/// <para>物品有名称</para>
|
|
|
|
|
/// </summary>
|
2024-05-08 10:22:04 +00:00
|
|
|
|
string? Name { get; set; }
|
2024-05-02 08:28:22 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <para>Description</para>
|
|
|
|
|
/// <para>描述</para>
|
|
|
|
|
/// </summary>
|
2024-05-08 10:22:04 +00:00
|
|
|
|
string? Description { get; set; }
|
2024-04-28 13:55:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <para>When using items</para>
|
|
|
|
|
/// <para>当使用物品时</para>
|
|
|
|
|
/// </summary>
|
2024-05-08 10:22:04 +00:00
|
|
|
|
Action<IItem>? OnUse { get; set; }
|
2024-04-28 13:55:19 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <para>When removing items from the backpack, instantiate them</para>
|
|
|
|
|
/// <para>当从背包内取出,实例化物品时</para>
|
|
|
|
|
/// </summary>
|
2024-05-08 10:22:04 +00:00
|
|
|
|
Func<IItem, Node>? OnInstantiation { get; set; }
|
2024-06-11 18:22:04 +00:00
|
|
|
|
}
|
|
|
|
|
*/
|