sm.item
Allows checking for static information about items.
Functions
getCharacterShape
sm.item.getCharacterShape( uuid )
Returns data for the character shape.
Arguments:uuid
[ Uuid ]: The shape uuid.
- [ table ]: The character shape data.
getEdible
sm.item.getEdible( uuid )
Returns data for the edible shape.
Arguments:uuid
[ Uuid ]: The shape uuid.
- [ table ]: The edible shape data.
getFeatureData
sm.item.getFeatureData( uuid )
Returns the shape's feature data.
Arguments:uuid
[ Uuid ]: The shape uuid.
- [ table ]: The feature data.
getInteractablesUuidsOfType
sm.item.getInteractablesUuidsOfType( type_name )
Returns a table of all interactable uuids of an interactable type.
Arguments:-
type_name
[ string ]: The interactable type name. This can be any of the following:-
electricEngine
-
gasEngine
-
steering
-
seat
-
controller
-
button
-
lever
-
sensor
-
thruster
-
radio
-
horn
-
tone
-
logic
-
timer
-
particlePreview
-
spring
-
pointLight
-
spotLight
-
chest
-
itemStack
-
scripted
-
piston
-
simpleInteractive
-
camera
-
waypoint
-
survivalThruster
-
survivalPiston
-
survivalSpring
-
survivalSequence
-
survivalSensor
-
- [ table ]: The table of interactable uuids.
getPlantable
sm.item.getPlantable( uuid )
Returns data for the plantable shape.
Arguments:uuid
[ Uuid ]: The shape uuid.
- [ table ]: The plantable shape data.
getPlantableUuids
sm.item.getPlantableUuids()
Returns a table of all plantable uuids.
Returns:- [ table ]: The table of plantable uuids.
getQualityLevel
sm.item.getQualityLevel( uuid )
Returns the quality level of the shape.
Arguments:uuid
[ Uuid ]: The shape uuid.
- [ int ]: The quality level.
getShapeDefaultColor
sm.item.getShapeDefaultColor( uuid )
Returns the default color of the shape.
Arguments:uuid
[ Uuid ]: The shape uuid.
- [ Color ]: The color.
getShapeOffset
sm.item.getShapeOffset( uuid )
Returns the shape offset.
Arguments:uuid
[ Uuid ]: The shape uuid.
- [ Vec3 ]: The offset.
getShapeSize
sm.item.getShapeSize( uuid )
Returns the block dimensions of a shape.
Arguments:uuid
[ Uuid ]: The shape uuid.
- [ Vec3 ]: The shape size.
isBlock
sm.item.isBlock( uuid )
Returns whether the item is a block or not.
Arguments:uuid
[ Uuid ]: The item uuid.
- [ bool ]: Whether the item is a block or not.
isHarvestablePart
sm.item.isHarvestablePart( uuid )
Returns whether the uuid belongs to a harvestable shape.
Arguments:uuid
[ Uuid ]: The item uuid.
- [ bool ]: Whether the uuid belongs to a harvestable shape or not.
isJoint
sm.item.isJoint( uuid )
Returns whether the item is a joint or not.
Arguments:uuid
[ Uuid ]: The item uuid.
- [ bool ]: Whether the item is a joint or not.
isPart
sm.item.isPart( uuid )
Returns whether the item is a part or not.
Arguments:uuid
[ Uuid ]: The item uuid.
- [ bool ]: Whether the item is a part or not.
isTool
sm.item.isTool( uuid )
Returns whether the item is a tool or not.
Arguments:uuid
[ Uuid ]: The item uuid.
- [ bool ]: Whether the item is a tool or not.