naev 0.11.5
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"
11/* Helper. */
12#define luaL_optoutfit(L,ind,def) nluaL_optarg(L,ind,def,luaL_checkoutfit)
13
14/*
15 * Library loading
16 */
17int nlua_loadOutfit( nlua_env env );
18
19/*
20 * Outfit operations
21 */
22const Outfit* lua_tooutfit( lua_State *L, int ind );
23const Outfit* luaL_checkoutfit( lua_State *L, int ind );
24const Outfit* luaL_validoutfit( lua_State *L, int ind );
25const Outfit** lua_pushoutfit( lua_State *L, const Outfit* outfit );
26int 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:97
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:328