Adjust mushrooms and goblins.
Remove dirt from desert caves.
This commit is contained in:
parent
11e404c23a
commit
c93090b4e8
12 changed files with 39 additions and 38 deletions
|
@ -14,9 +14,9 @@ function fun_caves.decorate_cave(data, area, minp, y, ivm, biome_val_in)
|
|||
local stone_type = node("default:stone")
|
||||
local stone_depth = 1
|
||||
|
||||
if y > -500 then
|
||||
biome_val = biome_val / math.max(1, math.log(500 + y))
|
||||
end
|
||||
--if y > -500 then
|
||||
-- biome_val = biome_val / math.max(1, math.log(500 + y))
|
||||
--end
|
||||
-------------------
|
||||
--biome_val = 0.7
|
||||
-------------------
|
||||
|
@ -62,7 +62,7 @@ function fun_caves.decorate_cave(data, area, minp, y, ivm, biome_val_in)
|
|||
end
|
||||
end
|
||||
|
||||
if node_above == node("air") and (stone_type == node("fun_caves:stone_with_algae") or stone_type == node("fun_caves:stone_with_lichen")) and math.random(4) == 1 then
|
||||
if node_above == node("air") and (stone_type == node("fun_caves:stone_with_algae") or stone_type == node("fun_caves:stone_with_lichen")) and math.random(10) == 1 then
|
||||
return node("dirt")
|
||||
end
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
mobs:register_mob("fun_caves:goblin_coal", {
|
||||
description = "Coal Goblin",
|
||||
type = "animal",
|
||||
type = "monster",
|
||||
passive = false,
|
||||
damage = 1,
|
||||
attack_type = "dogfight",
|
||||
|
@ -110,7 +110,7 @@ mobs:register_mob("fun_caves:goblin_coal", {
|
|||
do_custom = function(self)
|
||||
fun_caves.search_replace(self.object:getpos(), 5, {"default:torch"}, "air")
|
||||
fun_caves.search_replace(self.object:getpos(), 20, {"default:stone"}, "default:mossycobble")
|
||||
fun_caves.search_replace(self.object:getpos(), 50, {"group:stone"}, "fun_caves:stone_with_coal_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), 500, {"group:stone"}, "fun_caves:stone_with_coal_trap")
|
||||
|
||||
fun_caves.surface_damage(self)
|
||||
end,
|
||||
|
@ -124,7 +124,7 @@ minetest.register_node("fun_caves:stone_with_coal_trap", {
|
|||
description = "Coal Trap",
|
||||
tiles = {"default_cobble.png^default_mineral_coal.png"},
|
||||
groups = {cracky = 3},
|
||||
drop = 'default:coal_lump',
|
||||
--drop = 'default:coal_lump',
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
mobs:register_mob("fun_caves:goblin_cobble", {
|
||||
description = "Cobble Goblin",
|
||||
type = "animal",
|
||||
passive = true,
|
||||
type = "monster",
|
||||
passive = false,
|
||||
damage = 1,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
|
|
|
@ -110,7 +110,7 @@ mobs:register_mob("fun_caves:goblin_copper", {
|
|||
do_custom = function(self)
|
||||
fun_caves.search_replace(self.object:getpos(), 5, 1, {"default:torch"}, "air")
|
||||
fun_caves.search_replace(self.object:getpos(), 20, 1, {"default:stone"}, "default:mossycobble")
|
||||
fun_caves.search_replace(self.object:getpos(), 50, 5, {"group:stone"}, "fun_caves:stone_with_copper_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_copper_trap")
|
||||
|
||||
fun_caves.surface_damage(self)
|
||||
end,
|
||||
|
@ -123,7 +123,7 @@ minetest.register_node("fun_caves:stone_with_copper_trap", {
|
|||
description = "Copper Trap",
|
||||
tiles = {"default_cobble.png^default_mineral_copper.png"},
|
||||
groups = {cracky = 3},
|
||||
drop = 'default:copper_lump',
|
||||
--drop = 'default:copper_lump',
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
|
|
@ -112,7 +112,7 @@ mobs:register_mob("fun_caves:goblin_diamond", {
|
|||
do_custom = function(self)
|
||||
fun_caves.search_replace(self.object:getpos(), 5, 1, {"default:torch"}, "air")
|
||||
fun_caves.search_replace(self.object:getpos(), 20, 1, {"default:stone"}, "default:mossycobble")
|
||||
fun_caves.search_replace(self.object:getpos(), 50, 5, {"group:stone"}, "fun_caves:stone_with_diamond_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_diamond_trap")
|
||||
|
||||
fun_caves.surface_damage(self)
|
||||
end,
|
||||
|
@ -126,7 +126,7 @@ minetest.register_node("fun_caves:stone_with_diamond_trap", {
|
|||
description = "Diamond Trap",
|
||||
tiles = {"default_cobble.png^default_mineral_diamond.png"},
|
||||
groups = {cracky = 3},
|
||||
drop = 'default:diamond',
|
||||
--drop = 'default:diamond',
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
|
|
@ -97,8 +97,8 @@ end
|
|||
|
||||
mobs:register_mob("fun_caves:goblin_digger", {
|
||||
description = "Digger Goblin",
|
||||
type = "animal",
|
||||
passive = true,
|
||||
type = "monster",
|
||||
passive = false,
|
||||
damage = 1,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
|
|
|
@ -110,7 +110,7 @@ mobs:register_mob("fun_caves:goblin_gold", {
|
|||
do_custom = function(self)
|
||||
fun_caves.search_replace(self.object:getpos(), 5, 1, {"default:torch"}, "air")
|
||||
fun_caves.search_replace(self.object:getpos(), 20, 1, {"default:stone"}, "default:mossycobble")
|
||||
fun_caves.search_replace(self.object:getpos(), 50, 5, {"group:stone"}, "fun_caves:stone_with_gold_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_gold_trap")
|
||||
|
||||
fun_caves.surface_damage(self)
|
||||
end,
|
||||
|
@ -219,7 +219,7 @@ minetest.register_node("fun_caves:stone_with_gold_trap", {
|
|||
description = "Gold Trap",
|
||||
tiles = {"default_cobble.png^default_mineral_gold.png"},
|
||||
groups = {cracky = 3},
|
||||
drop = 'default:gold_lump',
|
||||
--drop = 'default:gold_lump',
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
|
|
@ -109,7 +109,7 @@ mobs:register_mob("fun_caves:goblin_ice", {
|
|||
do_custom = function(self)
|
||||
fun_caves.search_replace(self.object:getpos(), 5, {"default:torch"}, "air")
|
||||
--fun_caves.search_replace(self.object:getpos(), 20, {"default:stone"}, "default:mossycobble")
|
||||
fun_caves.search_replace(self.object:getpos(), 50, {"default:ice"}, "fun_caves:ice_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), 500, {"default:ice"}, "fun_caves:ice_trap")
|
||||
|
||||
fun_caves.surface_damage(self, true)
|
||||
end,
|
||||
|
|
|
@ -112,7 +112,7 @@ mobs:register_mob("fun_caves:goblin_iron", {
|
|||
do_custom = function(self)
|
||||
fun_caves.search_replace(self.object:getpos(), 5, 1, {"default:torch"}, "air")
|
||||
fun_caves.search_replace(self.object:getpos(), 20, 1, {"default:stone"}, "default:mossycobble")
|
||||
fun_caves.search_replace(self.object:getpos(), 50, 5, {"group:stone"}, "fun_caves:stone_with_iron_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_iron_trap")
|
||||
|
||||
fun_caves.surface_damage(self)
|
||||
end,
|
||||
|
@ -125,7 +125,7 @@ minetest.register_node("fun_caves:stone_with_iron_trap", {
|
|||
description = "Iron Trap",
|
||||
tiles = {"default_cobble.png^default_mineral_iron.png"},
|
||||
groups = {cracky = 3},
|
||||
drop = 'default:iron_lump',
|
||||
--drop = 'default:iron_lump',
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
|
|
@ -111,11 +111,11 @@ mobs:register_mob("fun_caves:goblin_king", {
|
|||
do_custom = function(self)
|
||||
fun_caves.search_replace(self.object:getpos(), 2, {"default:torch"}, "air")
|
||||
fun_caves.search_replace(self.object:getpos(), 20, {"default:stone"}, "default:mossycobble")
|
||||
fun_caves.search_replace(self.object:getpos(), 50, {"default:mossycobble"}, "fun_caves:mossycobble_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), 50, {"group:stone"}, "fun_caves:stone_with_coal_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), 50, 5, {"group:stone"}, "fun_caves:stone_with_copper_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), 50, 5, {"group:stone"}, "fun_caves:stone_with_gold_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), 50, 5, {"group:stone"}, "fun_caves:stone_with_iron_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), 500, {"default:mossycobble"}, "fun_caves:mossycobble_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), 500, {"group:stone"}, "fun_caves:stone_with_coal_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_copper_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_gold_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_iron_trap")
|
||||
|
||||
fun_caves.surface_damage(self)
|
||||
end,
|
||||
|
|
|
@ -208,7 +208,8 @@ function fun_caves.generate(p_minp, p_maxp, seed)
|
|||
if bullshit_heightmap or y <= heightmap[index] - 20 then
|
||||
data[ivm] = fun_caves.decorate_cave(data, area, minp, y, ivm, biome_n[index3d]) or data[ivm]
|
||||
elseif y < heightmap[index] and not bullshit_heightmap then
|
||||
if data[ivm] == node("air") and data[ivm - area.ystride] ~= node('air') then
|
||||
--if data[ivm] == node("air") and data[ivm - area.ystride] ~= node('air') then
|
||||
if data[ivm] == node("air") and (data[ivm - area.ystride] == node('default:stone') or data[ivm - area.ystride] == node('default:sandstone')) then
|
||||
data[ivm - area.ystride] = node("dirt")
|
||||
end
|
||||
else
|
||||
|
|
24
nodes.lua
24
nodes.lua
|
@ -423,8 +423,8 @@ end)
|
|||
-- mushroom growth
|
||||
minetest.register_abm({
|
||||
nodenames = {"flowers:mushroom_brown", "flowers:mushroom_red"},
|
||||
interval = 50 * fun_caves.time_factor,
|
||||
chance = 100,
|
||||
interval = 200 * fun_caves.time_factor,
|
||||
chance = 25,
|
||||
action = function(pos, node)
|
||||
local pos_up = {x=pos.x,y=pos.y+1,z=pos.z}
|
||||
local node_up = minetest.get_node_or_nil(pos_up)
|
||||
|
@ -449,8 +449,8 @@ minetest.register_abm({
|
|||
-- mushroom growth
|
||||
minetest.register_abm({
|
||||
nodenames = {"fun_caves:huge_mushroom_cap"},
|
||||
interval = 100 * fun_caves.time_factor,
|
||||
chance = 150,
|
||||
interval = 500 * fun_caves.time_factor,
|
||||
chance = 30,
|
||||
action = function(pos, node)
|
||||
if minetest.get_node_light(pos, nil) >= 14 then
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
|
@ -483,8 +483,8 @@ minetest.register_abm({
|
|||
-- mushroom growth
|
||||
minetest.register_abm({
|
||||
nodenames = {"fun_caves:giant_mushroom_stem"},
|
||||
interval = 5 * fun_caves.time_factor,
|
||||
chance = 5,
|
||||
interval = 15 * fun_caves.time_factor,
|
||||
chance = 10,
|
||||
action = function(pos, node)
|
||||
local pos_up = {x=pos.x,y=pos.y+1,z=pos.z}
|
||||
local node_up = minetest.get_node_or_nil(pos_up)
|
||||
|
@ -503,8 +503,8 @@ minetest.register_abm({
|
|||
-- mushroom spread
|
||||
minetest.register_abm({
|
||||
nodenames = {"fun_caves:giant_mushroom_cap", "fun_caves:huge_mushroom_cap"},
|
||||
interval = 3 * fun_caves.time_factor,
|
||||
chance = 40,
|
||||
interval = 15 * fun_caves.time_factor,
|
||||
chance = 10,
|
||||
action = function(pos, node)
|
||||
if minetest.get_node_light(pos, nil) >= 14 then
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
|
@ -533,8 +533,8 @@ minetest.register_abm({
|
|||
-- Mushroom spread and death
|
||||
minetest.register_abm({
|
||||
nodenames = {"flowers:mushroom_brown", "flowers:mushroom_red"},
|
||||
interval = 3 * fun_caves.time_factor,
|
||||
chance = 50,
|
||||
interval = 15 * fun_caves.time_factor,
|
||||
chance = 10,
|
||||
action = function(pos, node)
|
||||
if minetest.get_node_light(pos, nil) == 15 then
|
||||
minetest.remove_node(pos)
|
||||
|
@ -612,8 +612,8 @@ end
|
|||
minetest.register_abm({
|
||||
nodenames = hot_spikes,
|
||||
--neighbors = {"default:lava_source", "default:lava_flowing"},
|
||||
interval = 6 * fun_caves.time_factor,
|
||||
chance = 50,
|
||||
interval = 30 * fun_caves.time_factor,
|
||||
chance = 10,
|
||||
action = function(pos, node)
|
||||
local spike_num
|
||||
for i = 1, #hot_spikes do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue