naev 0.12.6
nlua_outfit.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
6#include "nlua.h"
7#include "outfit.h"
8
9#define OUTFIT_METATABLE "outfit"
10
11/* Helper. */
12#define luaL_optoutfit( L, ind, def ) \
13 nluaL_optarg( L, ind, def, luaL_checkoutfit )
14
15/*
16 * Library loading
17 */
18int nlua_loadOutfit( nlua_env env );
19
20/*
21 * Outfit operations
22 */
23const Outfit *lua_tooutfit( lua_State *L, int ind );
24const Outfit *luaL_checkoutfit( lua_State *L, int ind );
25const Outfit *luaL_validoutfit( lua_State *L, int ind );
26const Outfit **lua_pushoutfit( lua_State *L, const Outfit *outfit );
27int lua_isoutfit( lua_State *L, int ind );
const Outfit * luaL_validoutfit(lua_State *L, int ind)
Makes sure the outfit is valid or raises a Lua error.
int nlua_loadOutfit(nlua_env env)
Loads the outfit library.
Definition nlua_outfit.c:99
const Outfit * luaL_checkoutfit(lua_State *L, int ind)
Gets outfit at index or raises error if there is no outfit at index.
const Outfit ** lua_pushoutfit(lua_State *L, const Outfit *outfit)
Pushes a outfit on the stack.
int lua_isoutfit(lua_State *L, int ind)
Checks to see if ind is a outfit.
const Outfit * lua_tooutfit(lua_State *L, int ind)
Lua bindings to interact with outfits.
A ship outfit, depends radically on the type.
Definition outfit.h:372