Added icon to slot

This commit is contained in:
cblech
2025-05-20 19:48:49 +02:00
parent 60928c520c
commit 8fdb395ae8
10 changed files with 90 additions and 28 deletions
@@ -3,15 +3,14 @@ namespace Babushka.scripts.CSharp.Common.Inventory;
public partial class InventoryTestScript : Node
{
[Export]
private ItemResource _testItemToCreate;
[Export(PropertyHint.ArrayType)]
private ItemResource[] _testItemsToCreate;
public override void _Ready()
{
InventoryManager.Instance.CreateItem(_testItemToCreate, InventoryManager.Instance.playerInventory);
InventoryManager.Instance.CreateItem(_testItemToCreate, InventoryManager.Instance.playerInventory);
InventoryManager.Instance.CreateItem(_testItemToCreate, InventoryManager.Instance.playerInventory);
InventoryManager.Instance.CreateItem(_testItemToCreate, InventoryManager.Instance.playerInventory);
GD.Print("Added items");
foreach (var itemResource in _testItemsToCreate)
{
InventoryManager.Instance.CreateItem(itemResource, InventoryManager.Instance.playerInventory);
}
}
}