From efa7b16c87dc29fd96d5f692ffc62819f39f318d Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 17 Dec 2017 14:23:50 +0100 Subject: [PATCH 1/3] be less verbose in the log --- process/run-turn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/run-turn b/process/run-turn index c0d0d6a40..1690e496e 100755 --- a/process/run-turn +++ b/process/run-turn @@ -11,7 +11,7 @@ fi cd $ERESSEA/game-$GAME echo "running turn $TURN, game $GAME" -$ERESSEA/server/bin/eressea -v3 -t $TURN run-turn.lua +$ERESSEA/server/bin/eressea -t $TURN run-turn.lua mkdir -p log ln -f eressea.log log/eressea.log.$TURN From da81537c92645191e3caa7295425d22c5f87acf2 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 31 Dec 2017 11:24:21 +0100 Subject: [PATCH 2/3] bug 2402: xmas fix Conflicts: scripts/eressea/xmas.lua --- res/core/messages.xml | 12 ++++++++++++ scripts/eressea/xmas.lua | 24 ++++++++++-------------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/res/core/messages.xml b/res/core/messages.xml index 9b06b3f48..8606f0bd3 100644 --- a/res/core/messages.xml +++ b/res/core/messages.xml @@ -34,6 +34,18 @@ pulled by 8 young dragons flies through the stary night and presents your faction with a $resource($item,1). + + + + + 'Ho ho ho!' Ein dicker Gnom fliegt auf einem von + 8 Jungdrachen gezogenen Schlitten durch die Nacht und vermacht Deiner + Partei einen $resource($item,1). (Um diesen Gegenstand einer Einheit zu geben, gib + ihr den Befehl 'BEANSPRUCHE 1 $resource($item,1)'). + 'Ho ho ho!' A fat little gnome Gnom on a sled + pulled by 8 young dragons flies through the stary night and presents + your faction with a $resource($item,1). + diff --git a/scripts/eressea/xmas.lua b/scripts/eressea/xmas.lua index b728c9976..9fe368e42 100644 --- a/scripts/eressea/xmas.lua +++ b/scripts/eressea/xmas.lua @@ -2,15 +2,15 @@ if not config.xmas or config.xmas==0 then return nil end local gifts = { e2 = { - { year = 2015, turn = 959, item = 'snowglobe', msg='santa_f' }, - { year = 2009, turn = 624, item = 'xmastree' }, - { year = 2006, turn = 468, key = 'xm06', item = 'snowman' }, - { year = 2005, turn = 416, key = 'xm05', item = 'stardust' }, - { year = 2004, turn = 364, key = 'xm04', item = 'speedsail' } + [1057] = { year = 2017, item = 'snowglobe', msg='santa_f' }, + [959] = { year = 2015, item = 'snowglobe', msg='santa_f' }, + [624] = { year = 2009, item = 'xmastree', msg='santa_m' }, + [468] = { year = 2006, item = 'snowman', msg='santa_m' }, + [416] = { year = 2005, item = 'stardust' }, + [364] = { year = 2004, item = 'speedsail' } }, e3 = { - -- { year = 2015, turn = 338, item = 'snowglobe' }, - { year = 2009, turn = 26, key = 'xm09', item = 'xmastree' } + [26] = { year = 2009, item = 'xmastree' } } } @@ -37,13 +37,9 @@ function self.init() local turn = get_turn() local tbl = gifts[config.rules] if tbl then - for _, gift in ipairs(tbl) do - if turn == gift.turn then - give_gifts(gift) - elseif gift.key and not get_key(gift.key) then - give_gifts(gift) - set_key(gift.key) - end + gift = tbl[turn] + if gift then + give_gifts(gift) end end end From bd98cf1fbc38eb29d3b37a03e1d84f97db67e024 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 25 Nov 2017 11:29:52 +0100 Subject: [PATCH 3/3] on the Rapsberry Pi, long is only 32 bit --- src/kernel/unit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/unit.c b/src/kernel/unit.c index a3e6fc1ac..9b024851b 100644 --- a/src/kernel/unit.c +++ b/src/kernel/unit.c @@ -1063,7 +1063,7 @@ void clone_men(const unit * u, unit * dst, int n) transfer_curse(u, dst, n); } set_number(dst, dst->number + n); - dst->hp += (long)u->hp * n / u->number; + dst->hp += (long long)u->hp * n / u->number; assert(dst->hp >= dst->number); /* TODO: Das ist schnarchlahm! und gehoert nicht hierhin */ a = a_find(dst->attribs, &at_effect);