To create a more dynamic item system, items can be linked to specific blueprints. This allows items to have unique variations based on their blueprint association.
For example, a Pistol blueprint should be stored as:
['pistol_blueprint'] = { name = 'pistol_blueprint', label = 'Pistol Blueprint', weight = 50, type = 'item', image = 'pistol_blueprint.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'A blueprint for crafting a pistol.'}
This system ensures that blueprints can define item properties dynamically.
In our script, everything before _blueprint acts as a search key. This means when searching for an item, the script will recognize pistol as the base item and match it to the pistol_blueprint. This allows easy categorization and retrieval of blueprint-linked items.
Blueprints are recognized based solely on the metadata and the item name. For example, if you have an item named pistol_blueprint, the resource will identify it as a blueprint for the pistol.