naev 0.12.5
nlua_spob.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
6#include "nlua.h"
7#include "space.h"
8
9#define SPOB_METATABLE "spob"
10
14typedef int LuaSpob;
15
16/*
17 * Load the Space Object (Spob) library.
18 */
19int nlua_loadSpob( nlua_env env );
20
21/*
22 * Spob operations.
23 */
24LuaSpob lua_tospob( lua_State *L, int ind );
25LuaSpob luaL_checkspob( lua_State *L, int ind );
26LuaSpob *lua_pushspob( lua_State *L, LuaSpob spob );
27Spob *luaL_validspob( lua_State *L, int ind );
28int lua_isspob( lua_State *L, int ind );
LuaSpob lua_tospob(lua_State *L, int ind)
This module allows you to handle the spobs from Lua.
Definition nlua_spob.c:152
LuaSpob luaL_checkspob(lua_State *L, int ind)
Gets spob at index raising an error if isn't a spob.
Definition nlua_spob.c:163
LuaSpob * lua_pushspob(lua_State *L, LuaSpob spob)
Pushes a spob on the stack.
Definition nlua_spob.c:203
Spob * luaL_validspob(lua_State *L, int ind)
Gets a spob directly.
Definition nlua_spob.c:177
int nlua_loadSpob(nlua_env env)
Loads the spob library.
Definition nlua_spob.c:124
int lua_isspob(lua_State *L, int ind)
Checks to see if ind is a spob.
Definition nlua_spob.c:218
Represents a Space Object (SPOB), including and not limited to planets, stations, wormholes,...
Definition space.h:102