Big fix of inventory system, add accessory item type

This commit is contained in:
2024-09-07 02:22:14 -07:00
parent 33d282ebfb
commit 98d096303c
22 changed files with 229 additions and 100 deletions

View File

@@ -10,7 +10,9 @@ public partial class Armor : InventoryItem
public override void _Notification(int what) => this.Notify(what);
[Export]
public override InventoryItemInfo InventoryInfo { get; set; }
internal override InventoryItemInfo Info { get; set; }
public ArmorInfo ArmorInfo { get => (ArmorInfo)Info; }
public void OnReady()
{
@@ -19,7 +21,7 @@ public partial class Armor : InventoryItem
public void OnEntered(Node3D body)
{
var inventoryList = GameRepo.InventoryItems.Value.Append(InventoryInfo).ToList();
var inventoryList = GameRepo.InventoryItems.Value.Append(this).ToList();
GameRepo.InventoryItems.OnNext(inventoryList);
QueueFree();
}