forked from github/server
Merge branch 'master' into develop
This commit is contained in:
commit
ade50af60b
|
@ -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"
|
||||||
|
|
|
@ -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'
|
||||||
|
|
|
@ -256,36 +256,35 @@ 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;
|
||||||
mlist *ml;
|
if (f->msgs) {
|
||||||
if (!self->msgs) {
|
mlist *ml;
|
||||||
return 0;
|
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);
|
return 0;
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
||||||
int i = 1;
|
|
||||||
mlist *ml;
|
if (f->msgs) {
|
||||||
if (!f->msgs) {
|
int i = 1;
|
||||||
return 0;
|
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);
|
return 0;
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int tolua_faction_count_msg_type(lua_State *L) {
|
static int tolua_faction_count_msg_type(lua_State *L) {
|
||||||
|
|
Loading…
Reference in New Issue