Merge branch 'master' into develop

This commit is contained in:
Enno Rehling 2019-09-23 17:37:02 +02:00
commit ade50af60b
3 changed files with 23 additions and 24 deletions

View File

@ -32,7 +32,7 @@ fi
if [ -e reports/reports.txt ] ; then
echo "backup reports $TURN, game $GAME"
tar cjf backup/$TURN-reports.tar.bz2 reports
tar cjf backup/$TURN-reports.tar.bz2 reports eressea.db
upload backup/$TURN-reports.tar.bz2
fi
files="data/$TURN.dat parteien.full parteien"

View File

@ -1,5 +1,5 @@
require 'tests.e2.carts'
require 'tests.e2.allies'
require 'tests.e2.quit'
require 'tests.e2.movement'
require 'tests.e2.astral'
require 'tests.e2.spells'

View File

@ -256,29 +256,26 @@ static int tolua_faction_setkey(lua_State * L)
static int tolua_faction_debug_messages(lua_State * L)
{
faction *self = (faction *)tolua_tousertype(L, 1, NULL);
faction *f = (faction *)tolua_tousertype(L, 1, NULL);
int i = 1;
if (f->msgs) {
mlist *ml;
if (!self->msgs) {
return 0;
}
lua_newtable(L);
for (ml = self->msgs->begin; ml; ml = ml->next, ++i) {
char buf[120];
nr_render(ml->msg, default_locale, buf, sizeof(buf), NULL);
puts(buf);
}
return 1;
}
return 0;
}
static int tolua_faction_get_messages(lua_State * L)
{
faction *f = (faction *)tolua_tousertype(L, 1, NULL);
if (f->msgs) {
int i = 1;
mlist *ml;
if (!f->msgs) {
return 0;
}
lua_newtable(L);
for (ml = f->msgs->begin; ml; ml = ml->next, ++i) {
lua_pushnumber(L, i);
@ -286,6 +283,8 @@ static int tolua_faction_get_messages(lua_State * L)
lua_rawset(L, -3);
}
return 1;
}
return 0;
}
static int tolua_faction_count_msg_type(lua_State *L) {