mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2024-12-25 02:10:37 +01:00
fix ice/oil on level 3, tweak some loot probabilities
This commit is contained in:
parent
ad5d64d901
commit
859f84686a
@ -49,14 +49,14 @@ bones_loot.register_loot({
|
||||
{name = "binoculars:binoculars", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "boats:boat", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "bucket:bucket_empty", chance = 0.3, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "fire:flint_and_steel", chance = 0.3, count = {1,2}, types = {"underworld_warrior"}},
|
||||
{name = "flowers:tulip_black", chance = 0.01, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "flowers:dandelion_white", chance = 0.01, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "flowers:dandelion_yellow", chance = 0.01, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "flowers:rose", chance = 0.01, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "flowers:tulip", chance = 0.01, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "flowers:chrysanthemum_green", chance = 0.01, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "flowers:geranium", chance = 0.01, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "fire:flint_and_steel", chance = 0.3, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "flowers:tulip_black", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "flowers:dandelion_white", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "flowers:dandelion_yellow", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "flowers:rose", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "flowers:tulip", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "flowers:chrysanthemum_green", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "flowers:geranium", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "map:mapping_kit", chance = 0.1, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "screwdriver:screwdriver", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
-- don't give the player tnt:tnt, they can craft that from this if tnt is enabled for them
|
||||
@ -76,10 +76,10 @@ bones_loot.register_loot({
|
||||
{name = "default:pick_steel", chance = 0.1, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:pick_mese", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:pick_diamond", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:shovel_bronze", chance = 0.15, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:shovel_steel", chance = 0.1, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:shovel_mese", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:shovel_diamond", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:shovel_bronze", chance = 0.1, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:shovel_steel", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:shovel_mese", chance = 0.025, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:shovel_diamond", chance = 0.025, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:axe_bronze", chance = 0.3, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:axe_steel", chance = 0.5, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:axe_mese", chance = 0.15, count = {1,1}, types = {"underworld_warrior"}},
|
||||
|
@ -28,7 +28,7 @@ if minetest.get_modpath("ice_sprites") then
|
||||
c_sprite = minetest.get_content_id("ice_sprites:ice_sprite")
|
||||
end
|
||||
|
||||
local subsea_level = df_caverns.config.level3_min - (df_caverns.config.level3_min - df_caverns.config.level2_min) * 0.33
|
||||
local subsea_level = math.floor(df_caverns.config.level3_min - (df_caverns.config.level3_min - df_caverns.config.level2_min) * 0.33)
|
||||
local flooding_threshold = math.min(df_caverns.config.tunnel_flooding_threshold, df_caverns.config.cavern_threshold)
|
||||
|
||||
local ice_thickness = 3
|
||||
@ -208,7 +208,8 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
-- Partly fill flooded caverns and warrens
|
||||
if minp.y <= subsea_level then
|
||||
for vi, x, y, z in area:iterp_yxz(area.MinEdge, area.MaxEdge) do
|
||||
if y <= subsea_level and nvals_cave[vi] < -flooding_threshold then
|
||||
local cave = nvals_cave[vi]
|
||||
if y <= subsea_level and cave < -flooding_threshold then
|
||||
if data[vi] == c_air and y <= subsea_level then
|
||||
data[vi] = c_water
|
||||
end
|
||||
@ -218,8 +219,7 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
|
||||
if biome_name == "blackcap" then
|
||||
-- oil slick
|
||||
local cave = math.abs(nvals_cave[vi])
|
||||
if y == subsea_level and data[vi] == c_water and cave + nvals_cracks[index2d]*0.025 < cavern_def.cave_threshold + 0.1 then
|
||||
if y == subsea_level and data[vi] == c_water and math.abs(cave) + nvals_cracks[index2d]*0.025 < cavern_def.cave_threshold + 0.1 then
|
||||
data[vi] = c_oil
|
||||
end
|
||||
elseif biome_name == "bloodnether" and y <= subsea_level and y > subsea_level - ice_thickness and data[vi] == c_water then
|
||||
|
@ -233,6 +233,8 @@ df_caverns.is_ground_content = function(c_node)
|
||||
end
|
||||
end
|
||||
end
|
||||
dfcaverns_nodes[minetest.get_content_id("default:ice")] = true -- needed for nethercap cavern water covering
|
||||
dfcaverns_nodes[minetest.get_content_id("oil:oil_source")] = true -- needed for blackcap oil slicks
|
||||
dfcaverns_mods = nil
|
||||
return not dfcaverns_nodes[c_node]
|
||||
end
|
Loading…
Reference in New Issue
Block a user