From a1eb4155879a141b8c2f2a2902ffd1e451a6431a Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Thu, 8 Aug 2019 18:20:36 -0600 Subject: [PATCH] add spindlestem to fungiwood caverns too, and increase warren coverage --- df_caverns/level1.lua | 6 ++++-- df_trees/spindlestem.lua | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/df_caverns/level1.lua b/df_caverns/level1.lua index f5061e2..8623b04 100644 --- a/df_caverns/level1.lua +++ b/df_caverns/level1.lua @@ -56,7 +56,7 @@ local tower_cap_cavern_floor = function(abs_cracks, vert_rand, vi, area, data, d elseif abs_cracks > 0.25 then if math.random() < 0.01 then 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) 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) elseif math.random() < 0.03 and abs_cracks > 0.35 then 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 @@ -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) end - if (not flooded_caverns) and biome_name ~= "barren" then + if biome_name ~= "barren" then local cracks = nvals_cracks[index2d] if cracks > 0.25 then local rand = math.random() diff --git a/df_trees/spindlestem.lua b/df_trees/spindlestem.lua index bf2d7d9..046a9c8 100644 --- a/df_trees/spindlestem.lua +++ b/df_trees/spindlestem.lua @@ -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 i = 0 local top = 0 + local index while i <= stem_height do index = vi + i * area.ystride if data[index] == c_air then