Traveller/scripts/inventory/PlaceholderItem.cs
Cold-Mint 31a1d292d8
Fixed an issue where players could pick up items in the backpack after throwing it.Supports placing items across item containers
修复玩家扔出背包后,再捡起背包内的物品消失的问题。支持跨容器替换物品了。
2024-09-28 22:59:25 +08:00

34 lines
804 B
C#

using Godot;
namespace ColdMint.scripts.inventory;
/// <summary>
/// <para>PlaceholderItem</para>
/// <para>占位物品</para>
/// </summary>
public class PlaceholderItem : IItem
{
public int Index { get; set; }
public string Id { get; set; }
public Texture2D Icon { get; }
public string Name { get; }
public string? Description { get; } = null;
public int Quantity { get; set; } = 1;
public int MaxQuantity { get; } = 1;
public bool IsSelect { get; set; }
public IItemContainer? ItemContainer { get; set; }
public int MergeableItemCount(IItem other, int unallocatedQuantity)
{
return 0;
}
public IItem? CreateItem(int number)
{
return null;
}
public void Use(Node2D? owner, Vector2 targetGlobalPosition)
{
}
}