bind GIVE CONTROL to lua

This commit is contained in:
Enno Rehling 2012-06-17 17:55:46 -07:00
parent 648de4d36c
commit 1298684fd9
5 changed files with 15 additions and 0 deletions

View File

@ -41,6 +41,7 @@ function test_process()
assert_equal("function", _G.type(eressea.process.contact)) assert_equal("function", _G.type(eressea.process.contact))
assert_equal("function", _G.type(eressea.process.enter)) assert_equal("function", _G.type(eressea.process.enter))
assert_equal("function", _G.type(eressea.process.magic)) assert_equal("function", _G.type(eressea.process.magic))
assert_equal("function", _G.type(eressea.process.give_control))
end end
function test_settings() function test_settings()

View File

@ -213,6 +213,14 @@ function test_process_contact()
eressea.process.contact() eressea.process.contact()
end end
function test_process_battle()
eressea.process.battle()
end
function test_process_magic() function test_process_magic()
eressea.process.magic() eressea.process.magic()
end end
function test_process_give_control()
eressea.process.give_control()
end

View File

@ -207,6 +207,10 @@ void process_magic(void) {
magic(); magic();
} }
void process_give_control(void) {
process_cmd(K_CONTACT, give_control_cmd, 0);
}
void process_enter(int final) { void process_enter(int final) {
region * r; region * r;
for (r=regions; r; r=r->next) { for (r=regions; r; r=r->next) {

View File

@ -33,6 +33,7 @@ void process_sethelp(void);
void process_contact(void); void process_contact(void);
void process_enter(int final); void process_enter(int final);
void process_magic(void); void process_magic(void);
void process_give_control(void);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -30,5 +30,6 @@ module eressea {
void process_contact @ contact(void); /* CONTACT */ void process_contact @ contact(void); /* CONTACT */
void process_enter @ enter(int message); /* ENTER */ void process_enter @ enter(int message); /* ENTER */
void process_magic @ magic(void); /* CAST */ void process_magic @ magic(void); /* CAST */
void process_give_control @ give_control(void); /* GIVE CONTROL */
} }
} }