
❔Unique Item Filter
To ensure the safe application of serail numbers for weapons in your inventory resource you can define items to be classed as unique within this script and this will only allow a max craft of 1. This ensures the inventory applies the correct serial numbers to the items if required
Ensure you have set
PerRecipeFlagto true. This checks each recipe name against the list of items in thePreFixesandNamestable and if it matches then sets the max craft to 1In the
Prefixestable you can define a list of item names with prefixes, for exampleweapon_would then dictate that all item names that start withweapon_are classed as unique and only allow a max craft of 1In the
Namestable you can define a list of item names that are classed as unique for exampleweapon_pistolthen dictates that item name is unique and will only allow a max craft of 1
UniqueItems = { -- unique item filters for weapons only 1 can be crafted at a time to ensure serials apply correctly and do not duplicate
PerRecipeFlag = true, -- if recipe.unique == true then treat as unique
Prefixes = { -- any item name starting with these is unique things like weapon_ or similair
'weapon_',
},
Names = { -- exact item names that are unique like weapon_pistol or similair
'weapon_pistol',
},
},Last updated