From b54effdc03a946a596c548687bf8e97c9b2ddf87 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Wed, 16 Oct 2019 22:55:26 +0200 Subject: [PATCH] do not change village height if village.keep_house_height is set --- mapgen.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mapgen.lua b/mapgen.lua index 995f719..463c3d4 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -1151,7 +1151,9 @@ mg_villages.place_villages_via_voxelmanip = function( villages, minp, maxp, vm, -- change height of those villages where an optimal_height could be determined local village_data_updated = false; for _,village in ipairs(villages) do - if( village.optimal_height and village.optimal_height > 0 and village.optimal_height ~= village.vh ) then + if( village.optimal_height and village.optimal_height > 0 and village.optimal_height ~= village.vh + -- no point in changing the village height if the houses are at a fixed height already + and not(village.keep_house_height)) then -- towers are usually found on elevated places if( village.village_type == 'tower' ) then village.optimal_height = village.optimal_height + math.max( math.floor(village.vs/2), 2 );