naev 0.12.5
nlua_ship.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
6#include "nlua.h"
7#include "ship.h"
8
9#define SHIP_METATABLE "ship"
10
11/*
12 * Library loading
13 */
14int nlua_loadShip( nlua_env env );
15
16/*
17 * Ship operations
18 */
19const Ship *lua_toship( lua_State *L, int ind );
20const Ship *luaL_checkship( lua_State *L, int ind );
21const Ship *luaL_validship( lua_State *L, int ind );
22const Ship **lua_pushship( lua_State *L, const Ship *ship );
23int lua_isship( lua_State *L, int ind );
const Ship ** lua_pushship(lua_State *L, const Ship *ship)
Pushes a ship on the stack.
Definition nlua_ship.c:193
int nlua_loadShip(nlua_env env)
Loads the ship library.
Definition nlua_ship.c:117
int lua_isship(lua_State *L, int ind)
Checks to see if ind is a ship.
Definition nlua_ship.c:209
const Ship * luaL_validship(lua_State *L, int ind)
Makes sure the ship is valid or raises a Lua error.
Definition nlua_ship.c:168
const Ship * luaL_checkship(lua_State *L, int ind)
Gets ship at index or raises error if there is no ship at index.
Definition nlua_ship.c:154
const Ship * lua_toship(lua_State *L, int ind)
Lua bindings to interact with ships.
Definition nlua_ship.c:143
Represents a space ship.
Definition ship.h:97