I'm sorry I have no experience with Lua, I have been looking at your code, but can't make much sense of it.
This is the part of the code your talking about, right ??
-- Gets rid of most single tile mountains in the oceans. -- Bobert13
for k = 1,#mountainTab,1 do
local i = mountainTab[k]
local plot = Map.GetPlotByIndex(i)
local tiles = GetSpiral(i,1,1)
local landCount = 0
for n=1,#tiles do
local ii = tiles[n]
if ii ~= -1 then
local nPlot = Map.GetPlotByIndex(ii)
if nPlot:GetPlotType() == PlotTypes.PLOT_HILLS then
landCount = landCount + 1
elseif nPlot:GetPlotType() == PlotTypes.PLOT_LAND then
landCount = landCount + 1
end
end
end
if landCount == 0 then
local roll1 = PWRandInt(1,4)
if roll1 == 1 then
plot:SetPlotType(PlotTypes.PLOT_LAND,false,true)
else
plot:SetPlotType(PlotTypes.PLOT_HILLS,false,true)
end
end
end