1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-11 04:50:17 +01:00

Removed falling protection inhibiting the engine

- All nodes inhibited now produce logs and are compatible with other mods
This commit is contained in:
LeMagnesium 2015-04-22 18:09:34 +02:00
parent 76eae44363
commit 10428fbcfb
8 changed files with 0 additions and 503 deletions

View File

@ -114,27 +114,6 @@ function on_dignode(p, node)
end
minetest.register_on_dignode(on_dignode)
--
-- Rewrite of all item you need
--
function add_falling_protect_item(named)
minetest.override_item(named, {
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
end
})
end
--
-- Protected Area
--

View File

@ -8,12 +8,6 @@ PROTECT_LAVA_REALTIME = 0 -- 0 for OFF , 1 for ON
-- Protect in realtime the water flowing (can be very slow, because some water in this world :p)
PROTECT_WATER_REALTIME = 0 -- 0 for OFF , 1 for ON
--
-- List of your node need to rewirte
--
add_falling_protect_item("default:sand")
add_falling_protect_item("default:gravel")
add_protected_bukket_liquid("bucket:bucket_lava","default:lava_source") -- lava bukket
add_protected_bukket_liquid("bucket:bucket_water","default:water_source") -- water bukket

View File

@ -17,23 +17,6 @@ minetest.register_node("clams:sandalgae", {
}
},
sounds = default.node_sound_sand_defaults(),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("clams:dirtalgae", {
@ -62,23 +45,6 @@ minetest.register_node("clams:sandalgaeused", {
is_ground_content = true,
groups = {crumbly=3, falling_node=1, sand=1},
sounds = default.node_sound_sand_defaults(),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("clams:dirtalgaeused", {

View File

@ -128,23 +128,6 @@ minetest.register_node("seacoral:seacoralsandcyan", {
groups = {crumbly=3, falling_node=1, sand=1, soil=1, not_in_creative_inventory=1},
drop = 'default:sand',
sounds = default.node_sound_sand_defaults(),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seacoral:seacoraldirtcyan", {
@ -163,23 +146,6 @@ minetest.register_node("seacoral:seacoralsandmagenta", {
groups = {crumbly=3, falling_node=1, sand=1, soil=1, not_in_creative_inventory=1},
drop = 'default:sand',
sounds = default.node_sound_sand_defaults(),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seacoral:seacoraldirtmagenta", {
@ -198,23 +164,6 @@ minetest.register_node("seacoral:seacoralsandaqua", {
groups = {crumbly=3, falling_node=1, sand=1, soil=1, not_in_creative_inventory=1},
drop = 'default:sand',
sounds = default.node_sound_sand_defaults(),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seacoral:seacoraldirtaqua", {
@ -233,23 +182,6 @@ minetest.register_node("seacoral:seacoralsandlime", {
groups = {crumbly=3, falling_node=1, sand=1, soil=1, not_in_creative_inventory=1},
drop = 'default:sand',
sounds = default.node_sound_sand_defaults(),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seacoral:seacoraldirtlime", {
@ -268,23 +200,6 @@ minetest.register_node("seacoral:seacoralsandskyblue", {
groups = {crumbly=3, falling_node=1, sand=1, soil=1, not_in_creative_inventory=1},
drop = 'default:sand',
sounds = default.node_sound_sand_defaults(),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seacoral:seacoraldirtskyblue", {
@ -303,23 +218,6 @@ minetest.register_node("seacoral:seacoralsandredviolet", {
groups = {crumbly=3, falling_node=1, sand=1, soil=1, not_in_creative_inventory=1},
drop = 'default:sand',
sounds = default.node_sound_sand_defaults(),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seacoral:seacoraldirtredviolet", {

View File

@ -10,23 +10,6 @@ minetest.register_node("seagravel:seagravel", {
footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0},
}),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seagravel:seagravel_cyan", {
@ -38,23 +21,6 @@ minetest.register_node("seagravel:seagravel_cyan", {
footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0},
}),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seagravel:seagravel_magenta", {
@ -66,23 +32,6 @@ minetest.register_node("seagravel:seagravel_magenta", {
footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0},
}),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seagravel:seagravel_lime", {
@ -94,23 +43,6 @@ minetest.register_node("seagravel:seagravel_lime", {
footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0},
}),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seagravel:seagravel_aqua", {
@ -122,23 +54,6 @@ minetest.register_node("seagravel:seagravel_aqua", {
footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0},
}),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seagravel:seagravel_skyblue", {
@ -150,23 +65,6 @@ minetest.register_node("seagravel:seagravel_skyblue", {
footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0},
}),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seagravel:seagravel_redviolet", {
@ -178,23 +76,6 @@ minetest.register_node("seagravel:seagravel_redviolet", {
footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0},
}),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
@ -209,23 +90,6 @@ stairs.register_stair_and_slab("seagravel", "seagravel:seagravel",
default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0},
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
}))
stairs.register_stair_and_slab("seagravel_cyan", "seagravel:seagravel_cyan",
@ -236,23 +100,6 @@ stairs.register_stair_and_slab("seagravel_cyan", "seagravel:seagravel_cyan",
default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0},
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
}))
stairs.register_stair_and_slab("seagravel_magenta", "seagravel:seagravel_magenta",
@ -263,23 +110,6 @@ stairs.register_stair_and_slab("seagravel_magenta", "seagravel:seagravel_magenta
default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0},
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
}))
stairs.register_stair_and_slab("seagravel_lime", "seagravel:seagravel_lime",
@ -290,23 +120,6 @@ stairs.register_stair_and_slab("seagravel_lime", "seagravel:seagravel_lime",
default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0},
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
}))
stairs.register_stair_and_slab("seagravel_aqua", "seagravel:seagravel_aqua",
@ -317,23 +130,6 @@ stairs.register_stair_and_slab("seagravel_aqua", "seagravel:seagravel_aqua",
default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0},
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
}))
stairs.register_stair_and_slab("seagravel_skyblue", "seagravel:seagravel_skyblue",
@ -344,23 +140,6 @@ stairs.register_stair_and_slab("seagravel_skyblue", "seagravel:seagravel_skyblue
default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0},
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
}))
stairs.register_stair_and_slab("seagravel_redviolet", "seagravel:seagravel_redviolet",
@ -371,23 +150,6 @@ stairs.register_stair_and_slab("seagravel_redviolet", "seagravel:seagravel_redvi
default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0},
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
}))

