Naev

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

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


Functions

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

Parameters:

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

Returns:

    boolean true if both outfits are the same.

Usage:

    if o1 == o2 then -- Checks to see if outfit o1 and o2 are the same
get (s)
Gets a outfit. ( s )

Parameters:

  • s string Name of the outfit to get.

Returns:

    Outfit or nil The outfit matching name or nil if error.

Usage:

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

Parameters:

  • s Outfit Outfit to get outfit name.

Returns:

    string The name of the outfit's outfit.

Usage:

    outfitname = s:name()
type (o)
Gets the type of an outfit. ( o )

Parameters:

  • o Outfit Outfit to get information of.

Returns:

    string The name of the outfit type.

Usage:

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

This name is more generic and vague than type(). ( o )

Parameters:

  • o Outfit Outfit to get information of.

Returns:

    string The name of the outfit broad type.

Usage:

    print( o:typeBroad() ) -- Prints the broad type of the outfit
cpu (o)
Gets the cpu usage of an outfit. ( o )

Parameters:

  • o Outfit Outfit to get information of.

Returns:

    string The amount of cpu the outfit uses.

Usage:

    print( o:cpu() ) -- Prints the cpu usage of an outfit
slot (o)
Gets the slot name, size and property of an outfit. ( o )

Parameters:

  • o Outfit Outfit to get information of.

Returns:

  1. string Human readable name.
  2. string Human readable size.
  3. string Human readable property.

Usage:

    slot_name, slot_size, slot_prop = o:slot() -- Gets an outfit's slot info
icon (o)
Gets the store icon for an outfit. ( o )

Parameters:

  • o Outfit Outfit to get information of.

Returns:

    Tex The texture containing the icon of the outfit.

Usage:

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

Parameters:

  • o String Outfit to get the price of.

Returns:

    number The price, in credits.

Usage:

    price = o:price()
generated by LDoc 1.4.6 Last updated 2020-10-18 07:14:35