naev 0.12.5
nlua_system.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 SYSTEM_METATABLE "system"
10
14typedef int LuaSystem;
15
16/*
17 * Load the system library.
18 */
19int nlua_loadSystem( nlua_env env );
20
21/*
22 * System operations.
23 */
24LuaSystem lua_tosystem( lua_State *L, int ind );
25LuaSystem luaL_checksystem( lua_State *L, int ind );
26LuaSystem *lua_pushsystem( lua_State *L, LuaSystem sys );
27StarSystem *luaL_validsystem( lua_State *L, int ind );
28int lua_issystem( lua_State *L, int ind );
LuaSystem luaL_checksystem(lua_State *L, int ind)
Gets system at index raising an error if type doesn't match.
int nlua_loadSystem(nlua_env env)
Loads the system library.
LuaSystem * lua_pushsystem(lua_State *L, LuaSystem sys)
Pushes a system on the stack.
StarSystem * luaL_validsystem(lua_State *L, int ind)
Gets system (or system name) at index raising an error if type doesn't match.
LuaSystem lua_tosystem(lua_State *L, int ind)
Lua system module.
int lua_issystem(lua_State *L, int ind)
Checks to see if ind is a system.