Correct errors in search.
This commit is contained in:
parent
0285d39793
commit
f8678a3d44
11 changed files with 35 additions and 32 deletions
|
@ -23,7 +23,7 @@ function fun_caves.decorate_cave(node, data, area, minp, y, ivm, biome_val_in)
|
|||
stone_type = node("default:ice")
|
||||
stone_depth = 2
|
||||
elseif biome_val < -0.6 then
|
||||
stone_type = node("fun_caves:thinice")
|
||||
stone_type = node("fun_caves:thin_ice")
|
||||
stone_depth = 2
|
||||
elseif biome_val < -0.5 then
|
||||
stone_type = node("fun_caves:stone_with_lichen")
|
||||
|
|
|
@ -108,9 +108,9 @@ mobs:register_mob("fun_caves:goblin_coal", {
|
|||
end,
|
||||
|
||||
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(), 500, {"group:stone"}, "fun_caves:stone_with_coal_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
|
||||
fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:stone"}, "default:mossycobble")
|
||||
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)
|
||||
end,
|
||||
|
|
|
@ -112,9 +112,9 @@ mobs:register_mob("fun_caves:goblin_cobble", {
|
|||
end,
|
||||
|
||||
do_custom = function(self)
|
||||
fun_caves.search_replace(self.object:getpos(), 5, {"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(), 50, {"default:mossycobble"}, "fun_caves:mossycobble_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
|
||||
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(), fun_caves.goblin_trap_freq, {"default:mossycobble"}, "fun_caves:mossycobble_trap")
|
||||
|
||||
fun_caves.surface_damage(self)
|
||||
end,
|
||||
|
|
|
@ -108,9 +108,9 @@ mobs:register_mob("fun_caves:goblin_copper", {
|
|||
end,
|
||||
|
||||
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(), 500, 5, {"group:stone"}, "fun_caves:stone_with_copper_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
|
||||
fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:stone"}, "default:mossycobble")
|
||||
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)
|
||||
end,
|
||||
|
|
|
@ -110,9 +110,9 @@ mobs:register_mob("fun_caves:goblin_diamond", {
|
|||
end,
|
||||
|
||||
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(), 500, 5, {"group:stone"}, "fun_caves:stone_with_diamond_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
|
||||
fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:stone"}, "default:mossycobble")
|
||||
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)
|
||||
end,
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
-- He destroys everything diggable in his path. It's too much trouble
|
||||
-- to fudge around with particulars. Besides, I don't want them to
|
||||
-- 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.
|
||||
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)
|
||||
goblin_tunneling(self, "digger")
|
||||
|
||||
fun_caves.search_replace(self.object:getpos(), 5, {"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(), 50, {"default:mossycobble"}, "fun_caves:mossycobble_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
|
||||
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(), fun_caves.goblin_trap_freq, {"default:mossycobble"}, "fun_caves:mossycobble_trap")
|
||||
|
||||
fun_caves.surface_damage(self)
|
||||
end,
|
||||
|
|
|
@ -108,9 +108,9 @@ mobs:register_mob("fun_caves:goblin_gold", {
|
|||
end,
|
||||
|
||||
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(), 500, 5, {"group:stone"}, "fun_caves:stone_with_gold_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
|
||||
fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:stone"}, "default:mossycobble")
|
||||
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)
|
||||
end,
|
||||
|
|
|
@ -107,9 +107,9 @@ mobs:register_mob("fun_caves:goblin_ice", {
|
|||
end,
|
||||
|
||||
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(), 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)
|
||||
end,
|
||||
|
|
|
@ -110,9 +110,9 @@ mobs:register_mob("fun_caves:goblin_iron", {
|
|||
end,
|
||||
|
||||
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(), 500, 5, {"group:stone"}, "fun_caves:stone_with_iron_trap")
|
||||
fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
|
||||
fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:stone"}, "default:mossycobble")
|
||||
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)
|
||||
end,
|
||||
|
|
|
@ -109,13 +109,13 @@ mobs:register_mob("fun_caves:goblin_king", {
|
|||
end,
|
||||
|
||||
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(), 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.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
|
||||
fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:stone"}, "default:mossycobble")
|
||||
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(), fun_caves.goblin_trap_freq, {"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_copper_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(), fun_caves.goblin_trap_freq, {"group:stone"}, "fun_caves:stone_with_iron_trap")
|
||||
|
||||
fun_caves.surface_damage(self)
|
||||
end,
|
||||
|
|
2
mobs.lua
2
mobs.lua
|
@ -88,6 +88,8 @@ end
|
|||
|
||||
|
||||
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" }
|
||||
--{"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" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue