diff --git a/src/eressea/lua/unit.cpp b/src/eressea/lua/unit.cpp index 5f083a991..95f429c0b 100644 --- a/src/eressea/lua/unit.cpp +++ b/src/eressea/lua/unit.cpp @@ -1,6 +1,9 @@ #include #include +// Atributes includes +#include + // kernel includes #include #include @@ -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) ]; }