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:

    TypeNameDescription
    UuiduuidThe shape uuid.

    Returns:

    TypeDescription
    tableThe character shape data.

    sm.item.getEdible(uuid)

    Return the data for the edible Shape.

    Parameters:

    TypeNameDescription
    UuiduuidThe shape uuid.

    Returns:

    TypeDescription
    tableThe edible data.

    sm.item.getFeatureData(uuid)

    Returns the shapes feature data.

    Parameters:

    TypeNameDescription
    UuiduuidThe item uuid.

    Returns:

    TypeDescription
    tableThe feature data table

    sm.item.getInteractablesUuidsOfType(interactableType)

    Returns a table of all interactable uuids of a interactable type

    Parameters:

    TypeNameDescription
    stringinteractableTypeThe interactable type name

    Returns:

    TypeDescription
    tabletable of interactable uuids {Uuid, ..}

    sm.item.getPlantable(uuid)

    Return the data for the plantable Shape.

    Parameters:

    TypeNameDescription
    UuiduuidThe shape uuid.

    Returns:

    TypeDescription
    tableThe plantable data.

    sm.item.getPlantableUuids()

    Returns a table of all plantable uuids.

    Returns:

    TypeDescription
    tabletable of all plantable uuids {Uuid, ..}.

    sm.item.getQualityLevel(uuid)

    Return the quality level for the Shape.

    Parameters:

    TypeNameDescription
    UuiduuidThe shape uuid.

    Returns:

    TypeDescription
    integerThe quality level.

    sm.item.getShapeDefaultColor(uuid)

    Returns the default color of a shape

    Parameters:

    TypeNameDescription
    UuiduuidThe item uuid.

    Returns:

    TypeDescription
    ColorColor of the shape.

    sm.item.getShapeOffset(uuid)

    Return the Shape offset

    Parameters:

    TypeNameDescription
    UuiduuidThe shape uuid.

    Returns:

    TypeDescription
    Vec3The offset vector.

    sm.item.getShapeSize(uuid)

    Returns the block dimensions of an shape

    Parameters:

    TypeNameDescription
    UuiduuidThe item uuid.

    Returns:

    TypeDescription
    Vec3Size of the shape.

    sm.item.isBlock(uuid)

    Check if the item is a block.

    Parameters:

    TypeNameDescription
    UuiduuidThe item uuid.

    Returns:

    TypeDescription
    booleanTrue if the item is a block.

    sm.item.isHarvestablePart(uuid)

    Return whether the Shape uuid belongs to a harvestable shape.

    Parameters:

    TypeNameDescription
    UuiduuidThe shape uuid.

    Returns:

    TypeDescription
    booleanTrue if shape is a harvestable shape.

    sm.item.isJoint(uuid)

    Check if the item is a Joint.

    Parameters:

    TypeNameDescription
    UuiduuidThe item uuid.

    Returns:

    TypeDescription
    booleanTrue if the item is a joint.

    sm.item.isPart(uuid)

    Check if the item is a part.

    Parameters:

    TypeNameDescription
    UuiduuidThe item uuid.

    Returns:

    TypeDescription
    booleanTrue if the item is a part.

    sm.item.isTool(uuid)

    Check if the item uuid belongs to a Tool.

    Parameters:

    TypeNameDescription
    UuiduuidThe uuid.

    Returns:

    TypeDescription
    booleanTrue if the item uuid belongs to a tool.