forked from github/server
Merge branch 'develop' of github.com:ennorehling/eressea into develop
This commit is contained in:
commit
ddc23ca3ab
|
@ -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"
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue