Skip to content

Commit

Permalink
Tweaks, fixes, and actual v0.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
GoogleFrog committed Sep 10, 2019
1 parent fe2bc89 commit e34529d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions luarules/gadgets/TreesPlacer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ end

local minTreeHeight = 10
local maxTreeHeight = 600
local minDistance = 40
local density = 0.5
local minDistance = 50
local density = 0.8

local floor = math.floor
local ceil = math.ceil
Expand Down Expand Up @@ -118,7 +118,7 @@ function gadget:Initialize()
if py > minTreeHeight and py < maxTreeHeight and
math.random(1, getHeightDensity(py, invDensity)) == 1 and
math.random() < GetTreeSlopeChance(px, pz) and
math.random() < GetCellTreeDensity(px, pz) then
math.random() < GetCellTreeDensity(x, z) then

local rx, rz = floor(px/16), floor(pz/16)
if not (avoidMex[rx] and avoidMex[rx][rz]) then
Expand Down
8 changes: 8 additions & 0 deletions luarules/gadgets/map_terrain_generator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1561,6 +1561,12 @@ local function SetEdgeSoloTerrain(edge)
return
end

if #edge.faces == 1 and edge.faces[1].isMainStartPos then
return
elseif #edge.faces == 2 and edge.faces[1].isStartPos and edge.faces[2].isStartPos then
return
end

local nonFlatNeighbours = 0
local thresholdLength = 400
local nearCliff = false
Expand All @@ -1586,6 +1592,8 @@ local function SetEdgeSoloTerrain(edge)
return
end



local fullyFlat = (nonFlatNeighbours == 0 and edge.teirDiff == 0)
if edge.teirDiff > 0 then
thresholdLength = thresholdLength*0.5
Expand Down
2 changes: 1 addition & 1 deletion mapinfo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local mapinfo = {
shortname = "RCrags",
description = "A sometimes-craggy, sometimes flat random map (12x12)",
author = "GoogleFrog",
version = "v0.4",
version = "v0.5",
modtype = 3, --// 1=primary, 0=hidden, 3=map

maphardness = 140,
Expand Down

0 comments on commit e34529d

Please sign in to comment.