-
Notifications
You must be signed in to change notification settings - Fork 0
/
nlua_commodity.h
43 lines (27 loc) · 850 Bytes
/
nlua_commodity.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* See Licensing and Copyright notice in naev.h
*/
#ifndef NLUA_COMMODITY_H
# define NLUA_COMMODITY_H
#include <lua.h>
#include "economy.h"
#define COMMODITY_METATABLE "commodity" /**< Commodity metatable identifier. */
/**
* @brief Lua Commodity wrapper.
*/
typedef struct LuaCommodity_s {
Commodity *commodity; /**< Commodity pointer. */
} LuaCommodity; /**< Wrapper for a Commodity. */
/*
* Library loading
*/
int nlua_loadCommodity( lua_State *L, int readonly );
/*
* Commodity operations
*/
LuaCommodity* lua_tocommodity( lua_State *L, int ind );
LuaCommodity* luaL_checkcommodity( lua_State *L, int ind );
Commodity* luaL_validcommodity( lua_State *L, int ind );
LuaCommodity* lua_pushcommodity( lua_State *L, LuaCommodity commodity );
int lua_iscommodity( lua_State *L, int ind );
#endif /* NLUA_COMMODITY_H */