Add Styx and giant sharks.
This commit is contained in:
parent
87c065153a
commit
6296eafcd9
3 changed files with 46 additions and 4 deletions
26
mapgen.lua
26
mapgen.lua
|
@ -336,7 +336,14 @@ local function generate(p_minp, p_maxp, seed)
|
|||
|
||||
for y = minp.y, maxp.y do
|
||||
-- Dis
|
||||
if underzone == 3 then
|
||||
if underzone == 6 and y % 4960 < cave_3[index] + 160 and y % 4960 > cave_3[index] + 80 then
|
||||
if y < -29620 then
|
||||
data[ivm] = node["default:water_source"]
|
||||
else
|
||||
data[ivm] = node["air"]
|
||||
end
|
||||
write = true
|
||||
elseif underzone == 3 then
|
||||
if (x - minp.x) < 8 and (z - minp.z) < 8 then
|
||||
data[ivm] = node["default:steelblock"]
|
||||
elseif data[ivm] ~= node['air'] and y % 4960 < 160 and y % 4960 > 80 then
|
||||
|
@ -357,10 +364,18 @@ local function generate(p_minp, p_maxp, seed)
|
|||
write = true
|
||||
-- Dis
|
||||
elseif column == 1 and underzone ~= 3 and data[ivm] ~= node['air'] and y % 4960 < cave_3[index] + 160 and y % 4960 > cave_3[index] + 80 then
|
||||
if y < -29620 then
|
||||
data[ivm] = node["default:water_source"]
|
||||
else
|
||||
data[ivm] = node["air"]
|
||||
end
|
||||
write = true
|
||||
elseif column < 2 and underzone ~= 3 and data[ivm] ~= node['air'] and y < height - cave_3[index] and cave_1[index3d] * cave_2[index3d] > cave_width then
|
||||
if y < -29620 then
|
||||
data[ivm] = node["default:water_source"]
|
||||
else
|
||||
data[ivm] = node["air"]
|
||||
end
|
||||
write = true
|
||||
|
||||
if y > 0 and cave_3[index] < 1 and y == height then
|
||||
|
@ -421,6 +436,9 @@ local function generate(p_minp, p_maxp, seed)
|
|||
elseif underzone == 3 then
|
||||
stone_type = node["fun_caves:hot_brass"]
|
||||
stone_depth = 1
|
||||
elseif underzone == 6 then
|
||||
stone_type = node["default:dirt"]
|
||||
stone_depth = 2
|
||||
elseif underzone and y % 4960 <= 145 then
|
||||
stone_type = node["fun_caves:hot_cobble"]
|
||||
elseif underzone and y % 4960 > 145 then
|
||||
|
@ -440,6 +458,10 @@ local function generate(p_minp, p_maxp, seed)
|
|||
stone_type = node["fun_caves:stone_with_lichen"]
|
||||
elseif biome_val < 0.2 then
|
||||
stone_type = node["fun_caves:stone_with_algae"]
|
||||
elseif y < 29620 then
|
||||
-- This is seperate to prevent the hot biomes spawning underwater.
|
||||
stone_type = node["default:dirt"]
|
||||
stone_depth = 2
|
||||
elseif biome_val < 0.35 then
|
||||
stone_type = node["fun_caves:stone_with_salt"]
|
||||
stone_depth = 2
|
||||
|
@ -463,7 +485,7 @@ local function generate(p_minp, p_maxp, seed)
|
|||
if data[ivm] == node["default:stone"] then
|
||||
local air_above = false
|
||||
for i = 1, stone_depth do
|
||||
if data[ivm + area.ystride * i] == node["air"] then
|
||||
if data[ivm + area.ystride * i] == node["air"] or (y < 29620 and data[ivm + area.ystride * i] == node["default:water_source"]) then
|
||||
air_above = true
|
||||
end
|
||||
end
|
||||
|
|
20
mobs.lua
20
mobs.lua
|
@ -273,6 +273,26 @@ if minetest.registered_entities["mobs_creeper:creeper"] then
|
|||
)
|
||||
end
|
||||
|
||||
if minetest.registered_entities["mobs_sharks:shark_lg"] then
|
||||
local m = table.copy(minetest.registered_entities["mobs_sharks:shark_lg"])
|
||||
local l_spawn_in = {"default:water_flowing","default:water_source"}
|
||||
local l_spawn_near = {"default:water_flowing","default:water_source","seawrecks:woodship","seawrecks:uboot"}
|
||||
|
||||
m.damage = 15
|
||||
m.hp_min = 40
|
||||
m.hp_max = 50
|
||||
m.visual_size = {x=3, y=3}
|
||||
m.collisionbox = {-2, -1.5, -2, 2, 1.5, 2}
|
||||
m.textures = {"fun_caves_albino.png"}
|
||||
m.base_texture = m.textures[1]
|
||||
|
||||
minetest.registered_entities["fun_caves:shark_giant"] = m
|
||||
mobs.spawning_mobs["fun_caves:shark_giant"] = true
|
||||
|
||||
mobs:spawn_specific("fun_caves:shark_giant", l_spawn_in, l_spawn_near, -1, 20, 30, 60000, 1, -31000, -29620)
|
||||
mobs:register_egg("fun_caves:shark_md", "Shark (giant)", l_egg_texture, 0)
|
||||
end
|
||||
|
||||
|
||||
fun_caves.goblin_spawn_frequency = 150
|
||||
fun_caves.goblin_trap_freq = 25
|
||||
|
|
BIN
textures/fun_caves_albino.png
Normal file
BIN
textures/fun_caves_albino.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
Loading…
Add table
Add a link
Reference in a new issue