Correct errors in search.

This commit is contained in:
Duane Robertson 2016-05-26 00:28:36 -05:00
parent 0285d39793
commit f8678a3d44
11 changed files with 35 additions and 32 deletions

View file

@ -23,7 +23,7 @@ function fun_caves.decorate_cave(node, data, area, minp, y, ivm, biome_val_in)
stone_type = node("default:ice") stone_type = node("default:ice")
stone_depth = 2 stone_depth = 2
elseif biome_val < -0.6 then elseif biome_val < -0.6 then
stone_type = node("fun_caves:thinice") stone_type = node("fun_caves:thin_ice")
stone_depth = 2 stone_depth = 2
elseif biome_val < -0.5 then elseif biome_val < -0.5 then
stone_type = node("fun_caves:stone_with_lichen") stone_type = node("fun_caves:stone_with_lichen")

View file

@ -108,9 +108,9 @@ mobs:register_mob("fun_caves:goblin_coal", {
end, end,
do_custom = function(self) do_custom = function(self)
fun_caves.search_replace(self.object:getpos(), 5, {"default:torch"}, "air") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
fun_caves.search_replace(self.object:getpos(), 20, {"default:stone"}, "default:mossycobble") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:stone"}, "default:mossycobble")
fun_caves.search_replace(self.object:getpos(), 500, {"group:stone"}, "fun_caves:stone_with_coal_trap") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"group:stone"}, "fun_caves:stone_with_coal_trap")
fun_caves.surface_damage(self) fun_caves.surface_damage(self)
end, end,

View file

