From d94847072f9dcbc307b6fe29835ff0d32fdbaec0 Mon Sep 17 00:00:00 2001 From: Duane Date: Thu, 30 Jun 2016 13:58:18 -0500 Subject: [PATCH] Make villages optional. --- init.lua | 5 +++++ mapgen.lua | 2 +- settingtypes.txt | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 7c65c38..0c8b1d9 100644 --- a/init.lua +++ b/init.lua @@ -25,6 +25,11 @@ if fun_caves.breakable_wood == nil then fun_caves.breakable_wood = false end +fun_caves.use_villages = minetest.setting_getbool('fun_caves_use_villages') +if fun_caves.use_villages == nil then + fun_caves.use_villages = true +end + fun_caves.DEBUG = false -- for maintenance only diff --git a/mapgen.lua b/mapgen.lua index 435828e..68cf5c0 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -404,7 +404,7 @@ local function generate(p_minp, p_maxp, seed) if not write3 then write4, write_p4 = fun_caves.pyramid(minp, maxp, data, p2data, area, biomemap, biome_ids, node, heightmap) end - if biomemap and not (write3 or write4) then + if fun_caves.use_villages and biomemap and not (write3 or write4) then local biome = biome_ids[biomemap[40*80+40]] write5 = fun_caves.village(minp, maxp, data, p2data, area, node, biome, heightmap) end diff --git a/settingtypes.txt b/settingtypes.txt index b231dd2..18dee7f 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -9,3 +9,6 @@ fun_caves_exploding_fungi (Exploding Fungi) bool true # Unset this to make wook breakable by hand. fun_caves_breakable_wood (Breakable Wood) bool false + +# Unset this to remove primitive villages. +fun_caves_use_villages (Villages) bool true