forked from github/server
bindings for LEAVE command
This commit is contained in:
parent
09800b8387
commit
483615c458
|
@ -30,6 +30,7 @@ function test_process()
|
|||
assert_equal("function", _G.type(eressea.process.study))
|
||||
assert_equal("function", _G.type(eressea.process.movement))
|
||||
assert_equal("function", _G.type(eressea.process.use))
|
||||
assert_equal("function", _G.type(eressea.process.leave))
|
||||
end
|
||||
|
||||
function test_settings()
|
||||
|
|
|
@ -137,8 +137,19 @@ end
|
|||
function test_process_move()
|
||||
r2 = _G.region.create(1, 0, 'plain')
|
||||
u:add_order('NACH O')
|
||||
assert_not_equal(r2, u.region)
|
||||
eressea.process.update_long_order()
|
||||
eressea.process.movement()
|
||||
assert_equal(r2, u.region)
|
||||
end
|
||||
|
||||
function test_process_leave()
|
||||
r2 = _G.region.create(1, 0, 'plain')
|
||||
b = _G.building.create(r, "castle")
|
||||
u.building = b
|
||||
assert_equal(b, u.building)
|
||||
u:add_order('VERLASSEN')
|
||||
eressea.process.leave()
|
||||
assert_not_equal(b, u.building)
|
||||
end
|
||||
|
||||
|
|
|
@ -146,3 +146,7 @@ void process_movement(void) {
|
|||
void process_use(void) {
|
||||
process_cmd(K_USE, use_cmd);
|
||||
}
|
||||
|
||||
void process_leave(void) {
|
||||
process_cmd(K_LEAVE, leave_cmd);
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ void process_quit(void);
|
|||
void process_study(void);
|
||||
void process_movement(void);
|
||||
void process_use(void);
|
||||
void process_leave(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -18,5 +18,6 @@ module eressea {
|
|||
void process_study @ study(void); /* LEARN/TEACH */
|
||||
void process_movement @ movement(void); /* MOVE/FOLLOW/ROUTE */
|
||||
void process_use @ use(void); /* USE */
|
||||
void process_leave @ leave(void); /* LEAVE */
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue