using Godot; namespace Babushka.scripts.CSharp.Common.Inventory; public partial class ItemOnGround : Node3D { private ItemInstance _itemInstance; public ItemInstance itemInstance { get => _itemInstance; set { _itemInstance = value; UpdateVisuals(); } } public void TryPickUp() { GD.Print("Trying to pick up item"); var result = InventoryManager.Instance.CollectItem(itemInstance); if (result == InventoryActionResult.Success) { QueueFree(); } else { GD.Print("Inventory is full"); // TODO: player message } } public void UpdateVisuals() { var label = GetNode("ItemLabel"); if (itemInstance.blueprint != null) { label.Text = itemInstance.blueprint.name; } else { label.Text = "Error Item"; } } }