1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-07-07 18:30:28 +02:00

Updated mob mod

- Slightly changed API
- Added textures, and sounds
- Removed .env calls
This commit is contained in:
LeMagnesium
2015-03-02 22:29:17 +01:00
parent 911f49faa4
commit 66104e5ff6
26 changed files with 82 additions and 85 deletions

View File

@ -110,7 +110,7 @@ mobs:register_arrow("mobs:fireball", {
for dy=-1,1 do
for dz=-1,1 do
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
local n = minetest.env:get_node(p).name
local n = minetest.get_node(p).name
local excluding = minetest.registered_nodes[n].groups["unbreakable"] ~= nil
or n:split(":")[1] == "nether"
for _,i in ipairs(excluded) do
@ -121,11 +121,13 @@ mobs:register_arrow("mobs:fireball", {
if excluding then
return
end
if n ~= "default:obsidian" and n ~= "ethereal:obsidian_brick" then
if n ~= "default:obsidian"
and n ~= "default:obsidianbrick"
and not n:find("protector:") then
if minetest.registered_nodes[n].groups.flammable or math.random(1, 100) <= 30 then
minetest.env:set_node(p, {name="fire:basic_flame"})
minetest.set_node(p, {name="fire:basic_flame"})
else
minetest.env:set_node(p, {name="air"})
minetest.set_node(p, {name="air"})
end
end
end