diff --git a/process/backup-eressea b/process/backup-eressea index 3944a9221..7b5ac5f0e 100755 --- a/process/backup-eressea +++ b/process/backup-eressea @@ -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" diff --git a/scripts/tests/e2/init.lua b/scripts/tests/e2/init.lua index afe0ac5ad..28d7ebc9b 100644 --- a/scripts/tests/e2/init.lua +++ b/scripts/tests/e2/init.lua @@ -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' diff --git a/src/bind_faction.c b/src/bind_faction.c index 56164785d..07121d530 100644 --- a/src/bind_faction.c +++ b/src/bind_faction.c @@ -256,36 +256,35 @@ 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; - mlist *ml; - if (!self->msgs) { - return 0; + if (f->msgs) { + mlist *ml; + 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); + } } - 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); - int i = 1; - mlist *ml; - if (!f->msgs) { - return 0; + + if (f->msgs) { + int i = 1; + mlist *ml; + lua_newtable(L); + for (ml = f->msgs->begin; ml; ml = ml->next, ++i) { + lua_pushnumber(L, i); + lua_pushstring(L, ml->msg->type->name); + lua_rawset(L, -3); + } + return 1; } - lua_newtable(L); - for (ml = f->msgs->begin; ml; ml = ml->next, ++i) { - lua_pushnumber(L, i); - lua_pushstring(L, ml->msg->type->name); - lua_rawset(L, -3); - } - return 1; + return 0; } static int tolua_faction_count_msg_type(lua_State *L) {