sm.item
Allows checking for static infortmation about items.
Functions:
getCharacterShape getEdible getFeatureData getInteractablesUuidsOfType getPlantable getPlantableUuids getQualityLevel getShapeDefaultColor getShapeOffset getShapeSize isBlock isHarvestablePart isJoint isPart isTool
sm.item.getCharacterShape(uuid)
Return the data for the character Shape.
Parameters:
Type | Name | Description |
Uuid | uuid | The shape uuid. |
Returns:
Type | Description |
table | The character shape data. |
sm.item.getEdible(uuid)
Return the data for the edible Shape.
Parameters:
Type | Name | Description |
Uuid | uuid | The shape uuid. |
Returns:
Type | Description |
table | The edible data. |
sm.item.getFeatureData(uuid)
Returns the shapes feature data.
Parameters:
Type | Name | Description |
Uuid | uuid | The item uuid. |
Returns:
Type | Description |
table | The feature data table |
sm.item.getInteractablesUuidsOfType(interactableType)
Returns a table of all interactable uuids of a interactable type
Parameters:
Type | Name | Description |
string | interactableType | The interactable type name |
Returns:
Type | Description |
table | table of interactable uuids {Uuid, ..} |
sm.item.getPlantable(uuid)
Return the data for the plantable Shape.
Parameters:
Type | Name | Description |
Uuid | uuid | The shape uuid. |
Returns:
Type | Description |
table | The plantable data. |
sm.item.getPlantableUuids()
Returns a table of all plantable uuids.
Returns:
Type | Description |
table | table of all plantable uuids {Uuid, ..}. |
sm.item.getQualityLevel(uuid)
Return the quality level for the Shape.
Parameters:
Type | Name | Description |
Uuid | uuid | The shape uuid. |
Returns:
Type | Description |
integer | The quality level. |
sm.item.getShapeDefaultColor(uuid)
Returns the default color of a shape
Parameters:
Type | Name | Description |
Uuid | uuid | The item uuid. |
Returns:
Type | Description |
Color | Color of the shape. |
sm.item.getShapeOffset(uuid)
Return the Shape offset
Parameters:
Type | Name | Description |
Uuid | uuid | The shape uuid. |
Returns:
Type | Description |
Vec3 | The offset vector. |
sm.item.getShapeSize(uuid)
Returns the block dimensions of an shape
Parameters:
Type | Name | Description |
Uuid | uuid | The item uuid. |
Returns:
Type | Description |
Vec3 | Size of the shape. |
sm.item.isBlock(uuid)
Check if the item is a block.
Parameters:
Type | Name | Description |
Uuid | uuid | The item uuid. |
Returns:
Type | Description |
boolean | True if the item is a block. |
sm.item.isHarvestablePart(uuid)
Return whether the Shape uuid belongs to a harvestable shape.
Parameters:
Type | Name | Description |
Uuid | uuid | The shape uuid. |
Returns:
Type | Description |
boolean | True if shape is a harvestable shape. |
sm.item.isJoint(uuid)
Check if the item is a Joint.
Parameters:
Type | Name | Description |
Uuid | uuid | The item uuid. |
Returns:
Type | Description |
boolean | True if the item is a joint. |
sm.item.isPart(uuid)
Check if the item is a part.
Parameters:
Type | Name | Description |
Uuid | uuid | The item uuid. |
Returns:
Type | Description |
boolean | True if the item is a part. |
sm.item.isTool(uuid)
Check if the item uuid belongs to a Tool.
Parameters:
Type | Name | Description |
Uuid | uuid | The uuid. |
Returns:
Type | Description |
boolean | True if the item uuid belongs to a tool. |