Naev

Module pilotoutfit

Lua bindings to interact with pilot outfits.

Functions

slot (po) Gets the properties of the outfit slot.
outfit (po, Outfit) Gets the outfit of the PilotOutfit.
state (po, state) Sets the state of the PilotOutfit.
progress (po, progress) Sets the state progress of the PilotOutfit.
set (po, mod, val) Sets a temporary ship stat modifier of the pilot outfit.
clear (po) Clears all the temporary ship stat modifiers of the pilot outfit.
munition (po, p[, o=po:outfit()[, t=nil[, dir=p:dir()[, pos=p:pos()[, vel=p:vel()]]]]]) Creates a munition.
shoot (po, p[, t=nil[, stagger=false]]) Shoots at an object.


Functions

slot (po)
Gets the properties of the outfit slot. (Strings are English.)

Parameters:

  • po PilotOutfit Pilot outfit to get the outfit of.

Returns:

    A table with slot properties string "size", string "type", string "property", boolean "required", boolean "exclusive", and boolean "locked".
outfit (po, Outfit)
Gets the outfit of the PilotOutfit.

Parameters:

  • po PilotOutfit Pilot outfit to get the outfit of.
  • Outfit Outfit corresponding to the Pilot outfit.
state (po, state)
Sets the state of the PilotOutfit.

Parameters:

  • po PilotOutfit Pilot outfit to set the state of.
  • state string State to set the pilot outfit to. Can be either "off", "warmup", "on", or "cooldown".
progress (po, progress)
Sets the state progress of the PilotOutfit.

Parameters:

  • po PilotOutfit Pilot outfit to set the state of.
  • progress number Progress of the current state with 1 being started and 0 being done.
set (po, mod, val)
Sets a temporary ship stat modifier of the pilot outfit.

Parameters:

  • po PilotOutfit Pilot outfit to set the modifier of.
  • mod string Modifier name to set to. Same as in the XML definition.
  • val number Value to set the modifier to. In the case of booleans, 0 indicates false, while 1 indicates true.
clear (po)
Clears all the temporary ship stat modifiers of the pilot outfit.

Parameters:

  • po PilotOutfit Pilot outfit to clear temporary modifiers from.
munition (po, p[, o=po:outfit()[, t=nil[, dir=p:dir()[, pos=p:pos()[, vel=p:vel()]]]]])
Creates a munition.

Parameters:

  • po PilotOutfit Pilot outfit originating the munition.
  • p Pilot Pilot generating the munition, used for faction and damaging purposes.
  • o Outfit Outfit to be used as a reference for the munition. (default po:outfit())
  • t Pilot, Munition, Asteroid or nil Target pilot to shoot at. (default nil)
  • dir number Direction the munition should face. (default p:dir())
  • pos Vec2 Position to create the munition at. (default p:pos())
  • vel Vec2 Initial velocity of the munition. The munition's base velocity gets added to this. (default p:vel())
shoot (po, p[, t=nil[, stagger=false]])
Shoots at an object.

Parameters:

  • po PilotOutfit Pilot outfit originating the munition.
  • p Pilot Pilot shooting, used for faction and damaging purposes.
  • t Pilot, Munition, Asteroid or nil Target pilot to shoot at. (default nil)
  • stagger boolean Whether or not to stagger similar outfits. (default false)

Returns:

    boolean true if was able to shoot, false otherwise.
generated by LDoc 1.4.6 Last updated 2023-09-22 15:53:15