Summary
Methods
Returns a field of the blueprint, or a fallback when the field is
nil.GetMaterials()shared
Returns the materials crafting the blueprint consumes.
GetRequiredAttributes()shared
Returns the attributes a player needs to craft the blueprint.
GetRequiredItems()shared
Returns the tools needed to craft the blueprint, which are not consumed.
GetResult()shared
Returns the items crafting the blueprint produces.
GetUpdateAttributes()shared
Returns the attributes crafting the blueprint progresses.
Register()shared
Registers the blueprint with
cw.blueprints:Register.Methods
CLASS_TABLE:__call(varName, failSafe)
shared gamemodes/cwhl2rp/plugins/craft/plugin/libraries/sh_blueprints.lua:68Returns a field of the blueprint, or a fallback when the field is nil.
local name = blueprint('name', 'Unknown')
Parameters
- varName String Name of the field
- failSafe Any optional, defaults to
nilValue returned when the field isnil
Returns
- Any The field's value or
failSafe
CLASS_TABLE:GetMaterials()
shared gamemodes/cwhl2rp/plugins/craft/plugin/libraries/sh_blueprints.lua:49Returns the materials crafting the blueprint consumes.
Returns
- List The
recipelist of{ itemID, amount }pairs
CLASS_TABLE:GetRequiredAttributes()
shared gamemodes/cwhl2rp/plugins/craft/plugin/libraries/sh_blueprints.lua:31Returns the attributes a player needs to craft the blueprint.
Returns
- List The
reqattlist of{ attributeID, minimum }pairs
CLASS_TABLE:GetRequiredItems()
shared gamemodes/cwhl2rp/plugins/craft/plugin/libraries/sh_blueprints.lua:43Returns the tools needed to craft the blueprint, which are not consumed.
Returns
- List The
requiredlist of{ itemID, amount }pairs
CLASS_TABLE:GetResult()
shared gamemodes/cwhl2rp/plugins/craft/plugin/libraries/sh_blueprints.lua:55Returns the items crafting the blueprint produces.
Returns
- List The
finishlist of{ itemID, amount }pairs
CLASS_TABLE:GetUpdateAttributes()
shared gamemodes/cwhl2rp/plugins/craft/plugin/libraries/sh_blueprints.lua:37Returns the attributes crafting the blueprint progresses.
Returns
- List The
updattlist of{ attributeID, amount }pairs
Registers the blueprint with cw.blueprints:Register.