- unit:add_notice
This commit is contained in:
Enno Rehling 2004-08-08 11:27:12 +00:00
parent cbce0fab74
commit d9ddf937ad
2 changed files with 17 additions and 0 deletions

View File

@ -187,6 +187,9 @@
<File <File
RelativePath=".\ugroup.h"> RelativePath=".\ugroup.h">
</File> </File>
<File
RelativePath=".\variable.h">
</File>
<File <File
RelativePath=".\viewrange.h"> RelativePath=".\viewrange.h">
</File> </File>
@ -257,6 +260,9 @@
<File <File
RelativePath=".\ugroup.c"> RelativePath=".\ugroup.c">
</File> </File>
<File
RelativePath=".\variable.c">
</File>
<File <File
RelativePath=".\viewrange.c"> RelativePath=".\viewrange.c">
</File> </File>

View File

@ -464,6 +464,12 @@ unit_capacity(const struct unit& u)
return walkingcapacity(&u); return walkingcapacity(&u);
} }
static void
unit_addnotice(unit& u, const char * str)
{
addmessage(u.region, u.faction, str, MSG_MESSAGE, ML_IMPORTANT);
}
void void
bind_unit(lua_State * L) bind_unit(lua_State * L)
{ {
@ -502,8 +508,13 @@ bind_unit(lua_State * L)
.def("eff_skill", &unit_effskill) .def("eff_skill", &unit_effskill)
.def("set_skill", &unit_setskill) .def("set_skill", &unit_setskill)
.def("add_notice", &unit_addnotice)
// npc logic:
.def("add_handler", &unit_addhandler) .def("add_handler", &unit_addhandler)
.def("set_brain", &unit_setscript) .def("set_brain", &unit_setscript)
.def("set_racename", &unit_setracename) .def("set_racename", &unit_setracename)
.def("add_spell", &unit_addspell) .def("add_spell", &unit_addspell)
.def("remove_spell", &unit_removespell) .def("remove_spell", &unit_removespell)