From 0b6f5aa064222c3cccea44966fd8baf2dd8ce4b6 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 28 Aug 2017 00:04:05 +0200 Subject: [PATCH] handle eressea.ini containing a 0 to disable modules --- scripts/eressea/autoseed.lua | 2 +- scripts/eressea/embassy.lua | 2 +- scripts/eressea/eternath.lua | 2 +- scripts/eressea/ponnuki.lua | 2 +- scripts/eressea/wedding.lua | 2 +- scripts/eressea/xmas.lua | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/eressea/autoseed.lua b/scripts/eressea/autoseed.lua index 2896708f8..10a33627f 100644 --- a/scripts/eressea/autoseed.lua +++ b/scripts/eressea/autoseed.lua @@ -1,4 +1,4 @@ -if not config.autoseed then return nil end +if not config.autoseed or config.autoseed==0 then return nil end local autoseed = {} -- minimum required resources in the 7-hex neighborhood: diff --git a/scripts/eressea/embassy.lua b/scripts/eressea/embassy.lua index 93ff66d7c..00b50b482 100644 --- a/scripts/eressea/embassy.lua +++ b/scripts/eressea/embassy.lua @@ -1,6 +1,6 @@ -- Muschelplateau -if not config.embassy then return nil end +if not config.embassy or config.embassy==0 then return nil end local embassy = {} local home = nil diff --git a/scripts/eressea/eternath.lua b/scripts/eressea/eternath.lua index 063577b74..208af0c8b 100644 --- a/scripts/eressea/eternath.lua +++ b/scripts/eressea/eternath.lua @@ -1,5 +1,5 @@ -- DEPRECATED -if not config.eternath then return nil end +if not config.eternath or config.eternath==0 then return nil end -- implements parts of a quest in E2 -- this module is deprecated, because it puts functions in the global environment for at_building_action diff --git a/scripts/eressea/ponnuki.lua b/scripts/eressea/ponnuki.lua index b5ba58fbe..3ead8c57c 100644 --- a/scripts/eressea/ponnuki.lua +++ b/scripts/eressea/ponnuki.lua @@ -1,4 +1,4 @@ -if not config.ponnuki then return nil end +if not config.ponnuki or config.ponnuki==0 then return nil end local ponnuki = {} local directions = { "NW", "NO", "O", "SO", "SW", "W" } diff --git a/scripts/eressea/wedding.lua b/scripts/eressea/wedding.lua index 2c06d9891..71664eec9 100644 --- a/scripts/eressea/wedding.lua +++ b/scripts/eressea/wedding.lua @@ -1,5 +1,5 @@ -- DEPRECATED -if not config.wedding then return nil end +if not config.wedding or config.wedding==0 then return nil end -- this script contains the action functions for the two portals -- used on the jadee/wildente wedding island. the two _action functions diff --git a/scripts/eressea/xmas.lua b/scripts/eressea/xmas.lua index 0316e6265..b728c9976 100644 --- a/scripts/eressea/xmas.lua +++ b/scripts/eressea/xmas.lua @@ -1,4 +1,4 @@ -if not config.xmas then return nil end +if not config.xmas or config.xmas==0 then return nil end local gifts = { e2 = {