2024-06-10 15:08:48 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
using Godot;
|
|
|
|
|
|
|
|
|
|
namespace ColdMint.scripts.item;
|
|
|
|
|
|
|
|
|
|
public readonly struct ItemType
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <para>Item id of this type</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Id { get; init; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <para>A function returns a new item instance of this type</para>
|
|
|
|
|
/// </summary>
|
2024-06-11 16:51:40 +00:00
|
|
|
|
public Func<IItem_New> NewItemFunc { get; init; }
|
2024-06-10 15:08:48 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <para>Default icon of items of this type</para>
|
|
|
|
|
/// </summary>
|
2024-06-11 16:51:40 +00:00
|
|
|
|
public Texture2D? Icon { get; init; }
|
2024-06-10 15:08:48 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <para>Max number in item stack of this type</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int MaxStackQuantity { get; init; }
|
2024-06-11 16:51:40 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <para>Determines how items of this type will be stacked</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public StackType StackType { get; init; }
|
2024-06-10 15:08:48 +00:00
|
|
|
|
}
|