From fd7b885b0740eeac72ee9f9321b3a714f958aa4d Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Tue, 20 Jan 2015 17:45:25 +0100 Subject: [PATCH] Massive update of maptools to remove within last global vars - Updated mod using meld to merge properly - Came back the superapples' textures to replace the new buggy ones --- mods/maptools/{LICENSE.txt => LICENSE.md} | 7 +- mods/maptools/NODES.md | 45 ++ mods/maptools/README.md | 11 + mods/maptools/README.txt | 22 - mods/maptools/_README.txt | 53 -- mods/maptools/aliases.lua | 7 +- mods/maptools/config.lua | 29 + mods/maptools/craftitems.lua | 47 ++ mods/maptools/default_nodes.lua | 85 +-- mods/maptools/init.lua | 512 +----------------- mods/maptools/nodes.lua | 444 +++++++++++++++ .../textures/maptools_super_apple_bottom.png | Bin 295 -> 350 bytes .../textures/maptools_super_apple_side.png | Bin 295 -> 360 bytes .../textures/maptools_super_apple_top.png | Bin 498 -> 444 bytes mods/maptools/tools.lua | 61 +++ 15 files changed, 720 insertions(+), 603 deletions(-) rename mods/maptools/{LICENSE.txt => LICENSE.md} (71%) create mode 100644 mods/maptools/NODES.md create mode 100644 mods/maptools/README.md delete mode 100644 mods/maptools/README.txt delete mode 100644 mods/maptools/_README.txt create mode 100644 mods/maptools/config.lua create mode 100644 mods/maptools/craftitems.lua create mode 100644 mods/maptools/nodes.lua create mode 100644 mods/maptools/tools.lua diff --git a/mods/maptools/LICENSE.txt b/mods/maptools/LICENSE.md similarity index 71% rename from mods/maptools/LICENSE.txt rename to mods/maptools/LICENSE.md index f42bd647..ca48e3a1 100644 --- a/mods/maptools/LICENSE.txt +++ b/mods/maptools/LICENSE.md @@ -1,8 +1,9 @@ -+---- zlib/libpng license ----+ +zlib license +============ -Copyright (c) 2013 Calinou +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. +**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: diff --git a/mods/maptools/NODES.md b/mods/maptools/NODES.md new file mode 100644 index 00000000..f5ce3cc3 --- /dev/null +++ b/mods/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/mods/maptools/README.md b/mods/maptools/README.md new file mode 100644 index 00000000..3a428b7e --- /dev/null +++ b/mods/maptools/README.md @@ -0,0 +1,11 @@ +Map Tools +========= + +Map Tools for Minetest , 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:** diff --git a/mods/maptools/README.txt b/mods/maptools/README.txt deleted file mode 100644 index 4c155813..00000000 --- a/mods/maptools/README.txt +++ /dev/null @@ -1,22 +0,0 @@ -Calinou's Minetest Mods -===================== - -Calinou's Mods for Minetest [http://minetest.net], a free and opensource Minecraft-like game. - -This Git repository is mostly made for servers; it allows easy updating. - -To install, just clone this repository somewhere, then copy the "calinou_mods" folder in the "mods/minetest" folder of Minetest's installation folder. - - - -Misc stuff -===================== - -All these mods' source codes, except More Ores are under the zlib/libpng license. More Ores is under the GNU GPLv3; the mods' textures are under the CC BY-SA 3.0 Unported. - -Mods' forum threads: -More Blocks: http://minetest.net/forum/viewtopic.php?id=509 -More Ores: http://minetest.net/forum/viewtopic.php?id=549 -Map Tools: http://minetest.net/forum/viewtopic.php?id=1882 -Doors+: http://minetest.net/forum/viewtopic.php?id=2059 -Stairs+: http://minetest.net/forum/viewtopic.php?id=2092 diff --git a/mods/maptools/_README.txt b/mods/maptools/_README.txt deleted file mode 100644 index cfbe0b2e..00000000 --- a/mods/maptools/_README.txt +++ /dev/null @@ -1,53 +0,0 @@ -*** Item names for spawning the items using /give or /giveme *** - -Items: - -- admin_pick -Purple pickaxe, infinite durability, mines everything including unbreakable blocks instantly. Don't put this pickaxe in the hands of a griefer, of course. :) - -- infinitefuel -Fuel lasting for a (near)-infinite time. Don't worry about the "near" - it lasts for about 50 in-real-life years. - -- superapple -An apple which heals all 10 hearts. - -- 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: -A /!\ denotes an unpointable, unbreakable block; be very careful with them, they cannot be removed by hand (they can only be removed with WorldEdit). - -- (insert block name here)_u -- example: stone_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). - -- fullgrass -Unbrakable block with the "grass" texture on all sides. - -- playerclip -/!\ Invisible block, not pointable. - -- fullclip -Invisible block, pointable. - -- smoke_block -Some smoke (does not harm players or entities). - -- nobuild -/!\ Very basic building prevention. - -- nointeract -Prevents interacting through the block (interacting as in opening chests, furnaces, attacking entities...). - -- damage_(insert damage in half hearts here) -/!\ Damaging blocks. The damage is in half hearts and ranges from 1 to 5 (0.5 to 2.5 hearts damage every second). - -- killblock -/!\ Instant kill (deals 10 heart damage) blocks. - -- lightblock -/!\ Invisible non-solid block, prevents light from passing through. - -- lightbulb -/!\ Invisible non-solid block, emitting a good amount of light. diff --git a/mods/maptools/aliases.lua b/mods/maptools/aliases.lua index 8742f44e..719acfd1 100644 --- a/mods/maptools/aliases.lua +++ b/mods/maptools/aliases.lua @@ -1,4 +1,9 @@ --- Aliases +--[[ +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") diff --git a/mods/maptools/config.lua b/mods/maptools/config.lua new file mode 100644 index 00000000..63f1a260 --- /dev/null +++ b/mods/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/mods/maptools/craftitems.lua b/mods/maptools/craftitems.lua new file mode 100644 index 00000000..c311aa95 --- /dev/null +++ b/mods/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/mods/maptools/default_nodes.lua b/mods/maptools/default_nodes.lua index 83d0df02..7c1e135e 100644 --- a/mods/maptools/default_nodes.lua +++ b/mods/maptools/default_nodes.lua @@ -1,10 +1,13 @@ -local S -if (minetest.get_modpath("intllib")) then - dofile(minetest.get_modpath("intllib").."/intllib.lua") - S = intllib.Getter(minetest.get_current_modname()) - else - S = function ( s ) return s end -end +--[[ +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"), @@ -12,7 +15,7 @@ minetest.register_node("maptools:stone", { stack_max = 10000, tiles = {"default_stone.png"}, 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(), }) @@ -22,7 +25,7 @@ minetest.register_node("maptools:stonebrick", { stack_max = 10000, tiles = {"default_stone_brick.png"}, 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(), }) @@ -32,7 +35,7 @@ minetest.register_node("maptools:tree", { 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}, + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_wood_defaults(), on_place = minetest.rotate_node }) @@ -43,7 +46,7 @@ minetest.register_node("maptools:jungletree", { 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}, + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_wood_defaults(), on_place = minetest.rotate_node }) @@ -54,7 +57,7 @@ minetest.register_node("maptools:cactus", { 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}, + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_wood_defaults(), on_place = minetest.rotate_node }) @@ -75,7 +78,7 @@ minetest.register_node("maptools:papyrus", { type = "fixed", fixed = {-0.375, -0.5, -0.375, 0.375, 0.5, 0.375} }, - groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative}, + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_leaves_defaults(), }) @@ -85,7 +88,7 @@ minetest.register_node("maptools:dirt", { stack_max = 10000, tiles = {"default_dirt.png"}, 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(), }) @@ -95,7 +98,7 @@ minetest.register_node("maptools:wood", { stack_max = 10000, tiles = {"default_wood.png"}, 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(), }) @@ -105,7 +108,7 @@ minetest.register_node("maptools:junglewood", { stack_max = 10000, tiles = {"default_junglewood.png"}, 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(), }) @@ -118,7 +121,7 @@ minetest.register_node("maptools:glass", { paramtype = "light", sunlight_propagates = true, 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(), }) @@ -130,7 +133,7 @@ minetest.register_node("maptools:leaves", { tiles = {"default_leaves.png"}, paramtype = "light", 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(), }) @@ -140,7 +143,7 @@ minetest.register_node("maptools:sand", { stack_max = 10000, tiles = {"default_sand.png"}, 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(), }) @@ -150,7 +153,7 @@ minetest.register_node("maptools:gravel", { stack_max = 10000, tiles = {"default_gravel.png"}, 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_gravel_footstep", gain=0.35}, dug = {name="default_gravel_footstep", gain=0.6}, @@ -163,7 +166,7 @@ minetest.register_node("maptools:clay", { stack_max = 10000, tiles = {"default_clay.png"}, 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(), }) @@ -173,7 +176,7 @@ minetest.register_node("maptools:desert_sand", { stack_max = 10000, tiles = {"default_desert_sand.png"}, 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(), }) @@ -183,7 +186,7 @@ minetest.register_node("maptools:sandstone", { stack_max = 10000, tiles = {"default_sandstone.png"}, 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(), }) @@ -193,7 +196,7 @@ minetest.register_node("maptools:sandstone_brick", { stack_max = 10000, tiles = {"default_sandstone_brick.png"}, 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(), }) @@ -203,7 +206,7 @@ minetest.register_node("maptools:desert_stone", { stack_max = 10000, tiles = {"default_desert_stone.png"}, 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(), }) @@ -213,7 +216,7 @@ minetest.register_node("maptools:desert_cobble", { stack_max = 10000, tiles = {"default_desert_cobble.png"}, 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(), }) @@ -223,7 +226,7 @@ minetest.register_node("maptools:desert_stonebrick", { stack_max = 10000, tiles = {"default_desert_stone_brick.png"}, 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(), }) @@ -234,7 +237,7 @@ minetest.register_node("maptools:grass", { 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}, + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_dirt_defaults({ footstep = {name="default_grass_footstep", gain = 0.4}, }), @@ -246,7 +249,7 @@ minetest.register_node("maptools:fullgrass", { stack_max = 10000, tiles = {"default_grass.png"}, 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}, }), @@ -267,7 +270,7 @@ for slab_num = 1,3,1 do paramtype = "light", paramtype2 = "facedir", 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}}), }) end @@ -278,7 +281,7 @@ minetest.register_node("maptools:cobble", { stack_max = 10000, tiles = {"default_cobble.png"}, 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(), }) @@ -288,7 +291,7 @@ minetest.register_node("maptools:mossycobble", { stack_max = 10000, tiles = {"default_mossycobble.png"}, 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(), }) @@ -298,7 +301,7 @@ minetest.register_node("maptools:brick", { stack_max = 10000, tiles = {"default_brick.png"}, 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(), }) @@ -308,7 +311,7 @@ minetest.register_node("maptools:coalblock", { stack_max = 10000, tiles = {"default_coal_block.png"}, 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(), }) @@ -319,7 +322,7 @@ minetest.register_node("maptools:steelblock", { stack_max = 10000, tiles = {"default_steel_block.png"}, 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(), }) @@ -329,7 +332,7 @@ minetest.register_node("maptools:goldblock", { stack_max = 10000, tiles = {"default_gold_block.png"}, 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(), }) @@ -339,7 +342,7 @@ minetest.register_node("maptools:copperblock", { stack_max = 10000, tiles = {"default_copper_block.png"}, 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(), }) @@ -349,7 +352,7 @@ minetest.register_node("maptools:bronzeblock", { stack_max = 10000, tiles = {"default_bronze_block.png"}, 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(), }) @@ -359,7 +362,7 @@ minetest.register_node("maptools:diamondblock", { stack_max = 10000, tiles = {"default_diamond_block.png"}, 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(), }) @@ -371,7 +374,7 @@ minetest.register_node("maptools:soil_wet", { 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}, + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, soil = 3, wet = 1, grassland = 1}, sounds = default.node_sound_dirt_defaults(), }) @@ -381,6 +384,6 @@ minetest.register_node("maptools:desert_sand_soil_wet", { 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}, + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, soil = 3, wet = 1, desert = 1}, sounds = default.node_sound_sand_defaults(), }) diff --git a/mods/maptools/init.lua b/mods/maptools/init.lua index c5178fae..adf90453 100644 --- a/mods/maptools/init.lua +++ b/mods/maptools/init.lua @@ -1,17 +1,31 @@ -MAPTOOLS_CREATIVE = 1 -- Set this to 0 if you want Map Tools nodes and items to appear in the creative inventory. +--[[ +===================================================================== +** Map Tools ** +By Calinou. --- Load translation library if intllib is installed +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 - dofile(minetest.get_modpath("intllib").."/intllib.lua") - S = intllib.Getter(minetest.get_current_modname()) - else - S = function ( s ) return s end +if minetest.get_modpath("intllib") then + S = intllib.Getter() +else + S = function(s) return s end end +maptools.intllib = S -dofile(minetest.get_modpath("maptools").."/aliases.lua") -dofile(minetest.get_modpath("maptools").."/default_nodes.lua") +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") --[[ Map Tools by Calinou @@ -24,7 +38,7 @@ minetest.register_node(":default:cloud", { description = S("Cloud"), tiles = {"default_cloud.png"}, drop = "", - groups = {unbreakable = 1, not_in_creative_inventory = MAPTOOLS_CREATIVE}, + groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_defaults(), }) @@ -36,430 +50,6 @@ minetest.register_craft({ burntime = 1000000000, }) --- 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 = 99, - drawtype = "nodebox", - visual_scale = 1.0, - tiles = {"maptools_super_apple_top.png","maptools_super_apple_bottom.png","maptools_super_apple_side.png"}, - inventory_image = "maptools_superapple.png", - paramtype = "light", - sunlight_propagates = true, - walkable = false, - node_box = { - type = "fixed", - fixed = { - {-3/16, -7/16, -3/16, 3/16, 1/16, 3/16}, - {-4/16, -6/16, -3/16, 4/16, 0, 3/16}, - {-3/16, -6/16, -4/16, 3/16, 0, 4/16}, - {-1/32, 1/16, -1/32, 1/32, 4/16, 1/32}, - {-1/16, 1.6/16, 0, 1/16, 1.8/16, 1/16}, - {-2/16, 1.4/16, 1/16, 1/16, 1.6/16, 2/16}, - {-2/16, 1.2/16, 2/16, 0, 1.4/16, 3/16}, - {-1.5/16, 1/16, .5/16, 0.5/16, 1.2/16, 2.5/16}, - } - }, - is_ground_content = true, - groups = {fleshy = 3, dig_immediate = 3, not_in_creative_inventory = 0, flammable = 2, leafdecay = 3, leafdecay_drop = 1}, - on_use = minetest.item_eat(20), - sounds = default.node_sound_leaves_defaults(), - after_place_node = function(pos, placer, itemstack) - if placer:is_player() then - minetest.set_node(pos, {name = "maptools:superapple", param2= 1}) - end - end, -}) - -- Items minetest.register_craftitem("maptools:copper_coin", { @@ -467,7 +57,7 @@ minetest.register_craftitem("maptools: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}, + groups = {not_in_creative_inventory = maptools.creative}, }) minetest.register_craftitem("maptools:silver_coin", { @@ -475,7 +65,7 @@ minetest.register_craftitem("maptools: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}, + groups = {not_in_creative_inventory = maptools.creative}, }) minetest.register_craftitem("maptools:gold_coin", { @@ -483,58 +73,14 @@ minetest.register_craftitem("maptools: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}, + 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}, -}) - --- Tools - -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}, - }, + groups = {not_in_creative_inventory = maptools.creative}, }) minetest.register_on_punchnode(function(pos, node, puncher) @@ -547,5 +93,5 @@ minetest.register_on_punchnode(function(pos, node, puncher) end) if minetest.setting_getbool("log_mods") then - minetest.log("action", "Carbone: [maptools] loaded.") + minetest.log("action", S("[maptools] loaded.")) end diff --git a/mods/maptools/nodes.lua b/mods/maptools/nodes.lua new file mode 100644 index 00000000..ad5ff1f1 --- /dev/null +++ b/mods/maptools/nodes.lua @@ -0,0 +1,444 @@ +--[[ +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 = 99, + drawtype = "nodebox", + visual_scale = 1.0, + tiles = {"maptools_super_apple_top.png","maptools_super_apple_bottom.png","maptools_super_apple_side.png"}, + inventory_image = "maptools_superapple.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + node_box = { + type = "fixed", + fixed = { + {-3/16, -7/16, -3/16, 3/16, 1/16, 3/16}, + {-4/16, -6/16, -3/16, 4/16, 0, 3/16}, + {-3/16, -6/16, -4/16, 3/16, 0, 4/16}, + {-1/32, 1/16, -1/32, 1/32, 4/16, 1/32}, + {-1/16, 1.6/16, 0, 1/16, 1.8/16, 1/16}, + {-2/16, 1.4/16, 1/16, 1/16, 1.6/16, 2/16}, + {-2/16, 1.2/16, 2/16, 0, 1.4/16, 3/16}, + {-1.5/16, 1/16, .5/16, 0.5/16, 1.2/16, 2.5/16}, + } + }, + is_ground_content = true, + groups = {fleshy=3, dig_immediate=3, not_in_creative_inventory = 0, flammable = 2, leafdecay = 3, leafdecay_drop = 1}, + on_use = minetest.item_eat(20), + sounds = default.node_sound_defaults(), + after_place_node = function(pos, placer, itemstack) + if placer:is_player() then + minetest.set_node(pos, {name = "maptools:superapple", param2= 1}) + end + end, +}) diff --git a/mods/maptools/textures/maptools_super_apple_bottom.png b/mods/maptools/textures/maptools_super_apple_bottom.png index 97f61e171c0291015d80fb19c8cbae5a11436b2b..46495124e13385547cfe33a68780d581b2602a9c 100644 GIT binary patch delta 276 zcmV+v0qg#!0^S0UQ-25&0yUq5!>#}T0P9IaK~y-)<&nEe13?&tzxij}9oYpj?#4n8 zTtu|D_YG|AeL)|<*3v2|QVBLnSWUbX(d?2Li%FxiXd1Ebl!tRZ{tNu3w$EVa{4XKp zX#jjD)n#5^;zeM54@SfOLGY{NIB&Yjc?P{rND{Cq?CmNR3x7{N!uO9pLn44kD3@Dn z7Dh+c00000F#X^LTB6muW zCRP?XmX&9-u(l8pSvDy?B8i(|6H;Wl9sax-Soo%nS2*2%2|1h<@JUI`Y#QzW!vMxW zQK(;*+xsLI76IoJAOd*~A;3Jt!MxXSl9ZE#;o&2psM2c|E>pm Ws5Oa7^tD$20000|YQ>_~q11i7CV5`|RPJb01?!ZJaIr8_D)39Hf z;B*M-5SCAnBye~TVXbBL4Ex7*Cdfe5!`WzuY}5nU1?dsVlE?d(VA~*rB!+A+0={7| z;MR>91O}T|K+-yl0!mSIFnE8%Px}em9Op`kvf~Dec?s1DZ2kr3w=n2;e8!t8uBv>X kx*aj-!^s))=NF&p0~B#UZcflJn*aa+07*qoM6N<$f?MH&aR2}S delta 220 zcmV<203-kC0;d9yQ-2v16C>4RbC3W40JKR&K~y-)<&iN8gFqBSpUY>F#X^LTB6muW zCRP?XmX&9-u(l8pSvDy?B8i(|6H;Wl9sax-Soo%nS2*2%2|1h<@JUI`Y#QzW!vMxW zQK(;*+xsLI76IoJAOd*~A;3Jt!MxXSl9ZE#;o&2psM2c|E>pm Ws5Oa7^tD$20000+eHh=!c#0ngrPIg2wFR@;eXp|+Pz*+>L78W>f!QJ(;Nb2?g=)U!t z2@m|LK6AuJ6Ph4wv*vCy)FPFNA7_joEHU#Nok)R zrKsDxPU3bq!%H)Nwv+DBXGDSA)9}6{Ga;RJ-}_wCvY8(o&B!!VP*70#1W2D%ciGCF Qs{jB107*qoM6N<$f}1?4jsO4v delta 425 zcmV;a0apIJ1M&lqQ-2v15;M`rQndg80e?wEK~z}7?Ulby!cY{(e=W7;pM*dZWpuy< zHzyMx!NoA~01S@$2FAt3fyISY7UK)}A|%F9BS9okBtia^UWdyy=^`~il-O_ia?;y# z&-wbD9taR1z<-D4_h7Y(0MK1-%KA&WbNmt zuBY?S$jgPo_jk;#z(sk!6voVNG|g|Cl4F)^XtWUpAnAm-zJtrNE&%nqJlAUZE8y2X z;9G%gR`UJr8pkIQ(t|hv>9~|8mm5u|pu7D8WOaz