Spawn items

This commit is contained in:
2024-08-28 21:48:05 -07:00
parent 699a333951
commit ea99e88535
25 changed files with 715 additions and 134 deletions

View File

@@ -7,7 +7,7 @@ using System.Collections.Generic;
public interface IInventoryMenu : IControl
{
public void PopulateItems(List<InventoryItem> items);
public void PopulateItems(List<InventoryItemInfo> items);
public void ClearItems();
}
@@ -25,7 +25,7 @@ public partial class InventoryMenu : Control, IInventoryMenu
private int _currentSelection = 0;
public void PopulateItems(List<InventoryItem> items)
public void PopulateItems(List<InventoryItemInfo> items)
{
foreach (var item in items)
{
@@ -103,13 +103,13 @@ public partial class InventoryMenu : Control, IInventoryMenu
public partial class WeaponLabel : Label
{
public WeaponLabel(InventoryItem inventoryItem)
public WeaponLabel(InventoryItemInfo inventoryItem)
{
InventoryItem = inventoryItem;
LabelSettings = UnequippedItemFont;
}
public InventoryItem InventoryItem { get; set; } = default!;
public InventoryItemInfo InventoryItem { get; set; } = default!;
private static LabelSettings UnequippedItemFont => GD.Load<LabelSettings>("res://src/vfx/Fonts/InventoryLabelSettings.tres");
private static LabelSettings EquippedItemFont => GD.Load<LabelSettings>("res://src/vfx/Fonts/EquippedInventoryLabelSettings.tres");