cirnogodot/Scripts/Resources/ItemsDatabase.cs

17 lines
364 B
C#
Raw Permalink Normal View History

2025-03-28 10:29:04 +01:00
using System.Linq;
using Godot;
2025-03-24 16:56:35 +01:00
using Godot.Collections;
namespace Cirno.Scripts.Resources;
[GlobalClass]
public partial class ItemsDatabase : Resource
{
[Export]
public Array<LootItem> LootItems { get; set; } = new();
2025-03-28 10:29:04 +01:00
public LootItem GetLootItem(string itemName)
{
return LootItems.FirstOrDefault(x => x.ItemKey == itemName);
}
2025-03-24 16:56:35 +01:00
}