modified: lava_titan.lua
Integrated new functions and controls of protections
This commit is contained in:
parent
33ffc699b7
commit
c453f86828
@ -57,7 +57,7 @@ nssm:register_mob("nssm:lava_titan", {
|
||||
for dz=-1, 1, 2 do
|
||||
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||
local n = minetest.env:get_node(p).name
|
||||
if n~="default:lava_flowing" then
|
||||
if n~="default:lava_flowing" and not minetest.is_protected(p, "") then
|
||||
minetest.set_node(p, {name="default:lava_flowing"})
|
||||
end
|
||||
end
|
||||
@ -79,34 +79,7 @@ nssm:register_mob("nssm:lava_titan", {
|
||||
dattack_end=400,
|
||||
},
|
||||
do_custom = function (self)
|
||||
|
||||
--Digging ability:
|
||||
--[[
|
||||
local v = self.object:getvelocity()
|
||||
local pos = self.object:getpos()
|
||||
local c=3
|
||||
for dx = -c*(math.abs(v.x))-1 , c*(math.abs(v.x))+1 do
|
||||
for dy=0,5 do
|
||||
for dz = -c*(math.abs(v.z))-1 , c*(math.abs(v.z))+1 do
|
||||
local p = {x=pos.x+dx, y=pos.y, z=pos.z+dz}
|
||||
local t = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||
local n = minetest.env:get_node(p).name
|
||||
if (n~="default:water_source" and n~="default:water_flowing") then
|
||||
minetest.env:set_node(t, {name="air"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
]]--
|
||||
nssm:digging_ability(self, nil, self.run_velocity, {x=0, y=5, z=0})
|
||||
|
||||
--Melting ability (puts lava where he passes)
|
||||
--[[pos.y=pos.y-1
|
||||
local n = minetest.env:get_node(pos).name
|
||||
if n~="default:lava_source" then
|
||||
minetest.env:set_node(pos, {name="default:lava_source"})
|
||||
end
|
||||
]]
|
||||
|
||||
nssm:digging_ability(self, "sand", self.run_velocity, {x=0, y=5, z=0})
|
||||
nssm:putting_ability(self, "default:lava_source", self.run_velocity)
|
||||
end,
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user