forked from github/server
binding COMBATSPELL to Lua
This commit is contained in:
parent
d880bf281a
commit
d02857ebb9
|
@ -36,6 +36,7 @@ function test_process()
|
|||
assert_equal("function", _G.type(eressea.process.promote))
|
||||
assert_equal("function", _G.type(eressea.process.renumber))
|
||||
assert_equal("function", _G.type(eressea.process.restack))
|
||||
assert_equal("function", _G.type(eressea.process.set_spells))
|
||||
end
|
||||
|
||||
function test_settings()
|
||||
|
|
|
@ -190,6 +190,10 @@ void process_restack(void) {
|
|||
restack_units();
|
||||
}
|
||||
|
||||
void process_setspells(void) {
|
||||
process_cmd(K_COMBATSPELL, combatspell_cmd, 0);
|
||||
}
|
||||
|
||||
void process_maintenance(void) {
|
||||
region * r;
|
||||
for (r=regions; r; r=r->next) {
|
||||
|
|
|
@ -28,6 +28,7 @@ void process_maintenance(void);
|
|||
void process_promote(void);
|
||||
void process_renumber(void);
|
||||
void process_restack(void);
|
||||
void process_setspells(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -25,5 +25,6 @@ module eressea {
|
|||
void process_promote @ promote(void); /* PROMOTE */
|
||||
void process_renumber @ renumber(void); /* RENUMBER */
|
||||
void process_restack @ restack(void); /* SORT */
|
||||
void process_setspells @ set_spells(void); /* COMBATSPELL */
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2838,7 +2838,7 @@ int status_cmd(unit * u, struct order *ord)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int combatspell_cmd(unit * u, struct order *ord)
|
||||
int combatspell_cmd(unit * u, struct order *ord)
|
||||
{
|
||||
const char *s;
|
||||
int level = 0;
|
||||
|
|
|
@ -75,6 +75,7 @@ extern "C" {
|
|||
extern int pay_cmd(struct unit *u, struct order *ord);
|
||||
extern int promotion_cmd(struct unit *u, struct order *ord);
|
||||
extern int renumber_cmd(struct unit *u, struct order *ord);
|
||||
extern int combatspell_cmd(struct unit *u, struct order *ord);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue