Protect translocators. Fix mobs requirement error in villages.

The translocator protection DOES NOT WORK against mobs explosions.
This is not a fun_caves issue.
This commit is contained in:
Duane 2016-07-03 23:20:53 -05:00
parent 26622dd1dd
commit 0fd901dcca
7 changed files with 108 additions and 70 deletions

View file

@ -4,79 +4,81 @@ newnode.groups.soil = 0
minetest.register_node("fun_caves:hut_floor", newnode)
local drops = {
{name = "default:axe_stone", chance = 3, min = 1, max = 1},
{name = "default:hoe_stone", chance = 3, min = 1, max = 1},
{name = "default:sword_stone", chance = 3, min = 1, max = 1},
{name = "default:apple", chance = 2, min = 1, max = 3},
{name = "farming:bread", chance = 3, min = 1, max = 3},
{name = "default:cobble", chance = 2, min = 1, max = 3},
}
if mobs and mobs.mod == "redo" then
local drops = {
{name = "default:axe_stone", chance = 3, min = 1, max = 1},
{name = "default:hoe_stone", chance = 3, min = 1, max = 1},
{name = "default:sword_stone", chance = 3, min = 1, max = 1},
{name = "default:apple", chance = 2, min = 1, max = 3},
{name = "farming:bread", chance = 3, min = 1, max = 3},
{name = "default:cobble", chance = 2, min = 1, max = 3},
}
if minetest.registered_items['mobs:leather'] then
drops[#drops+1] = {name = "mobs:leather", chance = 4, min = 1, max = 2}
if minetest.registered_items['mobs:leather'] then
drops[#drops+1] = {name = "mobs:leather", chance = 4, min = 1, max = 2}
end
mobs:register_mob("fun_caves:savage", {
description = "Primitive Savage",
type = "monster",
passive = false,
damage = 1,
attack_type = "dogfight",
attacks_monsters = true,
hp_min = 5,
hp_max = 20,
armor = 100,
fear_height = 4,
collisionbox = {-0.35,-1,-0.35, 0.35,0.9,0.35},
visual = "mesh",
mesh = "character.b3d",
drawtype = "front",
textures = {
{"fun_caves_savage_1.png"},
},
makes_footstep_sound = true,
--sounds = {
-- random = "goblins_goblin_ambient",
-- warcry = "goblins_goblin_attack",
-- attack = "goblins_goblin_attack",
-- damage = "goblins_goblin_damage",
-- death = "goblins_goblin_death",
-- distance = 15,
--},
walk_velocity = 2,
run_velocity = 3,
jump = true,
drops = drops,
water_damage = 1,
lava_damage = 2,
light_damage = 0,
--lifetimer = 360,
view_range = 20,
owner = "",
animation = {
stand_start = 0,
stand_end = 79,
sit_start = 81,
sit_end = 160,
sleep_start = 162,
sleep_end = 166,
walk_start = 168,
walk_end = 187,
mine_start = 189,
mine_end = 198,
walkmine_start = 200,
walkmine_end = 219,
},
animation_speed = 30,
on_rightclick = nil,
do_custom = nil,
})
--mobs:register_egg("fun_caves:savage", "Primitive Savage", "farming_straw.png", 1)
mobs:register_spawn("fun_caves:savage", {'fun_caves:hut_floor'}, 100, 0, 20, 3, 2000)
end
mobs:register_mob("fun_caves:savage", {
description = "Primitive Savage",
type = "monster",
passive = false,
damage = 1,
attack_type = "dogfight",
attacks_monsters = true,
hp_min = 5,
hp_max = 20,
armor = 100,
fear_height = 4,
collisionbox = {-0.35,-1,-0.35, 0.35,0.9,0.35},
visual = "mesh",
mesh = "character.b3d",
drawtype = "front",
textures = {
{"fun_caves_savage_1.png"},
},
makes_footstep_sound = true,
--sounds = {
-- random = "goblins_goblin_ambient",
-- warcry = "goblins_goblin_attack",
-- attack = "goblins_goblin_attack",
-- damage = "goblins_goblin_damage",
-- death = "goblins_goblin_death",
-- distance = 15,
--},
walk_velocity = 2,
run_velocity = 3,
jump = true,
drops = drops,
water_damage = 1,
lava_damage = 2,
light_damage = 0,
--lifetimer = 360,
view_range = 20,
owner = "",
animation = {
stand_start = 0,
stand_end = 79,
sit_start = 81,
sit_end = 160,
sleep_start = 162,
sleep_end = 166,
walk_start = 168,
walk_end = 187,
mine_start = 189,
mine_end = 198,
walkmine_start = 200,
walkmine_end = 219,
},
animation_speed = 30,
on_rightclick = nil,
do_custom = nil,
})
--mobs:register_egg("fun_caves:savage", "Primitive Savage", "farming_straw.png", 1)
mobs:register_spawn("fun_caves:savage", {'fun_caves:hut_floor'}, 100, 0, 20, 3, 2000)
local function build_hut(data, area, node, pos, turf)
local door = {x = ({2,7})[math.random(2)], z = ({2,7})[math.random(2)]}