racenames nach lua exportiert

This commit is contained in:
Enno Rehling 2004-02-05 19:04:58 +00:00
parent 4910a42db0
commit 03a28c64af
1 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,9 @@
#include <config.h>
#include <eressea.h>
// Atributes includes
#include <attributes/racename.h>
// kernel includes
#include <kernel/region.h>
#include <kernel/item.h>
@ -31,6 +34,12 @@ unit_setnumber(unit& u, int number)
}
}
static void
unit_setracename(unit& u, const char * name)
{
set_racename(&u.attribs, name);
}
static int
unit_getnumber(const unit& u)
{
@ -108,6 +117,7 @@ bind_unit(lua_State * L)
.def("get_skill", &unit_getskill)
.def("eff_skill", &unit_effskill)
.def("set_skill", &unit_setskill)
.def("set_racename", &unit_setracename)
.property("number", &unit_getnumber, &unit_setnumber)
];
}