Files
Babushka/scripts/CSharp/Common/Inventory/InventorySlot.cs
T

25 lines
616 B
C#
Raw Normal View History

2025-03-25 19:39:00 +01:00
#nullable enable
namespace Babushka.scripts.CSharp.Common.Inventory;
2025-09-17 15:07:17 +02:00
/// <summary>
/// Represents a virtual object wrapper for an item instance.
/// Can return the containing item or null.
/// </summary>
2025-03-25 19:39:00 +01:00
public class InventorySlot
{
2025-09-17 15:07:17 +02:00
/// <summary>
/// The inventory item instance that may or may not be bound to this slot.
/// </summary>
2025-03-25 19:39:00 +01:00
public ItemInstance? itemInstance;
2025-09-17 15:07:17 +02:00
/// <summary>
/// Whether or not this slot is currently occupied by an item instance.
/// </summary>
/// <returns></returns>
2025-03-25 19:39:00 +01:00
public bool IsEmpty()
{
return itemInstance == null;
}
}