forked from github/server
remove obsolete defines.
This commit is contained in:
parent
643883d539
commit
866abcc92c
|
@ -763,38 +763,6 @@ static int tolua_unit_get_spells(lua_State * L)
|
||||||
return tolua_selist_push(L, "spellbook", "spell_entry", slist);
|
return tolua_selist_push(L, "spellbook", "spell_entry", slist);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TOLUA_ORDERS_CLOSURE
|
|
||||||
/* TODO: this requires that the locale for write_order is included in the closure */
|
|
||||||
static int tolua_orderlist_next(lua_State * L)
|
|
||||||
{
|
|
||||||
order **order_ptr = (order **)lua_touserdata(L, lua_upvalueindex(1));
|
|
||||||
order *ord = *order_ptr;
|
|
||||||
if (ord != NULL) {
|
|
||||||
char cmd[8192];
|
|
||||||
write_order(ord, cmd, sizeof(cmd));
|
|
||||||
tolua_pushstring(L, cmd);
|
|
||||||
*order_ptr = ord->next;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int tolua_unit_get_orders(lua_State * L)
|
|
||||||
{
|
|
||||||
unit *self = (unit *)tolua_tousertype(L, 1, 0);
|
|
||||||
|
|
||||||
order **order_ptr = (order **)lua_newuserdata(L, sizeof(order *));
|
|
||||||
|
|
||||||
luaL_getmetatable(L, TOLUA_CAST "order");
|
|
||||||
lua_setmetatable(L, -2);
|
|
||||||
|
|
||||||
*order_ptr = self->orders;
|
|
||||||
|
|
||||||
lua_pushcclosure(L, tolua_orderlist_next, 1);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
static int tolua_unit_get_curse(lua_State *L) {
|
static int tolua_unit_get_curse(lua_State *L) {
|
||||||
unit *self = (unit *)tolua_tousertype(L, 1, 0);
|
unit *self = (unit *)tolua_tousertype(L, 1, 0);
|
||||||
const char *name = tolua_tostring(L, 2, 0);
|
const char *name = tolua_tostring(L, 2, 0);
|
||||||
|
@ -1006,9 +974,6 @@ void tolua_unit_open(lua_State * L)
|
||||||
|
|
||||||
tolua_function(L, TOLUA_CAST "add_order", tolua_unit_add_order);
|
tolua_function(L, TOLUA_CAST "add_order", tolua_unit_add_order);
|
||||||
tolua_function(L, TOLUA_CAST "clear_orders", tolua_unit_clear_orders);
|
tolua_function(L, TOLUA_CAST "clear_orders", tolua_unit_clear_orders);
|
||||||
#ifdef TOLUA_ORDERS_CLOSURE
|
|
||||||
tolua_variable(L, TOLUA_CAST "orders", tolua_unit_get_orders, 0);
|
|
||||||
#endif
|
|
||||||
tolua_function(L, TOLUA_CAST "get_curse", tolua_unit_get_curse);
|
tolua_function(L, TOLUA_CAST "get_curse", tolua_unit_get_curse);
|
||||||
tolua_function(L, TOLUA_CAST "has_attrib", tolua_unit_has_attrib);
|
tolua_function(L, TOLUA_CAST "has_attrib", tolua_unit_has_attrib);
|
||||||
|
|
||||||
|
|
|
@ -56,9 +56,7 @@ extern "C" {
|
||||||
|
|
||||||
extern const struct attrib_type at_learning;
|
extern const struct attrib_type at_learning;
|
||||||
|
|
||||||
#ifndef NO_TESTS
|
|
||||||
void inject_learn(learn_fun fun);
|
void inject_learn(learn_fun fun);
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue