mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-18 16:20:38 +01:00
added more unbreakable nodes by creeper explosion
added default:obsidian_cooled, default:obsidianbrick, more_chests:x (exclued wifi) in unbreakable nodes by creeper explosion and fix global var
This commit is contained in:
parent
27b925f996
commit
d9c671e10c
@ -627,17 +627,20 @@ function mobs:register_mob(name, def)
|
|||||||
if x*x+y*y+z*z <= 3 * 3 + 3 then
|
if x*x+y*y+z*z <= 3 * 3 + 3 then
|
||||||
local np={x=pos.x+x,y=pos.y+y,z=pos.z+z}
|
local np={x=pos.x+x,y=pos.y+y,z=pos.z+z}
|
||||||
local n = minetest.get_node(np)
|
local n = minetest.get_node(np)
|
||||||
if n.name ~= "air" and n.name ~= "doors:door_steel_b_1" and n.name ~= "doors:door_steel_t_1"
|
if n.name ~= "air" and n.name ~= "doors:door_steel_b_1" and n.name ~= "doors:door_steel_t_1"
|
||||||
and n.name ~= "doors:door_steel_b_2" and n.name ~= "doors:door_steel_t_2"
|
and n.name ~= "doors:door_steel_b_2" and n.name ~= "doors:door_steel_t_2"
|
||||||
and n.name ~= "default:chest_locked" and n.name ~= "default:obsidian" and n.name ~= "default:bedrock"
|
and n.name ~= "default:chest_locked" and n.name ~= "default:obsidian" and n.name ~= "default:obsidian_cooled"
|
||||||
|
and n.name ~= "default:obsidianbrick" and n.name ~= "default:bedrock"
|
||||||
|
and n.name ~= "more_chests:cobble" and n.name ~= "more_chests:shared" and n.name ~= "more_chests:secret"
|
||||||
|
and n.name ~= "more_chests:dropbox" and n.name ~= "chesttools:shared_chest"
|
||||||
and minetest.get_item_group(n.name, "unbreakable") ~= 1 and next(areas:getAreasAtPos(np)) == nil then
|
and minetest.get_item_group(n.name, "unbreakable") ~= 1 and next(areas:getAreasAtPos(np)) == nil then
|
||||||
--activate_if_tnt(n.name, np, pos, 3) -- Pas de module TNT sur le serveur donc inutile
|
--activate_if_tnt(n.name, np, pos, 3) -- Pas de module TNT sur le serveur donc inutile
|
||||||
if n.name == "default:chest" then
|
if n.name == "default:chest" then
|
||||||
meta = minetest.get_meta(np)
|
meta = minetest.get_meta(np)
|
||||||
inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
for i = 1,32 do
|
for i = 1,32 do
|
||||||
m_stack = inv:get_stack("main",i)
|
local m_stack = inv:get_stack("main",i)
|
||||||
obj = minetest.add_item(pos,m_stack)
|
local obj = minetest.add_item(pos,m_stack)
|
||||||
if obj then
|
if obj then
|
||||||
obj:setvelocity({x=math.random(-2,2), y=7, z=math.random(-2,2)})
|
obj:setvelocity({x=math.random(-2,2), y=7, z=math.random(-2,2)})
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user