forked from github/server
- skriptbefehle um Schiffsküsten zu ändern und Nachbarregionen abzufragen.
This commit is contained in:
parent
91332068ce
commit
19a1da4552
|
@ -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", ®ion_addnotice)
|
||||
.def("get_flag", ®ion_getflag)
|
||||
.def("set_flag", ®ion_setflag)
|
||||
.def("next", ®ion_next)
|
||||
.def_readonly("x", ®ion::x)
|
||||
.def_readonly("y", ®ion::y)
|
||||
.def_readwrite("age", ®ion::age)
|
||||
|
|
|
@ -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)
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue