From 65a163b4d94498377f0e599b79f5483e4e4dfbec Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 5 May 2016 13:48:57 +0200 Subject: [PATCH 1/3] do not seed new factions if there isn't a minimum number of them --- scripts/eressea/autoseed.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/eressea/autoseed.lua b/scripts/eressea/autoseed.lua index 35c7f0e34..25a799ff4 100644 --- a/scripts/eressea/autoseed.lua +++ b/scripts/eressea/autoseed.lua @@ -69,12 +69,12 @@ end function autoseed.init() -- local newbs = {} - local num_seeded = 2 + local num_seeded = per_region local start = nil eressea.log.info('autoseed new players') players = read_players() - if players and #players > 0 then + if players and #players >= per_region then local sel eressea.log.info(#players .. ' new players') sel = select_regions(regions(), peasants, trees) From 21ee84dc65019aa5d963ab3dfc298d854256c99e Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 15 May 2016 10:35:23 +0200 Subject: [PATCH 2/3] autoseed barfs on blank lines, catch that case --- scripts/eressea/autoseed.lua | 2 +- src/buildno.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/eressea/autoseed.lua b/scripts/eressea/autoseed.lua index 25a799ff4..e5cd2e478 100644 --- a/scripts/eressea/autoseed.lua +++ b/scripts/eressea/autoseed.lua @@ -39,7 +39,7 @@ local function read_players() local str = input:read("*line") if str==nil then break end local email, race, lang = str:match("([^ ]*) ([^ ]*) ([^ ]*)") - if string.char(string.byte(email, 1))~='#' then + if email and string.char(string.byte(email, 1))~='#' then table.insert(players, { race = race, lang = lang, email = email }) end end diff --git a/src/buildno.h b/src/buildno.h index 7f9758de0..a8f4772c5 100644 --- a/src/buildno.h +++ b/src/buildno.h @@ -1,3 +1,3 @@ #define VERSION_MAJOR 3 #define VERSION_MINOR 8 -#define VERSION_BUILD 9 +#define VERSION_BUILD 10 From b5a84f07ba6a894b841c398ecb657a83cb54f305 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 17 May 2016 15:45:11 +0200 Subject: [PATCH 3/3] release version 3.8.11 - disable autoseed (endless loop) --- scripts/eressea/e2/init.lua | 2 +- src/buildno.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/eressea/e2/init.lua b/scripts/eressea/e2/init.lua index ed996c395..5bf6402cb 100644 --- a/scripts/eressea/e2/init.lua +++ b/scripts/eressea/e2/init.lua @@ -3,7 +3,7 @@ eressea.log.debug("rules for game E2") return { require('eressea'), - require('eressea.autoseed'), +-- require('eressea.autoseed'), require('eressea.xmas'), require('eressea.xmasitems'), require('eressea.wedding'), diff --git a/src/buildno.h b/src/buildno.h index a8f4772c5..7de3cac5f 100644 --- a/src/buildno.h +++ b/src/buildno.h @@ -1,3 +1,3 @@ #define VERSION_MAJOR 3 #define VERSION_MINOR 8 -#define VERSION_BUILD 10 +#define VERSION_BUILD 11