Godot Version
v4.4.1.stable.official [49a5bc7b6]
Context/Question
I'm creating a base NPC scene that I will instantiate to create the majority of the characters in my game. They need to be able to store items, which I have set up as a NPCInventoryItemData resource. This resource contains variables for ItemData resource, and amount. I have a separate resource loaded as a singleton storing a list of all available items - ItemDB. I'm having trouble finding a way to select from the list in ItemDB when adding an item, if anyone could point me in the right direction that would be great! An array of strings tied to the keys of each item would work too, I just don't want to have to add items to multiple files if it's not necessary. I'll provide code and screenshots below.
Exported Variables In NonPlayerCharacter Scene
extends InteractableObjectData
class_name NonPlayerCharacter
@export_subgroup("Character Background")
@export var character_name : String
@export_enum("Human", "Elf", "Dwarf", "Halfling") var character_race : String
@export_enum("character", "vendor", "background_character", "law_enforcement") var character_type : String
@export_multiline var character_description : String
@export_subgroup("Character Inventory")
var inventory : NPCInventoryData = NPCInventoryData.new()
@export var storage : Array[NPCInventoryItemData]
