naev 0.12.6
nlua_faction.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
6#include "nlua.h"
7
8#define FACTION_METATABLE "faction"
9
13typedef int LuaFaction;
14
15/*
16 * Load the space library.
17 */
18int nlua_loadFaction( nlua_env env );
19
20/*
21 * Faction operations
22 */
23LuaFaction lua_tofaction( lua_State *L, int ind );
24LuaFaction lua_checkfaction( lua_State *L, int ind );
25LuaFaction *lua_pushfaction( lua_State *L, LuaFaction faction );
26int luaL_validfaction( lua_State *L, int ind );
27int lua_isfaction( lua_State *L, int ind );
LuaFaction * lua_pushfaction(lua_State *L, LuaFaction faction)
Pushes a faction on the stack.
LuaFaction luaL_validfaction(lua_State *L, int ind)
Gets faction (or faction name) at index, raising an error if type isn't a valid faction.
int nlua_loadFaction(nlua_env env)
Loads the faction library.
int lua_isfaction(lua_State *L, int ind)
Checks to see if ind is a faction.
LuaFaction lua_tofaction(lua_State *L, int ind)
Gets faction at index.