Home

Module outfit

Lua bindings to interact with outfits. This will allow you to create and manipulate outfits in-game. An example would be:
 o = outfit.get( "Heavy Laser" ) -- Gets the outfit by name
 cpu_usage = o:cpu() -- Gets the cpu usage of the outfit
 slot_name, slot_size = o:slot() -- Gets slot information about the outfit
 

Functions

outfit.__eq (o1, o2) Checks to see if two outfits are the same.
outfit.cpu (o) Gets the cpu usage of an outfit.
outfit.get (s) Gets a outfit.
outfit.icon (o) Gets the store icon for an outfit.
outfit.name (s) Gets the name of the outfit's outfit.
outfit.price (o) Gets the price of an outfit.
outfit.slot (o) Gets the slot name, size and property of an outfit.
outfit.type (o) Gets the type of an outfit.
outfit.typeBroad (o) Gets the broad type of an outfit.


Functions

outfit.__eq (o1, o2)
Checks to see if two outfits are the same.

Parameters

  • o1: First outfit to compare.
  • o2: Second outfit to compare.

Usage:

if o1 == o2 then -- Checks to see if outfit o1 and o2 are the same

Return value:

true if both outfits are the same.
outfit.cpu (o)
Gets the cpu usage of an outfit.

Parameters

  • o: Outfit to get information of.

Usage:

print( o:cpu() ) -- Prints the cpu usage of an outfit

Return value:

The amount of cpu the outfit uses.
outfit.get (s)
Gets a outfit.

Parameters

  • s: Name of the outfit to get.

Usage:

s = outfit.get( "Heavy Laser" ) -- Gets the heavy laser

Return value:

The outfit matching name or nil if error.
outfit.icon (o)
Gets the store icon for an outfit.

Parameters

  • o: Outfit to get information of.

Usage:

ico = o:icon() -- Gets the shop icon for an outfit

Return value:

The texture containing the icon of the outfit.
outfit.name (s)
Gets the name of the outfit's outfit.

Parameters

  • s: Outfit to get outfit name.

Usage:

outfitname = s:name()

Return value:

The name of the outfit's outfit.
outfit.price (o)
Gets the price of an outfit.

Parameters

  • o: Outfit to get the price of.

Usage:

price = o:price()

Return value:

The price, in credits.
outfit.slot (o)
Gets the slot name, size and property of an outfit.

Parameters

  • o: Outfit to get information of.

Usage:

slot_name, slot_size, slot_prop = o:slot() -- Gets an outfit's slot info

Return value:

The name, size and property in human readable strings.
outfit.type (o)
Gets the type of an outfit.

Parameters

  • o: Outfit to get information of.

Usage:

print( o:type() ) -- Prints the type of the outfit

Return value:

The name of the outfit type.
outfit.typeBroad (o)
Gets the broad type of an outfit. This name is more generic and vague than type().

Parameters

  • o: Outfit to get information of.

Usage:

print( o:typeBroad() ) -- Prints the broad type of the outfit

Return value:

The name of the outfit broad type.

Valid XHTML 1.0!