Update Weapon in status

This commit is contained in:
Marco 2025-03-28 10:29:04 +01:00
commit 83d3cc7835
10 changed files with 45 additions and 15 deletions

View file

@ -1,4 +1,5 @@
using Godot;
using System.Linq;
using Godot;
using Godot.Collections;
namespace Cirno.Scripts.Resources;
@ -8,4 +9,9 @@ public partial class ItemsDatabase : Resource
{
[Export]
public Array<LootItem> LootItems { get; set; } = new();
public LootItem GetLootItem(string itemName)
{
return LootItems.FirstOrDefault(x => x.ItemKey == itemName);
}
}