diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-04-01 20:02:19 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-04-01 21:09:33 -0400 |
commit | da66780a569712c23ae4f2996cfb4608a9f9d69d (patch) | |
tree | 217556029a78bc23ad4564720afc86de97228a04 /maptools | |
parent | 615b22df4d423aded3613db7716943a2f389b047 (diff) | |
download | dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.gz dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.bz2 dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.xz dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.zip |
copy all standard Dreambuilder mods in from the old subgame
(exactly as last supplied there, updates to these mods will follow later)
Diffstat (limited to 'maptools')
29 files changed, 1240 insertions, 0 deletions
diff --git a/maptools/LICENSE.md b/maptools/LICENSE.md new file mode 100644 index 0000000..ca48e3a --- /dev/null +++ b/maptools/LICENSE.md @@ -0,0 +1,14 @@ +zlib license +============ + +Copyright (c) 2012-2015 Calinou and contributors + +**This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.** + +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. diff --git a/maptools/NODES.md b/maptools/NODES.md new file mode 100644 index 0000000..f5ce3cc --- /dev/null +++ b/maptools/NODES.md @@ -0,0 +1,45 @@ +Item names for spawning the items using /give or /giveme +======================================================== + +Items +----- + +* `admin_pick:` magenta pickaxe, infinite durability, mines everything including unbreakable blocks instantly. No drops. Don't put this pickaxe in the hands of a griefer, of course. + +* `admin_pick_with_drops:` same as admin pickaxe, but drops stuff. + +* `infinite_fuel:` fuel lasting for a (near)-infinite time. Don't worry about the "near" * it lasts for about 50 in-real-life years. + +* `super_apple:` a yellow apple which heals 20 HP. + +* `copper_coin,` +* `silver_coin,` +* `gold_coin:` these have nothing to do with the More Ores mod; they can be used as a currency for trading, or as an universal currency for mods that add shops. + +Blocks +------ + +**[!]** denotes an unpointable, unbreakable block; be very careful with them, they cannot be removed by hand (they can only be removed with WorldEdit or similar). + + +* `(block)_u` : unbreakable, non-flammable, non-falling, non-decaying blocks, most common blocks have their unbreakable form (examples: maptools:stone or maptools:wood for unbreakable stone/wood). Examples: `stone_u`, `wood_u`, `glass_u`, … + +* `full_grass:` unbreakable block with the grass texture on all sides. + +* `player_clip:` **[!]** invisible block, not pointable. + +* `full_clip:` invisible block, pointable. Also available as a thin face: full_clip_face. + +* `smoke_block:` some smoke (does not harm players or entities). + +* `no_build:` **[!]** very basic building prevention. + +* `no_interact:` prevents interacting through the block (opening chests, furnaces, attacking entities, …). + +* `damage_(1…5):` **[!]** damaging blocks. The damage is in half hearts and ranges from 1 to 5 (0.5 to 2.5 hearts damage every second). + +* `kill:` **[!]** instant kill (deals 10 heart damage) blocks. + +* `light_block:` **[!]** invisible non-solid block, prevents light from passing through. + +* `light_bulb:` **[!]** invisible non-solid block, emitting a good amount of light. diff --git a/maptools/README.md b/maptools/README.md new file mode 100644 index 0000000..3a428b7 --- /dev/null +++ b/maptools/README.md @@ -0,0 +1,11 @@ +Map Tools +========= + +Map Tools for Minetest <http://minetest.net>, a free/libre infinite +world block sandbox game. + +To install, just clone this repository into your "mods" directory. + +Map Tools code is licensed under the zlib license, textures are by Calinou and are licensed under CC BY-SA 3.0 Unported. + +**Forum topic:** <https://forum.minetest.net/viewtopic.php?f=11&t=1882> diff --git a/maptools/aliases.lua b/maptools/aliases.lua new file mode 100644 index 0000000..f1f0cc5 --- /dev/null +++ b/maptools/aliases.lua @@ -0,0 +1,96 @@ +--[[ +Map Tools: alias definitions + +Copyright (c) 2012-2015 Calinou and contributors. +Licensed under the zlib license. See LICENSE.md for more information. +--]] + +minetest.register_alias("adminpick", "maptools:pick_admin") +minetest.register_alias("adminpickaxe", "maptools:pick_admin") +minetest.register_alias("admin_pick", "maptools:pick_admin") +minetest.register_alias("admin_pickaxe", "maptools:pick_admin") +minetest.register_alias("pick_admin", "maptools:pick_admin") +minetest.register_alias("pickaxe_admin", "maptools:pick_admin") +minetest.register_alias("pickadmin", "maptools:pick_admin") +minetest.register_alias("pickaxeadmin", "maptools:pick_admin") +minetest.register_alias("adminpickdrops", "maptools:pick_admin_with_drops") +minetest.register_alias("adminpickaxedrops", "maptools:pick_admin_with_drops") +minetest.register_alias("admin_pick_drops", "maptools:pick_admin_with_drops") +minetest.register_alias("admin_pickaxe_drops", "maptools:pick_admin_with_drops") +minetest.register_alias("pick_admin_drops", "maptools:pick_admin_with_drops") +minetest.register_alias("pickaxe_admin_drops", "maptools:pick_admin_with_drops") +minetest.register_alias("pickadmindrops", "maptools:pick_admin_with_drops") +minetest.register_alias("pickaxeadmindrops", "maptools:pick_admin_with_drops") +minetest.register_alias("infinitefuel", "maptools:infinitefuel") +minetest.register_alias("infinite_fuel", "maptools:infinitefuel") +minetest.register_alias("ifuel", "maptools:infinitefuel") +minetest.register_alias("superapple", "maptools:superapple") +minetest.register_alias("super_apple", "maptools:superapple") +minetest.register_alias("sapple", "maptools:superapple") +minetest.register_alias("nobuild", "maptools:nobuild") +minetest.register_alias("nointeract", "maptools:nointeract") +minetest.register_alias("damage_1", "maptools:damage_1") +minetest.register_alias("damage_2", "maptools:damage_2") +minetest.register_alias("damage_3", "maptools:damage_3") +minetest.register_alias("damage_4", "maptools:damage_4") +minetest.register_alias("damage_5", "maptools:damage_5") +minetest.register_alias("pusher_1", "maptools:pusher_1") +minetest.register_alias("pusher_2", "maptools:pusher_2") +minetest.register_alias("pusher_3", "maptools:pusher_3") +minetest.register_alias("pusher_4", "maptools:pusher_4") +minetest.register_alias("pusher_5", "maptools:pusher_5") +minetest.register_alias("pusher_6", "maptools:pusher_6") +minetest.register_alias("pusher_7", "maptools:pusher_7") +minetest.register_alias("pusher_8", "maptools:pusher_8") +minetest.register_alias("pusher_9", "maptools:pusher_9") +minetest.register_alias("pusher_10", "maptools:pusher_10") +minetest.register_alias("killblock", "maptools:kill") +minetest.register_alias("kill_block", "maptools:kill") +minetest.register_alias("lightblock", "maptools:lightblock") +minetest.register_alias("light_block", "maptools:lightblock") +minetest.register_alias("lightbulb", "maptools:lightbulb") +minetest.register_alias("light_bulb", "maptools:lightbulb") +minetest.register_alias("playerclip", "maptools:playerclip") +minetest.register_alias("player_clip", "maptools:playerclip") +minetest.register_alias("pclip", "maptools:playerclip") +minetest.register_alias("fullclip", "maptools:fullclip") +minetest.register_alias("full_clip", "maptools:fullclip") +minetest.register_alias("fclip", "maptools:fullclip") +minetest.register_alias("full_clip", "maptools:fullclip") +minetest.register_alias("full_clip_face", "maptools:fullclip_face") +minetest.register_alias("fullclip_face", "maptools:fullclip_face") +minetest.register_alias("fullclipface", "maptools:fullclip_face") +minetest.register_alias("player_clip_bottom", "maptools:playerclip_bottom") +minetest.register_alias("playerclip_bottom", "maptools:playerclip_bottom") +minetest.register_alias("playerclipbottom", "maptools:playerclip_bottom") +minetest.register_alias("player_clip_top", "maptools:playerclip_top") +minetest.register_alias("playerclip_top", "maptools:playerclip_top") +minetest.register_alias("playercliptop", "maptools:playerclip_top") +minetest.register_alias("permanentfire", "maptools:permanent_fire") +minetest.register_alias("permanent_fire", "maptools:permanent_fire") +minetest.register_alias("pfire", "maptools:permanent_fire") +minetest.register_alias("fakefire", "maptools:fake_fire") +minetest.register_alias("fake_fire", "maptools:fake_fire") +minetest.register_alias("ffire", "maptools:fake_fire") +minetest.register_alias("igniter", "maptools:igniter") + +minetest.register_alias("stone_u", "maptools:stone") +minetest.register_alias("tree_u", "maptools:tree") +minetest.register_alias("cobble_u", "maptools:cobble") +minetest.register_alias("wood_u", "maptools:wood") +minetest.register_alias("sand_u", "maptools:sand") +minetest.register_alias("gravel_u", "maptools:gravel") +minetest.register_alias("brick_u", "maptools:brick") +minetest.register_alias("dirt_u", "maptools:dirt") +minetest.register_alias("glass_u", "maptools:glass") +minetest.register_alias("sandstone_u", "maptools:sandstone") +minetest.register_alias("desert_stone_u", "maptools:desert_stone") +minetest.register_alias("desertstone_u", "maptools:desert_stone") +minetest.register_alias("desert_sand_u", "maptools:desert_sand") +minetest.register_alias("desertsand_u", "maptools:desert_sand") +minetest.register_alias("leaves_u", "maptools:leaves") +minetest.register_alias("grass_u", "maptools:grass") +minetest.register_alias("fullgrass", "maptools:fullgrass") +minetest.register_alias("fullgrass_u", "maptools:fullgrass") +minetest.register_alias("mossycobble_u", "maptools:mossycobble") +minetest.register_alias("mossy_cobble_u", "maptools:mossycobble") diff --git a/maptools/config.lua b/maptools/config.lua new file mode 100644 index 0000000..63f1a26 --- /dev/null +++ b/maptools/config.lua @@ -0,0 +1,29 @@ +--[[ +Map Tools: configuration handling + +Copyright (c) 2012-2015 Calinou and contributors. +Licensed under the zlib license. See LICENSE.md for more information. +--]] + +maptools.config = {} + +local function getbool_default(setting, default) + local value = minetest.setting_getbool(setting) + if value == nil then + value = default + end + return value +end + +local function setting(settingtype, name, default) + if settingtype == "bool" then + maptools.config[name] = + getbool_default("maptools." .. name, default) + else + maptools.config[name] = + minetest.setting_get("maptools." .. name) or default + end +end + +-- Show Map Tools stuff in creative inventory (1 or 0): +setting("integer", "hide_from_creative_inventory", 1) diff --git a/maptools/craftitems.lua b/maptools/craftitems.lua new file mode 100644 index 0000000..c311aa9 --- /dev/null +++ b/maptools/craftitems.lua @@ -0,0 +1,47 @@ +--[[ +Map Tools: item definitions + +Copyright (c) 2012-2015 Calinou and contributors. +Licensed under the zlib license. See LICENSE.md for more information. +--]] + +local S = maptools.intllib + +maptools.creative = maptools.config["hide_from_creative_inventory"] + +minetest.register_craftitem("maptools:copper_coin", { + description = S("Copper Coin"), + inventory_image = "maptools_copper_coin.png", + wield_scale = {x = 0.5, y = 0.5, z = 0.25}, + stack_max = 10000, + groups = {not_in_creative_inventory = maptools.creative}, +}) + +minetest.register_craftitem("maptools:silver_coin", { + description = S("Silver Coin"), + inventory_image = "maptools_silver_coin.png", + wield_scale = {x = 0.5, y = 0.5, z = 0.25}, + stack_max = 10000, + groups = {not_in_creative_inventory = maptools.creative}, +}) + +minetest.register_craftitem("maptools:gold_coin", { + description = S("Gold Coin"), + inventory_image = "maptools_gold_coin.png", + wield_scale = {x = 0.5, y = 0.5, z = 0.25}, + stack_max = 10000, + groups = {not_in_creative_inventory = maptools.creative}, +}) + +minetest.register_craftitem("maptools:infinitefuel", { + description = S("Infinite Fuel"), + inventory_image = "maptools_infinitefuel.png", + stack_max = 10000, + groups = {not_in_creative_inventory = maptools.creative}, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "maptools:infinitefuel", + burntime = 1000000000, +}) diff --git a/maptools/default_nodes.lua b/maptools/default_nodes.lua new file mode 100644 index 0000000..7c1e135 --- /dev/null +++ b/maptools/default_nodes.lua @@ -0,0 +1,389 @@ +--[[ +Map Tools: unbreakable default nodes + +Copyright (c) 2012-2015 Calinou and contributors. +Licensed under the zlib license. See LICENSE.md for more information. +--]] + +local S = maptools.intllib + +maptools.creative = maptools.config["hide_from_creative_inventory"] + +minetest.register_node("maptools:stone", { + description = S("Unbreakable Stone"), + range = 12, + stack_max = 10000, + tiles = {"default_stone.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("maptools:stonebrick", { + description = S("Unbreakable Stone Brick"), + range = 12, + stack_max = 10000, + tiles = {"default_stone_brick.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("maptools:tree", { + description = S("Unbreakable Tree"), + range = 12, + stack_max = 10000, + tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_wood_defaults(), + on_place = minetest.rotate_node +}) + +minetest.register_node("maptools:jungletree", { + description = S("Unbreakable Jungle Tree"), + range = 12, + stack_max = 10000, + tiles = {"default_jungletree_top.png", "default_jungletree_top.png", "default_jungletree.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_wood_defaults(), + on_place = minetest.rotate_node +}) + +minetest.register_node("maptools:cactus", { + description = S("Unbreakable Cactus"), + range = 12, + stack_max = 10000, + tiles = {"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_wood_defaults(), + on_place = minetest.rotate_node +}) + +minetest.register_node("maptools:papyrus", { + description = S("Unbreakable Papyrus"), + drawtype = "plantlike", + range = 12, + stack_max = 10000, + tiles = {"default_papyrus.png"}, + inventory_image = "default_papyrus.png", + wield_image = "default_papyrus.png", + walkable = false, + paramtype = "light", + sunlight_propagates = true, + drop = "", + selection_box = { + type = "fixed", + fixed = {-0.375, -0.5, -0.375, 0.375, 0.5, 0.375} + }, + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node("maptools:dirt", { + description = S("Unbreakable Dirt"), + range = 12, + stack_max = 10000, + tiles = {"default_dirt.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_dirt_defaults(), +}) + +minetest.register_node("maptools:wood", { + description = S("Unbreakable Wooden Planks"), + range = 12, + stack_max = 10000, + tiles = {"default_wood.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("maptools:junglewood", { + description = S("Unbreakable Junglewood Planks"), + range = 12, + stack_max = 10000, + tiles = {"default_junglewood.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("maptools:glass", { + description = S("Unbreakable Glass"), + range = 12, + stack_max = 10000, + drawtype = "glasslike", + tiles = {"default_glass.png"}, + paramtype = "light", + sunlight_propagates = true, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_glass_defaults(), +}) + +minetest.register_node("maptools:leaves", { + description = S("Unbreakable Leaves"), + range = 12, + stack_max = 10000, + drawtype = "allfaces_optional", + tiles = {"default_leaves.png"}, + paramtype = "light", + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node("maptools:sand", { + description = S("Unbreakable Sand"), + range = 12, + stack_max = 10000, + tiles = {"default_sand.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("maptools:gravel", { + description = S("Unbreakable Gravel"), + range = 12, + stack_max = 10000, + tiles = {"default_gravel.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_gravel_footstep", gain=0.35}, + dug = {name="default_gravel_footstep", gain=0.6}, + }), +}) + +minetest.register_node("maptools:clay", { + description = S("Unbreakable Clay"), + range = 12, + stack_max = 10000, + tiles = {"default_clay.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_dirt_defaults(), +}) + +minetest.register_node("maptools:desert_sand", { + description = S("Unbreakable Desert Sand"), + range = 12, + stack_max = 10000, + tiles = {"default_desert_sand.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("maptools:sandstone", { + description = S("Unbreakable Sandstone"), + range = 12, + stack_max = 10000, + tiles = {"default_sandstone.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("maptools:sandstone_brick", { + description = S("Unbreakable Sandstone Brick"), + range = 12, + stack_max = 10000, + tiles = {"default_sandstone_brick.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("maptools:desert_stone", { + description = S("Unbreakable Desert Stone"), + range = 12, + stack_max = 10000, + tiles = {"default_desert_stone.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("maptools:desert_cobble", { + description = S("Unbreakable Desert Cobble"), + range = 12, + stack_max = 10000, + tiles = {"default_desert_cobble.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("maptools:desert_stonebrick", { + description = S("Unbreakable Desert Stone Brick"), + range = 12, + stack_max = 10000, + tiles = {"default_desert_stone_brick.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("maptools:grass", { + description = S("Unbreakable Dirt with Grass"), + range = 12, + stack_max = 10000, + tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"}, + paramtype2 = "facedir", + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain = 0.4}, + }), +}) + +minetest.register_node("maptools:fullgrass", { + description = S("Unbreakable Full Grass"), + range = 12, + stack_max = 10000, + tiles = {"default_grass.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +for slab_num = 1,3,1 do + minetest.register_node("maptools:slab_grass_" .. slab_num * 4, { + description = S("Grass Slab"), + range = 12, + stack_max = 10000, + tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^maptools_grass_side_" .. slab_num * 4 .. ".png"}, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.5 + slab_num * 0.25, 0.5}, + }, + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "facedir", + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_dirt_defaults({footstep = {name="default_grass_footstep", gain = 0.4}}), + }) +end + +minetest.register_node("maptools:cobble", { + description = S("Unbreakable Cobblestone"), + range = 12, + stack_max = 10000, + tiles = {"default_cobble.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("maptools:mossycobble", { + description = S("Unbreakable Mossy Cobblestone"), + range = 12, + stack_max = 10000, + tiles = {"default_mossycobble.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("maptools:brick", { + description = S("Unbreakable Brick"), + range = 12, + stack_max = 10000, + tiles = {"default_brick.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("maptools:coalblock", { + description = S("Unbreakable Coal Block"), + range = 12, + stack_max = 10000, + tiles = {"default_coal_block.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + + +minetest.register_node("maptools:steelblock", { + description = S("Unbreakable Steel Block"), + range = 12, + stack_max = 10000, + tiles = {"default_steel_block.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("maptools:goldblock", { + description = S("Unbreakable Gold Block"), + range = 12, + stack_max = 10000, + tiles = {"default_gold_block.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("maptools:copperblock", { + description = S("Unbreakable Copper Block"), + range = 12, + stack_max = 10000, + tiles = {"default_copper_block.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("maptools:bronzeblock", { + description = S("Unbreakable Bronze Block"), + range = 12, + stack_max = 10000, + tiles = {"default_bronze_block.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("maptools:diamondblock", { + description = S("Unbreakable Diamond Block"), + range = 12, + stack_max = 10000, + tiles = {"default_diamond_block.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +-- Farming: + +minetest.register_node("maptools:soil_wet", { + description = "Wet Soil", + range = 12, + stack_max = 10000, + tiles = {"farming_soil_wet.png", "farming_soil_wet_side.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, soil = 3, wet = 1, grassland = 1}, + sounds = default.node_sound_dirt_defaults(), +}) + +minetest.register_node("maptools:desert_sand_soil_wet", { + description = "Wet Desert Sand Soil", + range = 12, + stack_max = 10000, + drop = "", + 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}, + sounds = default.node_sound_sand_defaults(), +}) diff --git a/maptools/depends.txt b/maptools/depends.txt new file mode 100644 index 0000000..4ad96d5 --- /dev/null +++ b/maptools/depends.txt @@ -0,0 +1 @@ +default diff --git a/maptools/init.lua b/maptools/init.lua new file mode 100644 index 0000000..dbff209 --- /dev/null +++ b/maptools/init.lua @@ -0,0 +1,32 @@ +--[[
+=====================================================================
+** Map Tools **
+By Calinou.
+
+Copyright (c) 2012-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+=====================================================================
+--]]
+
+maptools = {}
+
+local S
+if minetest.get_modpath("intllib") then
+ S = intllib.Getter()
+else
+ S = function(s) return s end
+end
+maptools.intllib = S
+
+local modpath = minetest.get_modpath("maptools")
+
+dofile(modpath .. "/config.lua")
+dofile(modpath .. "/aliases.lua")
+dofile(modpath .. "/craftitems.lua")
+dofile(modpath .. "/default_nodes.lua")
+dofile(modpath .. "/nodes.lua")
+dofile(modpath .. "/tools.lua")
+
+if minetest.setting_getbool("log_mods") then
+ minetest.log("action", S("[maptools] loaded."))
+end
diff --git a/maptools/locale/es.txt b/maptools/locale/es.txt new file mode 100644 index 0000000..1bc96f2 --- /dev/null +++ b/maptools/locale/es.txt @@ -0,0 +1,39 @@ +# Translation by kaeza + +[maptools] loaded. = [maptools] cargado. + +Cloud = Nube +Infinite Fuel = Combustible Infinito +Admin Pickaxe = Pico de Administrador +Copper Coin = Moneda de Cobre +Silver Coin = Moneda de Plata +Gold Coin = Moneda de Oro +Super Apple = Super Manzana +Fake Ladder = Escalera Falsa +Smoke Block = Bloque de Humo +Damaging Block: %s = Bloque Dañino: %s +Kill Block = Bloque Mortal +Build Prevention = Bloqueador de Construcción +Interact Prevention = Bloqueador de Interacción +Climb Block = Bloque Escalable +Light Block = Bloqueador de Luz +Light Bulb = Lamparilla +Player Clip = Bloqueo de Jugador +Full Clip = Bloqueo Total + +Unbreakable Stone = Piedra Irrompible +Unbreakable Sand = Arena Irrompible +Unbreakable Desert Stone = Piedra Desértica Irrompible +Unbreakable Desert Sand = Arena Desértica Irrompible +Unbreakable Gravel = Gravilla Irrompible +Unbreakable Dirt = Tierra Irrompible +Unbreakable Dirt with Grass = Hierba Irrompible +Unbreakable Full Grass= Bloque de Hierba Irrompible +Unbreakable Brick = Ladrillos Irrompibles +Unbreakable Wooden Planks = Planchas de Madera Irrompibles +Unbreakable Tree = Tronco de Árbol Irrompible +Unbreakable Glass = Cristal Irrompible +Unbreakable Sandstone = Arenisca Irrompible +Unbreakable Leaves = Foliaje Irrompible +Unbreakable Cobblestone = Guijarros Irrompibles +Unbreakable Mossy Cobblestone = Guijarros Enmohecidos Irrompibles diff --git a/maptools/locale/fr.txt b/maptools/locale/fr.txt new file mode 100644 index 0000000..d137871 --- /dev/null +++ b/maptools/locale/fr.txt @@ -0,0 +1,47 @@ +# Translation by Calinou + +[maptools] loaded. = [maptools] a été chargé. + +Cloud = Nuage +Infinite Fuel = Carburant infini +Admin Pickaxe = Pioche d'administrateur +Admin Pickaxe With Drops = Pioche d'administrateur qui donne des objets +Copper Coin = Pièce de cuivre +Silver Coin = Pièce d'argent +Gold Coin = Pièce d'or +Super Apple = Super pomme +Fake Ladder = Fausse échelle +Smoke Block = Bloc de fumée +Damaging Block: %s = Bloc de dégâts : %s +Kill Block = Bloc qui tue +Build Prevention = Prévention de construction +Interact Prevention = Prévention d'interaction +Climb Block = Bloc à grimper +Light Block = Bloqueur de lumière +Light Bulb = Bloc lumineux +Player Clip = Bloque-joueurs +Player Clip Bottom Face = Face inférieure de bloque-joueurs +Player Clip Top Face = Face supérieure de bloque-joueurs +Full Clip = Bloque-tout +Full Clip Face = Face de bloque-tout +Permanent Fire = Feu permanent +Fake Fire = Faux feu +Igniter = Incendieur +Pusher: %s = Pousseur : %s + +Unbreakable Stone = Pierre incassable +Unbreakable Sand = Sable incassable +Unbreakable Desert Stone = Pierre de désert incassable +Unbreakable Desert Sand = Sable de désert incassable +Unbreakable Gravel = Gravier incassable +Unbreakable Dirt = Terre incassable +Unbreakable Dirt with Grass = Herbe incassable +Unbreakable Full Grass= Bloc d'herbe incassable +Unbreakable Brick = Briques incassables +Unbreakable Wooden Planks = Planches de bois incassables +Unbreakable Tree = Tronc d'arbre incassable +Unbreakable Glass = Verre incassable +Unbreakable Sandstone = Grès incassable +Unbreakable Leaves = Feuillage incassable +Unbreakable Cobblestone = Pierre taillée incassable +Unbreakable Mossy Cobblestone = Pierre taillée mousseusse incassable diff --git a/maptools/nodes.lua b/maptools/nodes.lua new file mode 100644 index 0000000..8ceef64 --- /dev/null +++ b/maptools/nodes.lua @@ -0,0 +1,429 @@ +--[[ +Map Tools: node definitions + +Copyright (c) 2012-2015 Calinou and contributors. +Licensed under the zlib license. See LICENSE.md for more information. +--]] + +local S = maptools.intllib + +maptools.creative = maptools.config["hide_from_creative_inventory"] + +-- Redefine cloud so that the admin pickaxe can mine it: +minetest.register_node(":default:cloud", { + description = S("Cloud"), + tiles = {"default_cloud.png"}, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_defaults(), +}) + +-- Nodes +-- ===== + +minetest.register_node("maptools:black", { + description = S("Black"), + range = 12, + stack_max = 10000, + tiles = {"black.png"}, + drop = "", + post_effect_color = {a=255, r=0, g=0, b=0}, + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("maptools:white", { + description = S("White"), + range = 12, + stack_max = 10000, + tiles = {"white.png"}, + drop = "", + post_effect_color = {a=255, r=128, g=128, b=128}, + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("maptools:playerclip", { + description = S("Player Clip"), + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^dye_green.png", + drawtype = "airlike", + paramtype = "light", + pointable = false, + sunlight_propagates = true, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, +}) + +minetest.register_node("maptools:fake_walkable", { + description = S("Player Clip"), + drawtype = "nodebox", + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^dye_green.png", + drawtype = "airlike", + paramtype = "light", + pointable = false, + sunlight_propagates = true, + node_box = { + type = "fixed", + fixed = { + {0, 0, 0, 0, 0, 0}, + }, + }, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, +}) + +minetest.register_node("maptools:fullclip", { + description = S("Full Clip"), + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^dye_blue.png", + drawtype = "airlike", + paramtype = "light", + sunlight_propagates = true, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, +}) + +minetest.register_node("maptools:fake_walkable_pointable", { + description = S("Player Clip"), + drawtype = "nodebox", + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^dye_green.png", + drawtype = "airlike", + paramtype = "light", + sunlight_propagates = true, + node_box = { + type = "fixed", + fixed = { + {0, 0, 0, 0, 0, 0}, + }, + }, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, +}) + +minetest.register_node("maptools:ignore_like", { + description = S("Ignore-like"), + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^dye_pink.png", + tiles = {"invisible.png"}, + paramtype = "light", + sunlight_propagates = true, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, +}) + +minetest.register_node("maptools:ignore_like_no_clip", { + description = S("Ignore-like (no clip)"), + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^dye_purple.png", + tiles = {"invisible.png"}, + paramtype = "light", + walkable = false, + sunlight_propagates = true, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, +}) + + +minetest.register_node("maptools:ignore_like_no_point", { + description = S("Ignore-like (no point)"), + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^dye_purple.png", + tiles = {"invisible.png"}, + paramtype = "light", + pointable = false, + sunlight_propagates = true, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, +}) + +minetest.register_node("maptools:ignore_like_no_clip_no_point", { + description = S("Ignore-like (no clip, no point)"), + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^dye_pink.png", + tiles = {"invisible.png"}, + paramtype = "light", + walkable = false, + pointable = false, + sunlight_propagates = true, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, +}) + +minetest.register_node("maptools:fullclip_face", { + description = S("Full Clip Face"), + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^dye_white.png", + drawtype = "nodebox", + tiles = {"invisible.png"}, + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.4999, 0.5}, + }, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, fall_damage_add_percent=-100}, +}) + +minetest.register_node("maptools:playerclip_bottom", { + description = S("Player Clip Bottom Face"), + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^dye_orange.png", + drawtype = "nodebox", + tiles = {"invisible.png"}, + pointable = false, + paramtype = "light", + sunlight_propagates = true, + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.4999, 0.5}, + }, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, fall_damage_add_percent=-100}, +}) + +minetest.register_node("maptools:playerclip_top", { + description = S("Player Clip Top Face"), + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^dye_yellow.png", + drawtype = "nodebox", + tiles = {"invisible.png"}, + pointable = false, + paramtype = "light", + sunlight_propagates = true, + node_box = { + type = "fixed", + fixed = {-0.5, 0.4999, -0.5, 0.5, 0.5, 0.5}, + }, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, fall_damage_add_percent=-100}, +}) + +for pusher_num=1,10,1 do +minetest.register_node("maptools:pusher_" .. pusher_num, { + description = S("Pusher (%s)"):format(pusher_num), + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^default_apple.png", + drawtype = "nodebox", + tiles = {"invisible.png"}, + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.4999, 0.5}, + }, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, fall_damage_add_percent=-100, bouncy=pusher_num*100}, +}) +end + +minetest.register_node("maptools:lightbulb", { + description = S("Light Bulb"), + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^default_mese_crystal_fragment.png", + drawtype = "airlike", + walkable = false, + pointable = false, + light_source = 15, + paramtype = "light", + sunlight_propagates = true, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, +}) + +minetest.register_node("maptools:nobuild", { + description = S("Build Prevention"), + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^bones_bones.png", + drawtype = "airlike", + walkable = false, + pointable = false, + paramtype = "light", + sunlight_propagates = true, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, +}) + +minetest.register_node("maptools:nointeract", { + description = S("Interact Prevention"), + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^default_scorched_stuff.png", + drawtype = "airlike", + walkable = false, + paramtype = "light", + sunlight_propagates = true, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, +}) + +minetest.register_node("maptools:climb", { + description = S("Climb Block"), + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^default_ladder.png", + drawtype = "airlike", + walkable = false, + climbable = true, + pointable = false, + paramtype = "light", + sunlight_propagates = true, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, +}) + +for damage_num=1,5,1 do +minetest.register_node("maptools:damage_" .. damage_num, { + description = S("Damaging Block (%s)"):format(damage_num), + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^farming_cotton_" .. damage_num .. ".png", + drawtype = "airlike", + walkable = false, + pointable = false, + damage_per_second = damage_num, + paramtype = "light", + sunlight_propagates = true, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, +}) +end + +minetest.register_node("maptools:kill", { + description = S("Kill Block"), + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^dye_black.png", + drawtype = "airlike", + walkable = false, + pointable = false, + damage_per_second = 20, + paramtype = "light", + sunlight_propagates = true, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, +}) + +minetest.register_node("maptools:smoke", { + description = S("Smoke Block"), + range = 12, + stack_max = 10000, + tiles = {"maptools_smoke.png"}, + drawtype = "allfaces_optional", + walkable = false, + paramtype = "light", + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + post_effect_color = {a=192, r=96, g=96, b=96}, +}) + +minetest.register_node("maptools:ladder", { + description = S("Fake Ladder"), + range = 12, + stack_max = 10000, + drawtype = "signlike", + tiles = {"default_ladder.png"}, + inventory_image = "default_ladder.png", + wield_image = "default_ladder.png", + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = { + type = "wallmounted", + }, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("maptools:permanent_fire", { + description = S("Permanent Fire"), + range = 12, + stack_max = 10000, + drawtype = "plantlike", + paramtype = "light", + tiles = {{ + name="fire_basic_flame_animated.png", + animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1}, + }}, + inventory_image = "fire_basic_flame.png", + light_source = 14, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sunlight_propagates = true, + walkable = false, + damage_per_second = 4, +}) + +minetest.register_node("maptools:fake_fire", { + description = S("Fake Fire"), + range = 12, + stack_max = 10000, + drawtype = "plantlike", + paramtype = "light", + tiles = {{ + name="fire_basic_flame_animated.png", + animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1}, + }}, + inventory_image = "fire_basic_flame.png", + light_source = 14, + drop = "", + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sunlight_propagates = true, + walkable = false, +}) + +minetest.register_node("maptools:igniter", { + drawtype = "airlike", + range = 12, + stack_max = 10000, + inventory_image = "default_steel_block.png^crosshair.png", + description = S("Igniter"), + paramtype = "light", + inventory_image = "fire_basic_flame.png", + drop = "", + groups = {igniter=2, unbreakable = 1, not_in_creative_inventory = maptools.creative}, + sunlight_propagates = true, + pointable = false, + walkable = false, +}) + +minetest.register_node("maptools:superapple", { + description = S("Super Apple"), + range = 12, + stack_max = 10000, + drawtype = "plantlike", + visual_scale = 1.0, + tiles = {"maptools_superapple.png"}, + inventory_image = "maptools_superapple.png", + paramtype = "light", + sunlight_propagates = true, + selection_box = { + type = "fixed", + fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2} + }, + walkable = false, + groups = {fleshy=3, dig_immediate=3, not_in_creative_inventory = maptools.creative}, + on_use = minetest.item_eat(20), + sounds = default.node_sound_defaults(), +}) diff --git a/maptools/textures/black.png b/maptools/textures/black.png Binary files differnew file mode 100644 index 0000000..aac403d --- /dev/null +++ b/maptools/textures/black.png diff --git a/maptools/textures/fire_basic_flame.png b/maptools/textures/fire_basic_flame.png Binary files differnew file mode 100644 index 0000000..e3c52b0 --- /dev/null +++ b/maptools/textures/fire_basic_flame.png diff --git a/maptools/textures/fire_basic_flame_animated.png b/maptools/textures/fire_basic_flame_animated.png Binary files differnew file mode 100644 index 0000000..6f5f8ac --- /dev/null +++ b/maptools/textures/fire_basic_flame_animated.png diff --git a/maptools/textures/invisible.png b/maptools/textures/invisible.png Binary files differnew file mode 100644 index 0000000..4b5b302 --- /dev/null +++ b/maptools/textures/invisible.png diff --git a/maptools/textures/maptools_adminpick.png b/maptools/textures/maptools_adminpick.png Binary files differnew file mode 100644 index 0000000..04824eb --- /dev/null +++ b/maptools/textures/maptools_adminpick.png diff --git a/maptools/textures/maptools_adminpick_with_drops.png b/maptools/textures/maptools_adminpick_with_drops.png Binary files differnew file mode 100644 index 0000000..8f7cf7b --- /dev/null +++ b/maptools/textures/maptools_adminpick_with_drops.png diff --git a/maptools/textures/maptools_copper_coin.png b/maptools/textures/maptools_copper_coin.png Binary files differnew file mode 100644 index 0000000..26d22a8 --- /dev/null +++ b/maptools/textures/maptools_copper_coin.png diff --git a/maptools/textures/maptools_gold_coin.png b/maptools/textures/maptools_gold_coin.png Binary files differnew file mode 100644 index 0000000..40f14a9 --- /dev/null +++ b/maptools/textures/maptools_gold_coin.png diff --git a/maptools/textures/maptools_grass_side_12.png b/maptools/textures/maptools_grass_side_12.png Binary files differnew file mode 100644 index 0000000..6b26435 --- /dev/null +++ b/maptools/textures/maptools_grass_side_12.png diff --git a/maptools/textures/maptools_grass_side_4.png b/maptools/textures/maptools_grass_side_4.png Binary files differnew file mode 100644 index 0000000..ea87a38 --- /dev/null +++ b/maptools/textures/maptools_grass_side_4.png diff --git a/maptools/textures/maptools_grass_side_8.png b/maptools/textures/maptools_grass_side_8.png Binary files differnew file mode 100644 index 0000000..6db2502 --- /dev/null +++ b/maptools/textures/maptools_grass_side_8.png diff --git a/maptools/textures/maptools_infinitefuel.png b/maptools/textures/maptools_infinitefuel.png Binary files differnew file mode 100644 index 0000000..163f171 --- /dev/null +++ b/maptools/textures/maptools_infinitefuel.png diff --git a/maptools/textures/maptools_silver_coin.png b/maptools/textures/maptools_silver_coin.png Binary files differnew file mode 100644 index 0000000..284c671 --- /dev/null +++ b/maptools/textures/maptools_silver_coin.png diff --git a/maptools/textures/maptools_smoke.png b/maptools/textures/maptools_smoke.png Binary files differnew file mode 100644 index 0000000..c50b7e3 --- /dev/null +++ b/maptools/textures/maptools_smoke.png diff --git a/maptools/textures/maptools_superapple.png b/maptools/textures/maptools_superapple.png Binary files differnew file mode 100644 index 0000000..6833827 --- /dev/null +++ b/maptools/textures/maptools_superapple.png diff --git a/maptools/textures/white.png b/maptools/textures/white.png Binary files differnew file mode 100644 index 0000000..2d8d70f --- /dev/null +++ b/maptools/textures/white.png diff --git a/maptools/tools.lua b/maptools/tools.lua new file mode 100644 index 0000000..6ce8b6c --- /dev/null +++ b/maptools/tools.lua @@ -0,0 +1,61 @@ +--[[ +Map Tools: tool definitions + +Copyright (c) 2012-2015 Calinou and contributors. +Licensed under the zlib license. See LICENSE.md for more information. +--]] + +local S = maptools.intllib + +maptools.creative = maptools.config["hide_from_creative_inventory"] + +minetest.register_tool("maptools:pick_admin", { + description = S("Admin Pickaxe"), + range = 12, + inventory_image = "maptools_adminpick.png", + groups = {not_in_creative_inventory = maptools.creative}, + tool_capabilities = { + full_punch_interval = 0.1, + max_drop_level = 3, + groupcaps= { + unbreakable = {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}, + bendy = {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}, + snappy = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3}, + }, + damage_groups = {fleshy = 1000}, + }, +}) + +minetest.register_tool("maptools:pick_admin_with_drops", { + description = S("Admin Pickaxe with Drops"), + range = 12, + inventory_image = "maptools_adminpick_with_drops.png", + groups = {not_in_creative_inventory = maptools.creative}, + tool_capabilities = { + full_punch_interval = 0.35, + max_drop_level = 3, + groupcaps = { + unbreakable = {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}, + bendy = {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}, + snappy = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3}, + }, + damage_groups = {fleshy = 1000}, + }, +}) + +minetest.register_on_punchnode(function(pos, node, puncher) + if puncher:get_wielded_item():get_name() == "maptools:pick_admin" + and minetest.get_node(pos).name ~= "air" then + minetest.log("action", puncher:get_player_name() .. " digs " .. minetest.get_node(pos).name .. " at " .. minetest.pos_to_string(pos) .. " using an Admin Pickaxe.") + minetest.remove_node(pos) -- The node is removed directly, which means it even works on non-empty containers and group-less nodes. + nodeupdate(pos) -- Run node update actions like falling nodes. + end +end) |