Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Sys Quatre 2020-07-17 22:40:01 +02:00
commit ca10e7e1f6
2 changed files with 13 additions and 35 deletions

View File

@ -41,6 +41,7 @@ mobs:register_mob("mobs_monster:lava_flan", {
immune_to = {
{"mobs:pick_lava", -2}, -- lava pick heals 2 health
},
fly_in = {"default:lava_source", "default:lava_flowing"},
animation = {
speed_normal = 15,
speed_run = 15,
@ -62,21 +63,7 @@ mobs:register_mob("mobs_monster:lava_flan", {
pos.y = pos.y + 1
minetest.add_particlespawner({
amount = 40,
time = 0.25,
minpos = pos,
maxpos = pos,
minvel = {x = -2, y = 0, z = -2},
maxvel = {x = 2, y = 2, z = 2},
minacc = {x = 0, y = 0, z = 0},
maxacc = {x = 0, y = 10, z = 0},
minexptime = 0.1,
maxexptime = 1,
minsize = 3.0,
maxsize = 5.0,
texture = "tnt_smoke.png",
})
mobs:effect(pos, 40, "tnt_smoke.png", 3, 5, 2, 0.5, nil, false)
minetest.sound_play("fire_extinguish_flame",
{pos = pos, max_hear_distance = 12, gain = 1.5}, true)
@ -84,28 +71,16 @@ mobs:register_mob("mobs_monster:lava_flan", {
self.object:remove()
if math.random(4) == 1 then
minetest.add_entity(pos, "mobs_monster:obsidian_flan")
mobs:add_mob(pos, {
name = "mobs_monster:obsidian_flan",
})
end
else
if minetest.get_node(pos).name == "air" then
minetest.set_node(pos, {name = "fire:basic_flame"})
end
minetest.add_particlespawner({
amount = 20,
time = 0.25,
minpos = pos,
maxpos = pos,
minvel = {x = -2, y = -2, z = -2},
maxvel = {x = 2, y = 2, z = 2},
minacc = {x = 0, y = -10, z = 0},
maxacc = {x = 0, y = -10, z = 0},
minexptime = 0.1,
maxexptime = 1,
minsize = 1.0,
maxsize = 2.0,
texture = "fire_basic_flame.png",
})
mobs:effect(pos, 40, "fire_basic_flame.png", 2, 3, 2, 5, 10, nil)
self.object:remove()
end
@ -257,9 +232,10 @@ mobs:register_mob("mobs_monster:obsidian_flan", {
floats = 0,
drops = {
{name = "default:obsidian_shard", chance = 1, min = 1, max = 5},
{name = "default:obsidian", chance = 3, min = 0, max = 2},
},
water_damage = 0,
lava_damage = 0,
lava_damage = 8,
light_damage = 0,
animation = {
speed_normal = 15,
@ -321,7 +297,9 @@ mobs:register_arrow("mobs_monster:obsidian_arrow", {
texture = def.tiles[1]
end
if def.groups and def.groups.level == 2 then
-- do not break obsidian or diamond blocks or unbreakable nodes
if (def.groups and def.groups.level and def.groups.level > 1)
or def.groups.unbreakable then
return
end

View File

@ -96,9 +96,9 @@ mobs:register_mob("mobs_monster:sand_monster", {
]]
on_die = function(self, pos)
pos.y = pos.y + 0.5
effect(pos, 30, "mobs_sand_particles.png", 0.1, 2, 3, 5)
mobs:effect(pos, 30, "mobs_sand_particles.png", .1, 2, 3, 5)
pos.y = pos.y + 0.25
effect(pos, 30, "mobs_sand_particles.png", 0.1, 2, 3, 5)
mobs:effect(pos, 30, "mobs_sand_particles.png", .1, 2, 3, 5)
end,
--[[
on_rightclick = function(self, clicker)