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 if [ -e reports/reports.txt ] ; then
echo "backup reports $TURN, game $GAME" 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 upload backup/$TURN-reports.tar.bz2
fi fi
files="data/$TURN.dat parteien.full parteien" files="data/$TURN.dat parteien.full parteien"

View File

@ -1,5 +1,5 @@
require 'tests.e2.carts' require 'tests.e2.carts'
require 'tests.e2.allies' require 'tests.e2.quit'
require 'tests.e2.movement' require 'tests.e2.movement'
require 'tests.e2.astral' require 'tests.e2.astral'
require 'tests.e2.spells' 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) 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; int i = 1;
if (f->msgs) {
mlist *ml; mlist *ml;
if (!self->msgs) {
return 0;
}
lua_newtable(L);
for (ml = self->msgs->begin; ml; ml = ml->next, ++i) { for (ml = self->msgs->begin; ml; ml = ml->next, ++i) {
char buf[120]; char buf[120];
nr_render(ml->msg, default_locale, buf, sizeof(buf), NULL); nr_render(ml->msg, default_locale, buf, sizeof(buf), NULL);
puts(buf); puts(buf);
} }
return 1; }
return 0;
} }
static int tolua_faction_get_messages(lua_State * L) static int tolua_faction_get_messages(lua_State * L)
{ {
faction *f = (faction *)tolua_tousertype(L, 1, NULL); faction *f = (faction *)tolua_tousertype(L, 1, NULL);
if (f->msgs) {
int i = 1; int i = 1;
mlist *ml; mlist *ml;
if (!f->msgs) {
return 0;
}
lua_newtable(L); lua_newtable(L);
for (ml = f->msgs->begin; ml; ml = ml->next, ++i) { for (ml = f->msgs->begin; ml; ml = ml->next, ++i) {
lua_pushnumber(L, i); lua_pushnumber(L, i);
@ -287,6 +284,8 @@ static int tolua_faction_get_messages(lua_State * L)
} }
return 1; return 1;
} }
return 0;
}
static int tolua_faction_count_msg_type(lua_State *L) { static int tolua_faction_count_msg_type(lua_State *L) {
faction *f = (faction *)tolua_tousertype(L, 1, NULL); faction *f = (faction *)tolua_tousertype(L, 1, NULL);