mirror of
https://github.com/minetest-mods/maptools.git
synced 2024-11-16 23:30:24 +01:00
Prevent tools & nodes from being dropped (#11)
Adds a function to message a player that they cannot drop tools/nodes registered by maptools
This commit is contained in:
parent
7459fc3389
commit
106bba39b9
|
@ -17,6 +17,7 @@ minetest.register_node("maptools:stone", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:stonebrick", {
|
minetest.register_node("maptools:stonebrick", {
|
||||||
|
@ -27,6 +28,7 @@ minetest.register_node("maptools:stonebrick", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:tree", {
|
minetest.register_node("maptools:tree", {
|
||||||
|
@ -37,7 +39,8 @@ minetest.register_node("maptools:tree", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
on_place = minetest.rotate_node
|
on_place = minetest.rotate_node,
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:jungletree", {
|
minetest.register_node("maptools:jungletree", {
|
||||||
|
@ -48,7 +51,8 @@ minetest.register_node("maptools:jungletree", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
on_place = minetest.rotate_node
|
on_place = minetest.rotate_node,
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:cactus", {
|
minetest.register_node("maptools:cactus", {
|
||||||
|
@ -59,7 +63,8 @@ minetest.register_node("maptools:cactus", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
on_place = minetest.rotate_node
|
on_place = minetest.rotate_node,
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:papyrus", {
|
minetest.register_node("maptools:papyrus", {
|
||||||
|
@ -80,6 +85,7 @@ minetest.register_node("maptools:papyrus", {
|
||||||
},
|
},
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:dirt", {
|
minetest.register_node("maptools:dirt", {
|
||||||
|
@ -90,6 +96,7 @@ minetest.register_node("maptools:dirt", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_dirt_defaults(),
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:wood", {
|
minetest.register_node("maptools:wood", {
|
||||||
|
@ -100,6 +107,7 @@ minetest.register_node("maptools:wood", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:junglewood", {
|
minetest.register_node("maptools:junglewood", {
|
||||||
|
@ -110,6 +118,7 @@ minetest.register_node("maptools:junglewood", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:glass", {
|
minetest.register_node("maptools:glass", {
|
||||||
|
@ -123,6 +132,7 @@ minetest.register_node("maptools:glass", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:leaves", {
|
minetest.register_node("maptools:leaves", {
|
||||||
|
@ -135,6 +145,7 @@ minetest.register_node("maptools:leaves", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:sand", {
|
minetest.register_node("maptools:sand", {
|
||||||
|
@ -145,6 +156,7 @@ minetest.register_node("maptools:sand", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_sand_defaults(),
|
sounds = default.node_sound_sand_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:gravel", {
|
minetest.register_node("maptools:gravel", {
|
||||||
|
@ -158,6 +170,7 @@ minetest.register_node("maptools:gravel", {
|
||||||
footstep = {name="default_gravel_footstep", gain=0.35},
|
footstep = {name="default_gravel_footstep", gain=0.35},
|
||||||
dug = {name="default_gravel_footstep", gain=0.6},
|
dug = {name="default_gravel_footstep", gain=0.6},
|
||||||
}),
|
}),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:clay", {
|
minetest.register_node("maptools:clay", {
|
||||||
|
@ -168,6 +181,7 @@ minetest.register_node("maptools:clay", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_dirt_defaults(),
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:desert_sand", {
|
minetest.register_node("maptools:desert_sand", {
|
||||||
|
@ -178,6 +192,7 @@ minetest.register_node("maptools:desert_sand", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_sand_defaults(),
|
sounds = default.node_sound_sand_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:sandstone", {
|
minetest.register_node("maptools:sandstone", {
|
||||||
|
@ -188,6 +203,7 @@ minetest.register_node("maptools:sandstone", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:sandstone_brick", {
|
minetest.register_node("maptools:sandstone_brick", {
|
||||||
|
@ -198,6 +214,7 @@ minetest.register_node("maptools:sandstone_brick", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:desert_stone", {
|
minetest.register_node("maptools:desert_stone", {
|
||||||
|
@ -208,6 +225,7 @@ minetest.register_node("maptools:desert_stone", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:desert_cobble", {
|
minetest.register_node("maptools:desert_cobble", {
|
||||||
|
@ -218,6 +236,7 @@ minetest.register_node("maptools:desert_cobble", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:desert_stonebrick", {
|
minetest.register_node("maptools:desert_stonebrick", {
|
||||||
|
@ -228,6 +247,7 @@ minetest.register_node("maptools:desert_stonebrick", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:grass", {
|
minetest.register_node("maptools:grass", {
|
||||||
|
@ -241,6 +261,7 @@ minetest.register_node("maptools:grass", {
|
||||||
sounds = default.node_sound_dirt_defaults({
|
sounds = default.node_sound_dirt_defaults({
|
||||||
footstep = {name="default_grass_footstep", gain = 0.4},
|
footstep = {name="default_grass_footstep", gain = 0.4},
|
||||||
}),
|
}),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:fullgrass", {
|
minetest.register_node("maptools:fullgrass", {
|
||||||
|
@ -253,6 +274,7 @@ minetest.register_node("maptools:fullgrass", {
|
||||||
sounds = default.node_sound_dirt_defaults({
|
sounds = default.node_sound_dirt_defaults({
|
||||||
footstep = {name="default_grass_footstep", gain=0.4},
|
footstep = {name="default_grass_footstep", gain=0.4},
|
||||||
}),
|
}),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
for slab_num = 1,3,1 do
|
for slab_num = 1,3,1 do
|
||||||
|
@ -272,6 +294,7 @@ for slab_num = 1,3,1 do
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_dirt_defaults({footstep = {name="default_grass_footstep", gain = 0.4}}),
|
sounds = default.node_sound_dirt_defaults({footstep = {name="default_grass_footstep", gain = 0.4}}),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -283,6 +306,7 @@ minetest.register_node("maptools:cobble", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:mossycobble", {
|
minetest.register_node("maptools:mossycobble", {
|
||||||
|
@ -293,6 +317,7 @@ minetest.register_node("maptools:mossycobble", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:brick", {
|
minetest.register_node("maptools:brick", {
|
||||||
|
@ -303,6 +328,7 @@ minetest.register_node("maptools:brick", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:coalblock", {
|
minetest.register_node("maptools:coalblock", {
|
||||||
|
@ -313,6 +339,7 @@ minetest.register_node("maptools:coalblock", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -324,6 +351,7 @@ minetest.register_node("maptools:steelblock", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:goldblock", {
|
minetest.register_node("maptools:goldblock", {
|
||||||
|
@ -334,6 +362,7 @@ minetest.register_node("maptools:goldblock", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:copperblock", {
|
minetest.register_node("maptools:copperblock", {
|
||||||
|
@ -344,6 +373,7 @@ minetest.register_node("maptools:copperblock", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:bronzeblock", {
|
minetest.register_node("maptools:bronzeblock", {
|
||||||
|
@ -354,6 +384,7 @@ minetest.register_node("maptools:bronzeblock", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:diamondblock", {
|
minetest.register_node("maptools:diamondblock", {
|
||||||
|
@ -364,6 +395,7 @@ minetest.register_node("maptools:diamondblock", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Farming:
|
-- Farming:
|
||||||
|
@ -376,6 +408,7 @@ minetest.register_node("maptools:soil_wet", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, soil = 3, wet = 1, grassland = 1},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, soil = 3, wet = 1, grassland = 1},
|
||||||
sounds = default.node_sound_dirt_defaults(),
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:desert_sand_soil_wet", {
|
minetest.register_node("maptools:desert_sand_soil_wet", {
|
||||||
|
@ -386,4 +419,5 @@ minetest.register_node("maptools:desert_sand_soil_wet", {
|
||||||
tiles = {"farming_desert_sand_soil_wet.png", "farming_desert_sand_soil_wet_side.png"},
|
tiles = {"farming_desert_sand_soil_wet.png", "farming_desert_sand_soil_wet_side.png"},
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, soil = 3, wet = 1, desert = 1},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, soil = 3, wet = 1, desert = 1},
|
||||||
sounds = default.node_sound_sand_defaults(),
|
sounds = default.node_sound_sand_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
5
init.lua
5
init.lua
|
@ -20,6 +20,11 @@ maptools.intllib = S
|
||||||
|
|
||||||
local modpath = minetest.get_modpath("maptools")
|
local modpath = minetest.get_modpath("maptools")
|
||||||
|
|
||||||
|
maptools.drop_msg = function(itemstack, player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
minetest.chat_send_player(name, S("[maptools] tools/nodes do not drop!"))
|
||||||
|
end
|
||||||
|
|
||||||
dofile(modpath .. "/config.lua")
|
dofile(modpath .. "/config.lua")
|
||||||
dofile(modpath .. "/aliases.lua")
|
dofile(modpath .. "/aliases.lua")
|
||||||
dofile(modpath .. "/craftitems.lua")
|
dofile(modpath .. "/craftitems.lua")
|
||||||
|
|
27
nodes.lua
27
nodes.lua
|
@ -16,6 +16,7 @@ minetest.register_node(":default:cloud", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Nodes
|
-- Nodes
|
||||||
|
@ -30,6 +31,7 @@ minetest.register_node("maptools:black", {
|
||||||
post_effect_color = {a=255, r=0, g=0, b=0},
|
post_effect_color = {a=255, r=0, g=0, b=0},
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:white", {
|
minetest.register_node("maptools:white", {
|
||||||
|
@ -41,6 +43,7 @@ minetest.register_node("maptools:white", {
|
||||||
post_effect_color = {a=255, r=128, g=128, b=128},
|
post_effect_color = {a=255, r=128, g=128, b=128},
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:playerclip", {
|
minetest.register_node("maptools:playerclip", {
|
||||||
|
@ -54,6 +57,7 @@ minetest.register_node("maptools:playerclip", {
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:fake_walkable", {
|
minetest.register_node("maptools:fake_walkable", {
|
||||||
|
@ -74,6 +78,7 @@ minetest.register_node("maptools:fake_walkable", {
|
||||||
},
|
},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:fullclip", {
|
minetest.register_node("maptools:fullclip", {
|
||||||
|
@ -86,6 +91,7 @@ minetest.register_node("maptools:fullclip", {
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:fake_walkable_pointable", {
|
minetest.register_node("maptools:fake_walkable_pointable", {
|
||||||
|
@ -105,6 +111,7 @@ minetest.register_node("maptools:fake_walkable_pointable", {
|
||||||
},
|
},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:ignore_like", {
|
minetest.register_node("maptools:ignore_like", {
|
||||||
|
@ -117,6 +124,7 @@ minetest.register_node("maptools:ignore_like", {
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:ignore_like_no_clip", {
|
minetest.register_node("maptools:ignore_like_no_clip", {
|
||||||
|
@ -130,6 +138,7 @@ minetest.register_node("maptools:ignore_like_no_clip", {
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -144,6 +153,7 @@ minetest.register_node("maptools:ignore_like_no_point", {
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:ignore_like_no_clip_no_point", {
|
minetest.register_node("maptools:ignore_like_no_clip_no_point", {
|
||||||
|
@ -158,6 +168,7 @@ minetest.register_node("maptools:ignore_like_no_clip_no_point", {
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:fullclip_face", {
|
minetest.register_node("maptools:fullclip_face", {
|
||||||
|
@ -176,6 +187,7 @@ minetest.register_node("maptools:fullclip_face", {
|
||||||
},
|
},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, fall_damage_add_percent=-100},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, fall_damage_add_percent=-100},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:playerclip_bottom", {
|
minetest.register_node("maptools:playerclip_bottom", {
|
||||||
|
@ -194,6 +206,7 @@ minetest.register_node("maptools:playerclip_bottom", {
|
||||||
},
|
},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, fall_damage_add_percent=-100},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, fall_damage_add_percent=-100},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:playerclip_top", {
|
minetest.register_node("maptools:playerclip_top", {
|
||||||
|
@ -212,6 +225,7 @@ minetest.register_node("maptools:playerclip_top", {
|
||||||
},
|
},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, fall_damage_add_percent=-100},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, fall_damage_add_percent=-100},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
for pusher_num=1,10,1 do
|
for pusher_num=1,10,1 do
|
||||||
|
@ -231,6 +245,7 @@ minetest.register_node("maptools:pusher_" .. pusher_num, {
|
||||||
},
|
},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, fall_damage_add_percent=-100, bouncy=pusher_num*100},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, fall_damage_add_percent=-100, bouncy=pusher_num*100},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -247,6 +262,7 @@ minetest.register_node("maptools:lightbulb", {
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:nobuild", {
|
minetest.register_node("maptools:nobuild", {
|
||||||
|
@ -261,6 +277,7 @@ minetest.register_node("maptools:nobuild", {
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:nointeract", {
|
minetest.register_node("maptools:nointeract", {
|
||||||
|
@ -274,6 +291,7 @@ minetest.register_node("maptools:nointeract", {
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:climb", {
|
minetest.register_node("maptools:climb", {
|
||||||
|
@ -289,6 +307,7 @@ minetest.register_node("maptools:climb", {
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
for damage_num=1,5,1 do
|
for damage_num=1,5,1 do
|
||||||
|
@ -305,6 +324,7 @@ minetest.register_node("maptools:damage_" .. damage_num, {
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -321,6 +341,7 @@ minetest.register_node("maptools:kill", {
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:smoke", {
|
minetest.register_node("maptools:smoke", {
|
||||||
|
@ -334,6 +355,7 @@ minetest.register_node("maptools:smoke", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
post_effect_color = {a=192, r=96, g=96, b=96},
|
post_effect_color = {a=192, r=96, g=96, b=96},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:ladder", {
|
minetest.register_node("maptools:ladder", {
|
||||||
|
@ -354,6 +376,7 @@ minetest.register_node("maptools:ladder", {
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:permanent_fire", {
|
minetest.register_node("maptools:permanent_fire", {
|
||||||
|
@ -373,6 +396,7 @@ minetest.register_node("maptools:permanent_fire", {
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
damage_per_second = 4,
|
damage_per_second = 4,
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:fake_fire", {
|
minetest.register_node("maptools:fake_fire", {
|
||||||
|
@ -391,6 +415,7 @@ minetest.register_node("maptools:fake_fire", {
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:igniter", {
|
minetest.register_node("maptools:igniter", {
|
||||||
|
@ -406,6 +431,7 @@ minetest.register_node("maptools:igniter", {
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
pointable = false,
|
pointable = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:superapple", {
|
minetest.register_node("maptools:superapple", {
|
||||||
|
@ -426,4 +452,5 @@ minetest.register_node("maptools:superapple", {
|
||||||
groups = {fleshy=3, dig_immediate=3, not_in_creative_inventory = maptools.creative},
|
groups = {fleshy=3, dig_immediate=3, not_in_creative_inventory = maptools.creative},
|
||||||
on_use = minetest.item_eat(20),
|
on_use = minetest.item_eat(20),
|
||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
|
@ -28,6 +28,7 @@ minetest.register_tool("maptools:pick_admin", {
|
||||||
},
|
},
|
||||||
damage_groups = {fleshy = 1000},
|
damage_groups = {fleshy = 1000},
|
||||||
},
|
},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_tool("maptools:pick_admin_with_drops", {
|
minetest.register_tool("maptools:pick_admin_with_drops", {
|
||||||
|
@ -49,6 +50,7 @@ minetest.register_tool("maptools:pick_admin_with_drops", {
|
||||||
},
|
},
|
||||||
damage_groups = {fleshy = 1000},
|
damage_groups = {fleshy = 1000},
|
||||||
},
|
},
|
||||||
|
on_drop = maptools.drop_msg
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_on_punchnode(function(pos, node, puncher)
|
minetest.register_on_punchnode(function(pos, node, puncher)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user