naev 0.10.4
nlua_pilot.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
7#include <lua.h>
10#include "pilot.h"
11
12#define PILOT_METATABLE "pilot"
17typedef unsigned int LuaPilot;
19/*
20 * Library loading
21 */
22int nlua_loadPilot( nlua_env env );
23
24/*
25 * Pilot operations
26 */
27LuaPilot lua_topilot( lua_State *L, int ind );
28LuaPilot luaL_checkpilot( lua_State *L, int ind );
29LuaPilot* lua_pushpilot( lua_State *L, LuaPilot pilot );
30Pilot* luaL_validpilot( lua_State *L, int ind );
31int lua_ispilot( lua_State *L, int ind );
LuaPilot lua_topilot(lua_State *L, int ind)
Lua bindings to interact with pilots.
Definition: nlua_pilot.c:453
LuaPilot * lua_pushpilot(lua_State *L, LuaPilot pilot)
Pushes a pilot on the stack.
Definition: nlua_pilot.c:495
Pilot * luaL_validpilot(lua_State *L, int ind)
Makes sure the pilot is valid or raises a Lua error.
Definition: nlua_pilot.c:478
int nlua_loadPilot(nlua_env env)
Loads the pilot library.
Definition: nlua_pilot.c:399
int lua_ispilot(lua_State *L, int ind)
Checks to see if ind is a pilot.
Definition: nlua_pilot.c:510
LuaPilot luaL_checkpilot(lua_State *L, int ind)
Gets pilot at index or raises error if there is no pilot at index.
Definition: nlua_pilot.c:464
The representation of an in-game pilot.
Definition: pilot.h:210