From 03a28c64af9073c7c1e308280fccf4cf95969bf0 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 5 Feb 2004 19:04:58 +0000 Subject: [PATCH] racenames nach lua exportiert --- src/eressea/lua/unit.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) ]; }