2014-05-01 21:35:59 +02:00
|
|
|
maptools_creative = 1 -- Set this to 0 if you want Map Tools nodes and items to appear in the creative inventory.
|
|
|
|
|
2013-07-11 20:32:37 +02:00
|
|
|
-- Load translation library if intllib is installed
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
dofile(minetest.get_modpath("maptools").."/aliases.lua")
|
|
|
|
|
|
|
|
--[[
|
2014-05-01 21:35:59 +02:00
|
|
|
Map Tools by Calinou
|
|
|
|
Licensed under the zlib license for code and CC BY-SA 3.0 for textures, see LICENSE.txt for info.
|
2013-07-11 20:32:37 +02:00
|
|
|
--]]
|
|
|
|
|
2014-05-01 21:35:59 +02:00
|
|
|
-- Redefine cloud so that the admin pickaxe can mine it.
|
2013-07-11 20:32:37 +02:00
|
|
|
|
|
|
|
minetest.register_node(":default:cloud", {
|
|
|
|
description = S("Cloud"),
|
|
|
|
tiles = {"default_cloud.png"},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Items
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "maptools:infinitefuel",
|
|
|
|
burntime = 1000000000,
|
|
|
|
})
|
|
|
|
|
2014-05-01 21:35:59 +02:00
|
|
|
-- Nodes
|
2013-07-11 20:32:37 +02:00
|
|
|
|
2014-05-10 21:14:10 +02:00
|
|
|
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(),
|
|
|
|
})
|
|
|
|
|
2013-07-11 20:32:37 +02:00
|
|
|
minetest.register_node("maptools:stone", {
|
|
|
|
description = S("Unbreakable Stone"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-02 22:03:22 +02:00
|
|
|
tiles = {"default_stone.png"},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:tree", {
|
|
|
|
description = S("Unbreakable Tree"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
tiles = {"default_tree.png"},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:dirt", {
|
|
|
|
description = S("Unbreakable Dirt"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
tiles = {"default_dirt.png"},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_dirt_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:wood", {
|
|
|
|
description = S("Unbreakable Wooden Planks"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
tiles = {"default_wood.png"},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:glass", {
|
|
|
|
description = S("Unbreakable Glass"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
drawtype = "glasslike",
|
|
|
|
tiles = {"default_glass.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:leaves", {
|
|
|
|
description = S("Unbreakable Leaves"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
drawtype = "allfaces_optional",
|
|
|
|
tiles = {"default_leaves.png"},
|
|
|
|
paramtype = "light",
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:sand", {
|
|
|
|
description = S("Unbreakable Sand"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
tiles = {"default_sand.png"},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_sand_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:gravel", {
|
|
|
|
description = S("Unbreakable Gravel"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
tiles = {"default_gravel.png"},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_dirt_defaults({
|
2014-05-01 21:35:59 +02:00
|
|
|
footstep = {name="default_gravel_footstep", gain=0.35},
|
|
|
|
dug = {name="default_gravel_footstep", gain=0.6},
|
2013-07-11 20:32:37 +02:00
|
|
|
}),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:desert_sand", {
|
|
|
|
description = S("Unbreakable Desert Sand"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
tiles = {"default_desert_sand.png"},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_sand_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:sandstone", {
|
|
|
|
description = S("Unbreakable Sandstone"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
tiles = {"default_sandstone.png"},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:desert_stone", {
|
|
|
|
description = S("Unbreakable Desert Stone"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
tiles = {"default_desert_stone.png"},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:grass", {
|
|
|
|
description = S("Unbreakable Dirt with Grass"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
2014-05-24 12:14:12 +02:00
|
|
|
paramtype2 = "facedir",
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_dirt_defaults({
|
2014-05-24 12:14:12 +02:00
|
|
|
footstep = {name="default_grass_footstep", gain = 0.4},
|
2013-07-11 20:32:37 +02:00
|
|
|
}),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:fullgrass", {
|
|
|
|
description = S("Unbreakable Full Grass"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
tiles = {"default_grass.png"},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_dirt_defaults({
|
|
|
|
footstep = {name="default_grass_footstep", gain=0.4},
|
|
|
|
}),
|
|
|
|
})
|
|
|
|
|
2014-05-24 12:14:12 +02:00
|
|
|
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
|
|
|
|
|
2013-07-11 20:32:37 +02:00
|
|
|
minetest.register_node("maptools:cobble", {
|
|
|
|
description = S("Unbreakable Cobblestone"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
tiles = {"default_cobble.png"},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:mossycobble", {
|
|
|
|
description = S("Unbreakable Mossy Cobblestone"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
tiles = {"default_mossycobble.png"},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:brick", {
|
|
|
|
description = S("Unbreakable Brick"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
tiles = {"default_brick.png"},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:playerclip", {
|
|
|
|
description = S("Player Clip"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-01 21:35:59 +02:00
|
|
|
inventory_image = "default_steel_block.png^dye_green.png",
|
2013-07-11 20:32:37 +02:00
|
|
|
drawtype = "airlike",
|
|
|
|
paramtype = "light",
|
|
|
|
pointable = false,
|
|
|
|
sunlight_propagates = true,
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:fullclip", {
|
|
|
|
description = S("Full Clip"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-01 21:35:59 +02:00
|
|
|
inventory_image = "default_steel_block.png^dye_blue.png",
|
2013-07-11 20:32:37 +02:00
|
|
|
drawtype = "airlike",
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
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},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:fullclip_face", {
|
|
|
|
description = S("Full Clip Face"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-01 21:35:59 +02:00
|
|
|
inventory_image = "default_steel_block.png^dye_white.png",
|
2013-07-11 20:32:37 +02:00
|
|
|
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},
|
|
|
|
},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative, fall_damage_add_percent=-100},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:playerclip_bottom", {
|
|
|
|
description = S("Player Clip Bottom Face"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-01 21:35:59 +02:00
|
|
|
inventory_image = "default_steel_block.png^dye_orange.png",
|
2013-07-11 20:32:37 +02:00
|
|
|
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},
|
|
|
|
},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative, fall_damage_add_percent=-100},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:playerclip_top", {
|
|
|
|
description = S("Player Clip Top Face"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-01 21:35:59 +02:00
|
|
|
inventory_image = "default_steel_block.png^dye_yellow.png",
|
2013-07-11 20:32:37 +02:00
|
|
|
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},
|
|
|
|
},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative, fall_damage_add_percent=-100},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
for pusher_num=1,10,1 do
|
|
|
|
minetest.register_node("maptools:pusher_" .. pusher_num, {
|
2014-05-01 21:35:59 +02:00
|
|
|
description = S("Pusher (%s)"):format(pusher_num),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-01 21:35:59 +02:00
|
|
|
inventory_image = "default_steel_block.png^default_apple.png",
|
2013-07-11 20:32:37 +02:00
|
|
|
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},
|
|
|
|
},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative, fall_damage_add_percent=-100, bouncy=pusher_num*100},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
minetest.register_node("maptools:lightbulb", {
|
|
|
|
description = S("Light Bulb"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-01 21:35:59 +02:00
|
|
|
inventory_image = "default_steel_block.png^default_mese_crystal_fragment.png",
|
2013-07-11 20:32:37 +02:00
|
|
|
drawtype = "airlike",
|
|
|
|
walkable = false,
|
|
|
|
pointable = false,
|
|
|
|
light_source = 15,
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:nobuild", {
|
|
|
|
description = S("Build Prevention"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-01 21:35:59 +02:00
|
|
|
inventory_image = "default_steel_block.png^bones_bones.png",
|
2013-07-11 20:32:37 +02:00
|
|
|
drawtype = "airlike",
|
|
|
|
walkable = false,
|
|
|
|
pointable = false,
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:nointeract", {
|
|
|
|
description = S("Interact Prevention"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-01 21:35:59 +02:00
|
|
|
inventory_image = "default_steel_block.png^default_scorched_stuff.png",
|
2013-07-11 20:32:37 +02:00
|
|
|
drawtype = "airlike",
|
|
|
|
walkable = false,
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:climb", {
|
|
|
|
description = S("Climb Block"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-01 21:35:59 +02:00
|
|
|
inventory_image = "default_steel_block.png^default_ladder.png",
|
2013-07-11 20:32:37 +02:00
|
|
|
drawtype = "airlike",
|
|
|
|
walkable = false,
|
|
|
|
climbable = true,
|
|
|
|
pointable = false,
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
for damage_num=1,5,1 do
|
|
|
|
minetest.register_node("maptools:damage_" .. damage_num, {
|
2014-05-01 21:35:59 +02:00
|
|
|
description = S("Damaging Block (%s)"):format(damage_num),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-01 21:35:59 +02:00
|
|
|
inventory_image = "default_steel_block.png^farming_cotton_" .. damage_num .. ".png",
|
2013-07-11 20:32:37 +02:00
|
|
|
drawtype = "airlike",
|
|
|
|
walkable = false,
|
|
|
|
pointable = false,
|
|
|
|
damage_per_second = damage_num,
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
minetest.register_node("maptools:kill", {
|
|
|
|
description = S("Kill Block"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-01 21:35:59 +02:00
|
|
|
inventory_image = "default_steel_block.png^dye_black.png",
|
2013-07-11 20:32:37 +02:00
|
|
|
drawtype = "airlike",
|
|
|
|
walkable = false,
|
|
|
|
pointable = false,
|
|
|
|
damage_per_second = 20,
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:smoke", {
|
|
|
|
description = S("Smoke Block"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
tiles = {"maptools_smoke.png"},
|
|
|
|
drawtype = "allfaces_optional",
|
|
|
|
walkable = false,
|
|
|
|
paramtype = "light",
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2014-05-07 22:29:01 +02:00
|
|
|
post_effect_color = {a=192, r=96, g=96, b=96},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:ladder", {
|
|
|
|
description = S("Fake Ladder"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
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",
|
|
|
|
},
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:permanent_fire", {
|
|
|
|
description = S("Permanent Fire"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
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,
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sunlight_propagates = true,
|
|
|
|
walkable = false,
|
|
|
|
damage_per_second = 4,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:fake_fire", {
|
|
|
|
description = S("Fake Fire"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2013-07-11 20:32:37 +02:00
|
|
|
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,
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sunlight_propagates = true,
|
|
|
|
walkable = false,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("maptools:igniter", {
|
|
|
|
drawtype = "airlike",
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-01 21:35:59 +02:00
|
|
|
inventory_image = "default_steel_block.png^crosshair.png",
|
2013-07-11 20:32:37 +02:00
|
|
|
description = S("Igniter"),
|
|
|
|
paramtype = "light",
|
|
|
|
inventory_image = "fire_basic_flame.png",
|
2014-05-01 21:35:59 +02:00
|
|
|
drop = "",
|
2014-05-10 21:14:10 +02:00
|
|
|
groups = {igniter=2, unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
sunlight_propagates = true,
|
|
|
|
pointable = false,
|
|
|
|
walkable = false,
|
|
|
|
})
|
|
|
|
|
2014-05-03 19:19:19 +02:00
|
|
|
minetest.register_node("maptools:superapple", {
|
|
|
|
description = S("Super Apple"),
|
|
|
|
range = 12,
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-03 19:19:19 +02:00
|
|
|
drawtype = "plantlike",
|
|
|
|
visual_scale = 1.0,
|
|
|
|
tiles = {"maptools_superapple.png"},
|
|
|
|
inventory_image = "maptools_superapple.png",
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
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(),
|
|
|
|
})
|
|
|
|
|
2013-07-11 20:32:37 +02:00
|
|
|
-- Items
|
|
|
|
|
|
|
|
minetest.register_craftitem("maptools:copper_coin", {
|
|
|
|
description = S("Copper Coin"),
|
|
|
|
inventory_image = "maptools_copper_coin.png",
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-01 21:35:59 +02:00
|
|
|
groups = {not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("maptools:silver_coin", {
|
|
|
|
description = S("Silver Coin"),
|
|
|
|
inventory_image = "maptools_silver_coin.png",
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-01 21:35:59 +02:00
|
|
|
groups = {not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("maptools:gold_coin", {
|
|
|
|
description = S("Gold Coin"),
|
|
|
|
inventory_image = "maptools_gold_coin.png",
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-01 21:35:59 +02:00
|
|
|
groups = {not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("maptools:infinitefuel", {
|
|
|
|
description = S("Infinite Fuel"),
|
|
|
|
inventory_image = "maptools_infinitefuel.png",
|
2014-05-04 10:02:57 +02:00
|
|
|
stack_max = 10000,
|
2014-05-03 19:19:19 +02:00
|
|
|
groups = {not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Tools
|
|
|
|
|
|
|
|
minetest.register_tool("maptools:pick_admin", {
|
|
|
|
description = S("Admin Pickaxe"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2013-07-11 20:32:37 +02:00
|
|
|
inventory_image = "maptools_adminpick.png",
|
2014-05-01 21:35:59 +02:00
|
|
|
groups = {not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
tool_capabilities = {
|
2014-05-03 12:42:54 +02:00
|
|
|
full_punch_interval = 0.1,
|
2014-05-01 21:35:59 +02:00
|
|
|
max_drop_level = 3,
|
2013-07-11 20:32:37 +02:00
|
|
|
groupcaps= {
|
2014-05-03 12:42:54 +02:00
|
|
|
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},
|
2014-05-03 19:19:19 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 1000},
|
2013-07-11 20:32:37 +02:00
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_tool("maptools:pick_admin_with_drops", {
|
2014-05-01 21:35:59 +02:00
|
|
|
description = S("Admin Pickaxe with Drops"),
|
2014-05-03 12:42:54 +02:00
|
|
|
range = 12,
|
2013-07-11 20:32:37 +02:00
|
|
|
inventory_image = "maptools_adminpick.png",
|
2014-05-01 21:35:59 +02:00
|
|
|
groups = {not_in_creative_inventory = maptools_creative},
|
2013-07-11 20:32:37 +02:00
|
|
|
tool_capabilities = {
|
2014-05-03 19:19:19 +02:00
|
|
|
full_punch_interval = 0.35,
|
2014-05-01 21:35:59 +02:00
|
|
|
max_drop_level = 3,
|
2014-05-03 19:19:19 +02:00
|
|
|
groupcaps = {
|
2014-05-03 12:42:54 +02:00
|
|
|
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},
|
2014-05-03 19:19:19 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 1000},
|
2013-07-11 20:32:37 +02:00
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_on_punchnode(function(pos, node, puncher)
|
|
|
|
if puncher:get_wielded_item():get_name() == "maptools:pick_admin"
|
2014-05-07 19:43:36 +02:00
|
|
|
and minetest.get_node(pos).name ~= "air" then
|
|
|
|
minetest.log("action", minetest.get_node(pos).name .. " was removed using an Admin Pickaxe at " .. minetest.pos_to_string(pos) .. ".")
|
|
|
|
minetest.remove_node(pos) -- The node is removed directly, which means it even works on non-empty containers and group-less nodes.
|
2013-07-11 20:32:37 +02:00
|
|
|
end
|
|
|
|
end)
|
2013-07-11 21:53:34 +02:00
|
|
|
|
2014-04-30 20:04:44 +02:00
|
|
|
if minetest.setting_getbool("log_mods") then
|
|
|
|
print(S("[maptools] loaded."))
|
|
|
|
end
|