@ -112,9 +112,9 @@ mobs:register_mob("fun_caves:goblin_cobble", {
end, end,
do_custom = function(self) do_custom = function(self)
fun_caves.search_replace(self.object:getpos(), 5, {"default:torch"}, "air") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
fun_caves.search_replace(self.object:getpos(), 5, {"default:stone", "default:desert_stone", "default:sandstone"}, "default:mossycobble") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:stone", "default:desert_stone", "default:sandstone"}, "default:mossycobble")
fun_caves.search_replace(self.object:getpos(), 50, {"default:mossycobble"}, "fun_caves:mossycobble_trap") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:mossycobble"}, "fun_caves:mossycobble_trap")
fun_caves.surface_damage(self) fun_caves.surface_damage(self)
end, end,

View file

@ -108,9 +108,9 @@ mobs:register_mob("fun_caves:goblin_copper", {
end, end,
do_custom = function(self) do_custom = function(self)
fun_caves.search_replace(self.object:getpos(), 5, 1, {"default:torch"}, "air") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
fun_caves.search_replace(self.object:getpos(), 20, 1, {"default:stone"}, "default:mossycobble") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:stone"}, "default:mossycobble")
fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_copper_trap") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"group:stone"}, "fun_caves:stone_with_copper_trap")
fun_caves.surface_damage(self) fun_caves.surface_damage(self)
end, end,

View file

@ -110,9 +110,9 @@ mobs:register_mob("fun_caves:goblin_diamond", {
end, end,
do_custom = function(self) do_custom = function(self)
fun_caves.search_replace(self.object:getpos(), 5, 1, {"default:torch"}, "air") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
fun_caves.search_replace(self.object:getpos(), 20, 1, {"default:stone"}, "default:mossycobble") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:stone"}, "default:mossycobble")
fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_diamond_trap") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"group:stone"}, "fun_caves:stone_with_diamond_trap")
fun_caves.surface_damage(self) fun_caves.surface_damage(self)
end, end,

View file

@ -4,7 +4,8 @@
-- He destroys everything diggable in his path. It's too much trouble -- He destroys everything diggable in his path. It's too much trouble
-- to fudge around with particulars. Besides, I don't want them to -- to fudge around with particulars. Besides, I don't want them to
-- mine for me. -- mine for me.
local diggable_nodes = {"group:stone", "group:sand", "group:soil", "group:plant"} --local diggable_nodes = {"group:stone", "group:sand", "group:soil", "group:plant", "default:stone_with_coal", "default:stone_with_iron", "default:stone_with_copper", "default:stone_with_gold", "default:stone_with_mese", "default:stone_with_diamond", "default:mese", "default:coalblock"}
local diggable_nodes = {"group:cracky", "group:snappy", "group:crumbly"}
-- This translates yaw into vectors. -- This translates yaw into vectors.
local cardinals = {{x=0,y=0,z=0.75}, {x=-0.75,y=0,z=0}, {x=0,y=0,z=-0.75}, {x=0.75,y=0,z=0}} local cardinals = {{x=0,y=0,z=0.75}, {x=-0.75,y=0,z=0}, {x=0,y=0,z=-0.75}, {x=0.75,y=0,z=0}}
@ -205,9 +206,9 @@ mobs:register_mob("fun_caves:goblin_digger", {
do_custom = function(self) do_custom = function(self)
goblin_tunneling(self, "digger") goblin_tunneling(self, "digger")
fun_caves.search_replace(self.object:getpos(), 5, {"default:torch"}, "air") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
fun_caves.search_replace(self.object:getpos(), 10, {"default:stone", "default:desert_stone", "default:sandstone"}, "default:mossycobble") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:stone", "default:desert_stone", "default:sandstone"}, "default:mossycobble")
fun_caves.search_replace(self.object:getpos(), 50, {"default:mossycobble"}, "fun_caves:mossycobble_trap") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:mossycobble"}, "fun_caves:mossycobble_trap")
fun_caves.surface_damage(self) fun_caves.surface_damage(self)
end, end,

View file

@ -108,9 +108,9 @@ mobs:register_mob("fun_caves:goblin_gold", {
end, end,
do_custom = function(self) do_custom = function(self)
fun_caves.search_replace(self.object:getpos(), 5, 1, {"default:torch"}, "air") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
fun_caves.search_replace(self.object:getpos(), 20, 1, {"default:stone"}, "default:mossycobble") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:stone"}, "default:mossycobble")
fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_gold_trap") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"group:stone"}, "fun_caves:stone_with_gold_trap")
fun_caves.surface_damage(self) fun_caves.surface_damage(self)
end, end,

View file

@ -107,9 +107,9 @@ mobs:register_mob("fun_caves:goblin_ice", {
end, end,
do_custom = function(self) do_custom = function(self)
fun_caves.search_replace(self.object:getpos(), 5, {"default:torch"}, "air") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
--fun_caves.search_replace(self.object:getpos(), 20, {"default:stone"}, "default:mossycobble") --fun_caves.search_replace(self.object:getpos(), 20, {"default:stone"}, "default:mossycobble")
fun_caves.search_replace(self.object:getpos(), 500, {"default:ice"}, "fun_caves:ice_trap") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:ice"}, "fun_caves:ice_trap")
fun_caves.surface_damage(self, true) fun_caves.surface_damage(self, true)
end, end,

View file

@ -110,9 +110,9 @@ mobs:register_mob("fun_caves:goblin_iron", {
end, end,
do_custom = function(self) do_custom = function(self)
fun_caves.search_replace(self.object:getpos(), 5, 1, {"default:torch"}, "air") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
fun_caves.search_replace(self.object:getpos(), 20, 1, {"default:stone"}, "default:mossycobble") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:stone"}, "default:mossycobble")
fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_iron_trap") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"group:stone"}, "fun_caves:stone_with_iron_trap")
fun_caves.surface_damage(self) fun_caves.surface_damage(self)
end, end,

View file

@ -109,13 +109,13 @@ mobs:register_mob("fun_caves:goblin_king", {
end, end,
do_custom = function(self) do_custom = function(self)
fun_caves.search_replace(self.object:getpos(), 2, {"default:torch"}, "air") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
fun_caves.search_replace(self.object:getpos(), 20, {"default:stone"}, "default:mossycobble") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:stone"}, "default:mossycobble")
fun_caves.search_replace(self.object:getpos(), 500, {"default:mossycobble"}, "fun_caves:mossycobble_trap") fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"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(), fun_caves.goblin_trap_freq, {"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(), fun_caves.goblin_trap_freq, {"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(), fun_caves.goblin_trap_freq, {"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.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"group:stone"}, "fun_caves:stone_with_iron_trap")
fun_caves.surface_damage(self) fun_caves.surface_damage(self)
end, end,

View file

@ -88,6 +88,8 @@ end
fun_caves.goblin_spawn_frequency = 150 fun_caves.goblin_spawn_frequency = 150
fun_caves.goblin_trap_freq = 500
fun_caves.goblin_torch_freq = 10
fun_caves.goblin_drops = { "default:pick_steel", "default:sword_steel", "default:shovel_steel", "farming:bread", "bucket:bucket_water", "default:pick_stone", "default:sword_stone" } fun_caves.goblin_drops = { "default:pick_steel", "default:sword_steel", "default:shovel_steel", "farming:bread", "bucket:bucket_water", "default:pick_stone", "default:sword_stone" }
--{"group:stone"} = { "default:stone", "default:mossycobble", "default:sandstone", "default:desert_stone", "default:stone_with_coal", "default:stone_with_iron", "default:stone_with_copper", "default:stone_with_gold", "default:stone_with_diamond" } --{"group:stone"} = { "default:stone", "default:mossycobble", "default:sandstone", "default:desert_stone", "default:stone_with_coal", "default:stone_with_iron", "default:stone_with_copper", "default:stone_with_gold", "default:stone_with_diamond" }