Big fix of inventory system, add accessory item type
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user