View File

@ -133,23 +133,6 @@ minetest.register_node("seaplants:seaplantssandkelpgreen", {
groups = {crumbly=3, falling_node=1, sand=1, soil=1, not_in_creative_inventory=1},
drop = 'default:sand',
sounds = default.node_sound_sand_defaults(),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seaplants:seaplantsdirtkelpgreen", {
@ -168,23 +151,6 @@ minetest.register_node("seaplants:seaplantssandkelpbrown", {
groups = {crumbly=3, falling_node=1, sand=1, soil=1, not_in_creative_inventory=1},
drop = 'default:sand',
sounds = default.node_sound_sand_defaults(),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seaplants:seaplantsdirtkelpbrown", {
@ -203,23 +169,6 @@ minetest.register_node("seaplants:seaplantssandseagrassgreen", {
groups = {crumbly=3, falling_node=1, sand=1, soil=1, not_in_creative_inventory=1},
drop = 'default:sand',
sounds = default.node_sound_sand_defaults(),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seaplants:seaplantsdirtseagrassgreen", {
@ -238,23 +187,6 @@ minetest.register_node("seaplants:seaplantssandseagrassred", {
groups = {crumbly=3, falling_node=1, sand=1, soil=1, not_in_creative_inventory=1},
drop = 'default:sand',
sounds = default.node_sound_sand_defaults(),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seaplants:seaplantsdirtseagrassred", {

View File

@ -7,23 +7,6 @@ minetest.register_node("seawrecks:woodship", {
is_ground_content = true,
groups = {crumbly=3, falling_node=1, sand=1, soil=1, not_in_creative_inventory=1},
sounds = default.node_sound_sand_defaults(),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
minetest.register_node("seawrecks:uboot", {

View File

@ -20,23 +20,6 @@ minetest.register_node("whiteshell:whiteshell", {
}
},
sounds = default.node_sound_sand_defaults(),
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})
-- WHITESHELL GENERATION