TorqueScript Reference

Functions

Integer getStockColorCount ()
String getStockColorF (stockColorName)
String getStockColorI (stockColorName)
String getStockColorName (stockColorIndex)
Boolean isStockColor (stockColorName)

Detailed Description

Function Documentation

◆ getStockColorCount()

Integer getStockColorCount ( )

Gets a count of available stock colors.

Returns
A count of available stock colors.

◆ getStockColorF()

String getStockColorF ( stockColorName )

Gets a floating-point-based stock color by name.

Parameters
stockColorName- The stock color name to retrieve.
Returns
The stock color that matches the specified color name. Returns nothing if the color name is not found.

◆ getStockColorI()

String getStockColorI ( stockColorName )

Gets a byte-based stock color by name.

Parameters
stockColorName- The stock color name to retrieve.
Returns
The stock color that matches the specified color name. Returns nothing if the color name is not found.

◆ getStockColorName()

String getStockColorName ( stockColorIndex )

Gets the stock color name at the specified index.

Parameters
stockColorIndexThe zero-based index of the stock color name to retrieve.
Returns
The stock color name at the specified index or nothing if the string is invalid.

◆ isStockColor()

Boolean isStockColor ( stockColorName )

Gets whether the specified name is a stock color or not.

Parameters
stockColorName- The stock color name to test for.
Returns
Whether the specified name is a stock color or not.