add spindlestem to fungiwood caverns too, and increase warren coverage

This commit is contained in:
FaceDeer 2019-08-08 18:20:36 -06:00
parent 4129641bcf
commit a1eb415587
2 changed files with 5 additions and 2 deletions

View File

@ -56,7 +56,7 @@ local tower_cap_cavern_floor = function(abs_cracks, vert_rand, vi, area, data, d
elseif abs_cracks > 0.25 then elseif abs_cracks > 0.25 then
if math.random() < 0.01 then if math.random() < 0.01 then
df_trees.spawn_tower_cap_vm(vi+ystride, area, data) df_trees.spawn_tower_cap_vm(vi+ystride, area, data)
elseif math.random() < 0.03 then elseif math.random() < 0.04 then
df_trees.spawn_spindlestem_vm(vi+ystride, area, data, data_param2, c_spindlestem_white) df_trees.spawn_spindlestem_vm(vi+ystride, area, data, data_param2, c_spindlestem_white)
end end
end end
@ -77,6 +77,8 @@ local fungiwood_cavern_floor = function(abs_cracks, vert_rand, vi, area, data, d
df_caverns.place_shrub(vi+ystride, area, data, data_param2, fungiwood_shrublist) df_caverns.place_shrub(vi+ystride, area, data, data_param2, fungiwood_shrublist)
elseif math.random() < 0.03 and abs_cracks > 0.35 then elseif math.random() < 0.03 and abs_cracks > 0.35 then
df_trees.spawn_fungiwood_vm(vi+ystride, area, data) df_trees.spawn_fungiwood_vm(vi+ystride, area, data)
elseif math.random() < 0.04 then
df_trees.spawn_spindlestem_vm(vi+ystride, area, data, data_param2)
end end
end end
end end
@ -219,7 +221,7 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false) df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false)
end end
if (not flooded_caverns) and biome_name ~= "barren" then if biome_name ~= "barren" then
local cracks = nvals_cracks[index2d] local cracks = nvals_cracks[index2d]
if cracks > 0.25 then if cracks > 0.25 then
local rand = math.random() local rand = math.random()

View File

@ -291,6 +291,7 @@ df_trees.spawn_spindlestem_vm = function(vi, area, data, data_param2, c_cap)
local param2 = math.random(1,4)-1 local param2 = math.random(1,4)-1
local i = 0 local i = 0
local top = 0 local top = 0
local index
while i <= stem_height do while i <= stem_height do
index = vi + i * area.ystride index = vi + i * area.ystride
if data[index] == c_air then if data[index] == c_air then