using Godot; using Godot.Collections; namespace Babushka.scripts.CSharp.Common.Inventory; /// /// A dictionary wrapper resource that holds references to ItemResources and maps them to their respective prefabs. /// [GlobalClass] public partial class ItemRepository : Resource { [Export] public Dictionary itemInventoryRepository; /// /// Returns the path to the itemPrefab for the inventory item. /// /// /// public string TryGetPrefabPath(ItemResource resource) { if (itemInventoryRepository.Keys.Contains(resource)) { return itemInventoryRepository[resource]; } return null; } }