From 6296eafcd9778bb92003b040930aee48dad3edd6 Mon Sep 17 00:00:00 2001 From: Duane Date: Tue, 7 Jun 2016 09:02:42 -0500 Subject: [PATCH] Add Styx and giant sharks. --- mapgen.lua | 30 ++++++++++++++++++++++++++---- mobs.lua | 20 ++++++++++++++++++++ textures/fun_caves_albino.png | Bin 0 -> 5764 bytes 3 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 textures/fun_caves_albino.png diff --git a/mapgen.lua b/mapgen.lua index 6c5ee3c..ac89d64 100644 --- a/mapgen.lua +++ b/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 - data[ivm] = node["air"] + 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 - data[ivm] = node["air"] + 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 diff --git a/mobs.lua b/mobs.lua index 1bba63d..3401940 100644 --- a/mobs.lua +++ b/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 diff --git a/textures/fun_caves_albino.png b/textures/fun_caves_albino.png new file mode 100644 index 0000000000000000000000000000000000000000..fdc66698a83b110619f46895f24c7c2ccf2fa0e5 GIT binary patch literal 5764 zcmeAS@N?(olHy`uVBq!ia0y~yU;#2&7&zE~RK2WrGmv6S@^*It(m?Rjd3QaK;wRDPaLtODn@k z$S$Kv1U;}g7}OYmfDuFpfCz$22e2wo$<08JNt}rgD~U4^$x2!oPC{6a?s5_gNAfC> zOd1(ZNnnZwch#HFqplBhb zLPame6+k9pZ#g%BrHC_J0jzcq7*3pXk-SEV%Skbugs>QGTwo0>q(~yjq*W|}W1Loo zWA!!myf~Ufum%>vbb+LRX0h17$-uzi0K|}C5W-AS>O4|fE+kaZqwPLQ}&2-|cI_Vc`R!<~_`yG30MQfdsUr8&SaE W_D}eC{XOe