forked from mff/maptools
Log node removals with the Admin Pickaxe, code cleanup, Map Tools nodes and the Admin Pick can aim from far away.
This commit is contained in:
parent
8c8de1893b
commit
617388cd09
70
init.lua
70
init.lua
|
@ -39,6 +39,7 @@ minetest.register_craft({
|
||||||
|
|
||||||
minetest.register_node("maptools:stone", {
|
minetest.register_node("maptools:stone", {
|
||||||
description = S("Unbreakable Stone"),
|
description = S("Unbreakable Stone"),
|
||||||
|
range = 12,
|
||||||
tiles = {"default_stone.png"},
|
tiles = {"default_stone.png"},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
||||||
|
@ -47,6 +48,7 @@ minetest.register_node("maptools:stone", {
|
||||||
|
|
||||||
minetest.register_node("maptools:tree", {
|
minetest.register_node("maptools:tree", {
|
||||||
description = S("Unbreakable Tree"),
|
description = S("Unbreakable Tree"),
|
||||||
|
range = 12,
|
||||||
tiles = {"default_tree.png"},
|
tiles = {"default_tree.png"},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
||||||
|
@ -55,6 +57,7 @@ minetest.register_node("maptools:tree", {
|
||||||
|
|
||||||
minetest.register_node("maptools:dirt", {
|
minetest.register_node("maptools:dirt", {
|
||||||
description = S("Unbreakable Dirt"),
|
description = S("Unbreakable Dirt"),
|
||||||
|
range = 12,
|
||||||
tiles = {"default_dirt.png"},
|
tiles = {"default_dirt.png"},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
||||||
|
@ -63,6 +66,7 @@ minetest.register_node("maptools:dirt", {
|
||||||
|
|
||||||
minetest.register_node("maptools:wood", {
|
minetest.register_node("maptools:wood", {
|
||||||
description = S("Unbreakable Wooden Planks"),
|
description = S("Unbreakable Wooden Planks"),
|
||||||
|
range = 12,
|
||||||
tiles = {"default_wood.png"},
|
tiles = {"default_wood.png"},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
||||||
|
@ -71,6 +75,7 @@ minetest.register_node("maptools:wood", {
|
||||||
|
|
||||||
minetest.register_node("maptools:glass", {
|
minetest.register_node("maptools:glass", {
|
||||||
description = S("Unbreakable Glass"),
|
description = S("Unbreakable Glass"),
|
||||||
|
range = 12,
|
||||||
drawtype = "glasslike",
|
drawtype = "glasslike",
|
||||||
tiles = {"default_glass.png"},
|
tiles = {"default_glass.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
@ -82,6 +87,7 @@ minetest.register_node("maptools:glass", {
|
||||||
|
|
||||||
minetest.register_node("maptools:leaves", {
|
minetest.register_node("maptools:leaves", {
|
||||||
description = S("Unbreakable Leaves"),
|
description = S("Unbreakable Leaves"),
|
||||||
|
range = 12,
|
||||||
drawtype = "allfaces_optional",
|
drawtype = "allfaces_optional",
|
||||||
tiles = {"default_leaves.png"},
|
tiles = {"default_leaves.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
@ -92,6 +98,7 @@ minetest.register_node("maptools:leaves", {
|
||||||
|
|
||||||
minetest.register_node("maptools:sand", {
|
minetest.register_node("maptools:sand", {
|
||||||
description = S("Unbreakable Sand"),
|
description = S("Unbreakable Sand"),
|
||||||
|
range = 12,
|
||||||
tiles = {"default_sand.png"},
|
tiles = {"default_sand.png"},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
||||||
|
@ -100,6 +107,7 @@ minetest.register_node("maptools:sand", {
|
||||||
|
|
||||||
minetest.register_node("maptools:gravel", {
|
minetest.register_node("maptools:gravel", {
|
||||||
description = S("Unbreakable Gravel"),
|
description = S("Unbreakable Gravel"),
|
||||||
|
range = 12,
|
||||||
tiles = {"default_gravel.png"},
|
tiles = {"default_gravel.png"},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
||||||
|
@ -111,6 +119,7 @@ minetest.register_node("maptools:gravel", {
|
||||||
|
|
||||||
minetest.register_node("maptools:desert_sand", {
|
minetest.register_node("maptools:desert_sand", {
|
||||||
description = S("Unbreakable Desert Sand"),
|
description = S("Unbreakable Desert Sand"),
|
||||||
|
range = 12,
|
||||||
tiles = {"default_desert_sand.png"},
|
tiles = {"default_desert_sand.png"},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
||||||
|
@ -119,6 +128,7 @@ minetest.register_node("maptools:desert_sand", {
|
||||||
|
|
||||||
minetest.register_node("maptools:sandstone", {
|
minetest.register_node("maptools:sandstone", {
|
||||||
description = S("Unbreakable Sandstone"),
|
description = S("Unbreakable Sandstone"),
|
||||||
|
range = 12,
|
||||||
tiles = {"default_sandstone.png"},
|
tiles = {"default_sandstone.png"},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
||||||
|
@ -127,6 +137,7 @@ minetest.register_node("maptools:sandstone", {
|
||||||
|
|
||||||
minetest.register_node("maptools:desert_stone", {
|
minetest.register_node("maptools:desert_stone", {
|
||||||
description = S("Unbreakable Desert Stone"),
|
description = S("Unbreakable Desert Stone"),
|
||||||
|
range = 12,
|
||||||
tiles = {"default_desert_stone.png"},
|
tiles = {"default_desert_stone.png"},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
||||||
|
@ -135,6 +146,7 @@ minetest.register_node("maptools:desert_stone", {
|
||||||
|
|
||||||
minetest.register_node("maptools:grass", {
|
minetest.register_node("maptools:grass", {
|
||||||
description = S("Unbreakable Dirt with Grass"),
|
description = S("Unbreakable Dirt with Grass"),
|
||||||
|
range = 12,
|
||||||
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
||||||
|
@ -145,6 +157,7 @@ minetest.register_node("maptools:grass", {
|
||||||
|
|
||||||
minetest.register_node("maptools:fullgrass", {
|
minetest.register_node("maptools:fullgrass", {
|
||||||
description = S("Unbreakable Full Grass"),
|
description = S("Unbreakable Full Grass"),
|
||||||
|
range = 12,
|
||||||
tiles = {"default_grass.png"},
|
tiles = {"default_grass.png"},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
||||||
|
@ -155,6 +168,7 @@ minetest.register_node("maptools:fullgrass", {
|
||||||
|
|
||||||
minetest.register_node("maptools:cobble", {
|
minetest.register_node("maptools:cobble", {
|
||||||
description = S("Unbreakable Cobblestone"),
|
description = S("Unbreakable Cobblestone"),
|
||||||
|
range = 12,
|
||||||
tiles = {"default_cobble.png"},
|
tiles = {"default_cobble.png"},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
||||||
|
@ -163,6 +177,7 @@ minetest.register_node("maptools:cobble", {
|
||||||
|
|
||||||
minetest.register_node("maptools:mossycobble", {
|
minetest.register_node("maptools:mossycobble", {
|
||||||
description = S("Unbreakable Mossy Cobblestone"),
|
description = S("Unbreakable Mossy Cobblestone"),
|
||||||
|
range = 12,
|
||||||
tiles = {"default_mossycobble.png"},
|
tiles = {"default_mossycobble.png"},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
||||||
|
@ -171,6 +186,7 @@ minetest.register_node("maptools:mossycobble", {
|
||||||
|
|
||||||
minetest.register_node("maptools:brick", {
|
minetest.register_node("maptools:brick", {
|
||||||
description = S("Unbreakable Brick"),
|
description = S("Unbreakable Brick"),
|
||||||
|
range = 12,
|
||||||
tiles = {"default_brick.png"},
|
tiles = {"default_brick.png"},
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
groups = {unbreakable=1, not_in_creative_inventory = maptools_creative},
|
||||||
|
@ -179,6 +195,7 @@ minetest.register_node("maptools:brick", {
|
||||||
|
|
||||||
minetest.register_node("maptools:playerclip", {
|
minetest.register_node("maptools:playerclip", {
|
||||||
description = S("Player Clip"),
|
description = S("Player Clip"),
|
||||||
|
range = 12,
|
||||||
inventory_image = "default_steel_block.png^dye_green.png",
|
inventory_image = "default_steel_block.png^dye_green.png",
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
@ -190,6 +207,7 @@ minetest.register_node("maptools:playerclip", {
|
||||||
|
|
||||||
minetest.register_node("maptools:fullclip", {
|
minetest.register_node("maptools:fullclip", {
|
||||||
description = S("Full Clip"),
|
description = S("Full Clip"),
|
||||||
|
range = 12,
|
||||||
inventory_image = "default_steel_block.png^dye_blue.png",
|
inventory_image = "default_steel_block.png^dye_blue.png",
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
@ -200,6 +218,7 @@ minetest.register_node("maptools:fullclip", {
|
||||||
|
|
||||||
minetest.register_node("maptools:fullclip_face", {
|
minetest.register_node("maptools:fullclip_face", {
|
||||||
description = S("Full Clip Face"),
|
description = S("Full Clip Face"),
|
||||||
|
range = 12,
|
||||||
inventory_image = "default_steel_block.png^dye_white.png",
|
inventory_image = "default_steel_block.png^dye_white.png",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"invisible.png"},
|
tiles = {"invisible.png"},
|
||||||
|
@ -216,6 +235,7 @@ minetest.register_node("maptools:fullclip_face", {
|
||||||
|
|
||||||
minetest.register_node("maptools:playerclip_bottom", {
|
minetest.register_node("maptools:playerclip_bottom", {
|
||||||
description = S("Player Clip Bottom Face"),
|
description = S("Player Clip Bottom Face"),
|
||||||
|
range = 12,
|
||||||
inventory_image = "default_steel_block.png^dye_orange.png",
|
inventory_image = "default_steel_block.png^dye_orange.png",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"invisible.png"},
|
tiles = {"invisible.png"},
|
||||||
|
@ -232,6 +252,7 @@ minetest.register_node("maptools:playerclip_bottom", {
|
||||||
|
|
||||||
minetest.register_node("maptools:playerclip_top", {
|
minetest.register_node("maptools:playerclip_top", {
|
||||||
description = S("Player Clip Top Face"),
|
description = S("Player Clip Top Face"),
|
||||||
|
range = 12,
|
||||||
inventory_image = "default_steel_block.png^dye_yellow.png",
|
inventory_image = "default_steel_block.png^dye_yellow.png",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"invisible.png"},
|
tiles = {"invisible.png"},
|
||||||
|
@ -249,6 +270,7 @@ minetest.register_node("maptools:playerclip_top", {
|
||||||
for pusher_num=1,10,1 do
|
for pusher_num=1,10,1 do
|
||||||
minetest.register_node("maptools:pusher_" .. pusher_num, {
|
minetest.register_node("maptools:pusher_" .. pusher_num, {
|
||||||
description = S("Pusher (%s)"):format(pusher_num),
|
description = S("Pusher (%s)"):format(pusher_num),
|
||||||
|
range = 12,
|
||||||
inventory_image = "default_steel_block.png^default_apple.png",
|
inventory_image = "default_steel_block.png^default_apple.png",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"invisible.png"},
|
tiles = {"invisible.png"},
|
||||||
|
@ -266,6 +288,7 @@ end
|
||||||
|
|
||||||
minetest.register_node("maptools:lightbulb", {
|
minetest.register_node("maptools:lightbulb", {
|
||||||
description = S("Light Bulb"),
|
description = S("Light Bulb"),
|
||||||
|
range = 12,
|
||||||
inventory_image = "default_steel_block.png^default_mese_crystal_fragment.png",
|
inventory_image = "default_steel_block.png^default_mese_crystal_fragment.png",
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -280,6 +303,7 @@ minetest.register_node("maptools:lightbulb", {
|
||||||
|
|
||||||
minetest.register_node("maptools:nobuild", {
|
minetest.register_node("maptools:nobuild", {
|
||||||
description = S("Build Prevention"),
|
description = S("Build Prevention"),
|
||||||
|
range = 12,
|
||||||
inventory_image = "default_steel_block.png^bones_bones.png",
|
inventory_image = "default_steel_block.png^bones_bones.png",
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -292,6 +316,7 @@ minetest.register_node("maptools:nobuild", {
|
||||||
|
|
||||||
minetest.register_node("maptools:nointeract", {
|
minetest.register_node("maptools:nointeract", {
|
||||||
description = S("Interact Prevention"),
|
description = S("Interact Prevention"),
|
||||||
|
range = 12,
|
||||||
inventory_image = "default_steel_block.png^default_scorched_stuff.png",
|
inventory_image = "default_steel_block.png^default_scorched_stuff.png",
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -303,6 +328,7 @@ minetest.register_node("maptools:nointeract", {
|
||||||
|
|
||||||
minetest.register_node("maptools:climb", {
|
minetest.register_node("maptools:climb", {
|
||||||
description = S("Climb Block"),
|
description = S("Climb Block"),
|
||||||
|
range = 12,
|
||||||
inventory_image = "default_steel_block.png^default_ladder.png",
|
inventory_image = "default_steel_block.png^default_ladder.png",
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -318,6 +344,7 @@ minetest.register_node("maptools:climb", {
|
||||||
for damage_num=1,5,1 do
|
for damage_num=1,5,1 do
|
||||||
minetest.register_node("maptools:damage_" .. damage_num, {
|
minetest.register_node("maptools:damage_" .. damage_num, {
|
||||||
description = S("Damaging Block (%s)"):format(damage_num),
|
description = S("Damaging Block (%s)"):format(damage_num),
|
||||||
|
range = 12,
|
||||||
inventory_image = "default_steel_block.png^farming_cotton_" .. damage_num .. ".png",
|
inventory_image = "default_steel_block.png^farming_cotton_" .. damage_num .. ".png",
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -332,6 +359,7 @@ end
|
||||||
|
|
||||||
minetest.register_node("maptools:kill", {
|
minetest.register_node("maptools:kill", {
|
||||||
description = S("Kill Block"),
|
description = S("Kill Block"),
|
||||||
|
range = 12,
|
||||||
inventory_image = "default_steel_block.png^dye_black.png",
|
inventory_image = "default_steel_block.png^dye_black.png",
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -345,6 +373,7 @@ minetest.register_node("maptools:kill", {
|
||||||
|
|
||||||
minetest.register_node("maptools:smoke", {
|
minetest.register_node("maptools:smoke", {
|
||||||
description = S("Smoke Block"),
|
description = S("Smoke Block"),
|
||||||
|
range = 12,
|
||||||
tiles = {"maptools_smoke.png"},
|
tiles = {"maptools_smoke.png"},
|
||||||
drawtype = "allfaces_optional",
|
drawtype = "allfaces_optional",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -356,6 +385,7 @@ minetest.register_node("maptools:smoke", {
|
||||||
|
|
||||||
minetest.register_node("maptools:ladder", {
|
minetest.register_node("maptools:ladder", {
|
||||||
description = S("Fake Ladder"),
|
description = S("Fake Ladder"),
|
||||||
|
range = 12,
|
||||||
drawtype = "signlike",
|
drawtype = "signlike",
|
||||||
tiles = {"default_ladder.png"},
|
tiles = {"default_ladder.png"},
|
||||||
inventory_image = "default_ladder.png",
|
inventory_image = "default_ladder.png",
|
||||||
|
@ -374,6 +404,7 @@ minetest.register_node("maptools:ladder", {
|
||||||
|
|
||||||
minetest.register_node("maptools:permanent_fire", {
|
minetest.register_node("maptools:permanent_fire", {
|
||||||
description = S("Permanent Fire"),
|
description = S("Permanent Fire"),
|
||||||
|
range = 12,
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
tiles = {{
|
tiles = {{
|
||||||
|
@ -391,6 +422,7 @@ minetest.register_node("maptools:permanent_fire", {
|
||||||
|
|
||||||
minetest.register_node("maptools:fake_fire", {
|
minetest.register_node("maptools:fake_fire", {
|
||||||
description = S("Fake Fire"),
|
description = S("Fake Fire"),
|
||||||
|
range = 12,
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
tiles = {{
|
tiles = {{
|
||||||
|
@ -407,6 +439,7 @@ minetest.register_node("maptools:fake_fire", {
|
||||||
|
|
||||||
minetest.register_node("maptools:igniter", {
|
minetest.register_node("maptools:igniter", {
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
|
range = 12,
|
||||||
inventory_image = "default_steel_block.png^crosshair.png",
|
inventory_image = "default_steel_block.png^crosshair.png",
|
||||||
description = S("Igniter"),
|
description = S("Igniter"),
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
@ -461,45 +494,48 @@ minetest.register_node("maptools:superapple", {
|
||||||
|
|
||||||
minetest.register_tool("maptools:pick_admin", {
|
minetest.register_tool("maptools:pick_admin", {
|
||||||
description = S("Admin Pickaxe"),
|
description = S("Admin Pickaxe"),
|
||||||
|
range = 12,
|
||||||
inventory_image = "maptools_adminpick.png",
|
inventory_image = "maptools_adminpick.png",
|
||||||
groups = {not_in_creative_inventory = maptools_creative},
|
groups = {not_in_creative_inventory = maptools_creative},
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
full_punch_interval = 0,
|
full_punch_interval = 0.1,
|
||||||
max_drop_level = 3,
|
max_drop_level = 3,
|
||||||
groupcaps= {
|
groupcaps= {
|
||||||
unbreakable = {times={[1]=0, [2]=0, [3]=0}, uses = 0, maxlevel = 3},
|
unbreakable = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
|
||||||
fleshy = {times={[1]=0, [2]=0, [3]=0}, uses = 0, maxlevel = 3},
|
fleshy = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
|
||||||
choppy = {times={[1]=0, [2]=0, [3]=0}, uses = 0, maxlevel = 3},
|
choppy = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
|
||||||
bendy = {times={[1]=0, [2]=0, [3]=0}, uses = 0, maxlevel = 3},
|
bendy = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
|
||||||
cracky = {times={[1]=0, [2]=0, [3]=0}, uses = 0, maxlevel = 3},
|
cracky = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
|
||||||
crumbly = {times={[1]=0, [2]=0, [3]=0}, uses = 0, maxlevel = 3},
|
crumbly = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
|
||||||
snappy = {times={[1]=0, [2]=0, [3]=0}, uses = 0, maxlevel = 3},
|
snappy = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_tool("maptools:pick_admin_with_drops", {
|
minetest.register_tool("maptools:pick_admin_with_drops", {
|
||||||
description = S("Admin Pickaxe with Drops"),
|
description = S("Admin Pickaxe with Drops"),
|
||||||
|
range = 12,
|
||||||
inventory_image = "maptools_adminpick.png",
|
inventory_image = "maptools_adminpick.png",
|
||||||
groups = {not_in_creative_inventory = maptools_creative},
|
groups = {not_in_creative_inventory = maptools_creative},
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
full_punch_interval = 0,
|
full_punch_interval = 0.1,
|
||||||
max_drop_level = 3,
|
max_drop_level = 3,
|
||||||
groupcaps= {
|
groupcaps= {
|
||||||
unbreakable = {times={[1]=0, [2]=0, [3]=0}, uses = 0, maxlevel = 3},
|
unbreakable = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
|
||||||
fleshy = {times={[1]=0, [2]=0, [3]=0}, uses = 0, maxlevel = 3},
|
fleshy = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
|
||||||
choppy = {times={[1]=0, [2]=0, [3]=0}, uses = 0, maxlevel = 3},
|
choppy = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
|
||||||
bendy = {times={[1]=0, [2]=0, [3]=0}, uses = 0, maxlevel = 3},
|
bendy = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
|
||||||
cracky = {times={[1]=0, [2]=0, [3]=0}, uses = 0, maxlevel = 3},
|
cracky = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
|
||||||
crumbly = {times={[1]=0, [2]=0, [3]=0}, uses = 0, maxlevel = 3},
|
crumbly = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
|
||||||
snappy = {times={[1]=0, [2]=0, [3]=0}, uses = 0, maxlevel = 3},
|
snappy = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_on_punchnode(function(pos, node, puncher)
|
minetest.register_on_punchnode(function(pos, node, puncher)
|
||||||
if puncher:get_wielded_item():get_name() == "maptools:pick_admin"
|
if puncher:get_wielded_item():get_name() == "maptools:pick_admin"
|
||||||
and minetest.env: get_node(pos).name ~= "air" then
|
and minetest.env:get_node(pos).name ~= "air" then
|
||||||
|
minetest.log("action", minetest.env:get_node(pos).name .. " was removed using an Admin Pickaxe.")
|
||||||
minetest.env:remove_node(pos) -- The node is removed directly, which means it even works on non-empty containers and group-less nodes.
|
minetest.env:remove_node(pos) -- The node is removed directly, which means it even works on non-empty containers and group-less nodes.
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user