- skriptbefehle um Schiffsküsten zu ändern und Nachbarregionen abzufragen.

This commit is contained in:
Enno Rehling 2004-06-15 23:29:27 +00:00
parent 91332068ce
commit 19a1da4552
2 changed files with 9 additions and 0 deletions

View File

@ -134,6 +134,13 @@ terraform_region(int x, int y, const char * tname)
return r;
}
static region *
region_next(const region& r, int dir)
{
if (dir<0 || dir >=MAXDIRECTIONS) return NULL;
return r_connect(&r, (direction_t)dir);
}
void
bind_region(lua_State * L)
{
@ -151,6 +158,7 @@ bind_region(lua_State * L)
.def("add_notice", &region_addnotice)
.def("get_flag", &region_getflag)
.def("set_flag", &region_setflag)
.def("next", &region_next)
.def_readonly("x", &region::x)
.def_readonly("y", &region::y)
.def_readwrite("age", &region::age)

View File

@ -25,5 +25,6 @@ bind_ship(lua_State * L)
.def_readonly("info", &ship::display)
.def_readwrite("damage", &ship::damage)
.def_readwrite("size", &ship::size)
.def_readwrite("coast", &ship::coast)
];
}