![]() |
naev 0.10.4
|
Handles the Lua pilot outfit (equipped) bindings. More...
#include "nlua_pilotoutfit.h"#include "log.h"#include "nlua_outfit.h"#include "nluadef.h"#include "rng.h"#include "slots.h"Go to the source code of this file.
Functions | |
| static int | poL_outfit (lua_State *L) |
| Gets the outfit of the PilotOutfit. More... | |
| static int | poL_state (lua_State *L) |
| Sets the state of the PilotOutfit. More... | |
| static int | poL_progress (lua_State *L) |
| Sets the state progress of the PilotOutfit. More... | |
| static int | poL_set (lua_State *L) |
| Sets a temporary ship stat modifier of the pilot outfit. More... | |
| static int | poL_clear (lua_State *L) |
| Clears all the temporary ship stat modifiers of the pilot outfit. More... | |
| int | nlua_loadPilotOutfit (nlua_env env) |
| Loads the pilot outfit library. More... | |
| PilotOutfitSlot * | lua_topilotoutfit (lua_State *L, int ind) |
| Lua bindings to interact with pilot outfits. More... | |
| PilotOutfitSlot * | luaL_checkpilotoutfit (lua_State *L, int ind) |
| Gets outfit at index or raises error if there is no outfit at index. More... | |
| PilotOutfitSlot * | luaL_validpilotoutfit (lua_State *L, int ind) |
| Makes sure the outfit is valid or raises a Lua error. More... | |
| PilotOutfitSlot ** | lua_pushpilotoutfit (lua_State *L, PilotOutfitSlot *po) |
| Pushes a pilot outfit on the stack. More... | |
| int | lua_ispilotoutfit (lua_State *L, int ind) |
| Checks to see if ind is a pilot outfit. More... | |
Variables | |
| int | pilotoutfit_modified = 0 |
| static const luaL_Reg | poL_methods [] |
Handles the Lua pilot outfit (equipped) bindings.
Definition in file nlua_pilotoutfit.c.
| int lua_ispilotoutfit | ( | lua_State * | L, |
| int | ind | ||
| ) |
Checks to see if ind is a pilot outfit.
| L | Lua state to check. |
| ind | Index position to check. |
Definition at line 127 of file nlua_pilotoutfit.c.
| PilotOutfitSlot ** lua_pushpilotoutfit | ( | lua_State * | L, |
| PilotOutfitSlot * | po | ||
| ) |
Pushes a pilot outfit on the stack.
| L | Lua state to push outfit into. |
| po | Pilot outfit to push. |
Definition at line 112 of file nlua_pilotoutfit.c.
| PilotOutfitSlot * lua_topilotoutfit | ( | lua_State * | L, |
| int | ind | ||
| ) |
Lua bindings to interact with pilot outfits.
Lua module: pilotoutfit
Gets outfit at index.
| L | Lua state to get outfit from. |
| ind | Index position to find the outfit. |
Definition at line 64 of file nlua_pilotoutfit.c.
| PilotOutfitSlot * luaL_checkpilotoutfit | ( | lua_State * | L, |
| int | ind | ||
| ) |
Gets outfit at index or raises error if there is no outfit at index.
| L | Lua state to get outfit from. |
| ind | Index position to find outfit. |
Definition at line 75 of file nlua_pilotoutfit.c.
| PilotOutfitSlot * luaL_validpilotoutfit | ( | lua_State * | L, |
| int | ind | ||
| ) |
Makes sure the outfit is valid or raises a Lua error.
| L | State currently running. |
| ind | Index of the outfit to validate. |
Definition at line 89 of file nlua_pilotoutfit.c.
| int nlua_loadPilotOutfit | ( | nlua_env | env | ) |
Loads the pilot outfit library.
| env | Environment to load pilot outfit library into. |
Definition at line 46 of file nlua_pilotoutfit.c.
|
static |
Clears all the temporary ship stat modifiers of the pilot outfit.
Lua function parameter: PilotOutfit po Pilot outfit to clear temporary modifiers from.
| L | Lua State |
Lua function: clear
Definition at line 233 of file nlua_pilotoutfit.c.
|
static |
Gets the outfit of the PilotOutfit.
Lua function parameter: PilotOutfit po Pilot outfit to get the outfit of. Lua function parameter: Outfit Outfit corresponding to the Pilot outfit.
| L | Lua State |
Lua function: outfit
Definition at line 150 of file nlua_pilotoutfit.c.
|
static |
Sets the state progress of the PilotOutfit.
Lua function parameter: PilotOutfit po Pilot outfit to set the state of. Lua function parameter: number progress Progress of the current state with 1 being started and 0 being done.
| L | Lua State |
Lua function: progress
Definition at line 198 of file nlua_pilotoutfit.c.
|
static |
Sets a temporary ship stat modifier of the pilot outfit.
Lua function parameter: PilotOutfit po Pilot outfit to set the modifier of. Lua function parameter: string mod Modifier name to set to. Same as in the XML definition. Lua function parameter: number val Value to set the modifier to. In the case of booleans, 0 indicates false, while 1 indicates true.
| L | Lua State |
Lua function: set
Definition at line 217 of file nlua_pilotoutfit.c.
|
static |
Sets the state of the PilotOutfit.
Lua function parameter: PilotOutfit po Pilot outfit to set the state of. Lua function parameter: string state State to set the pilot outfit to. Can be either "off", "warmup", "on", or "cooldown".
| L | Lua State |
Lua function: state
Definition at line 164 of file nlua_pilotoutfit.c.
| int pilotoutfit_modified = 0 |
Definition at line 23 of file nlua_pilotoutfit.c.
|
static |
Pilot outfit metatable methods.
Definition at line 31 of file nlua_pilotoutfit.c.