mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-09 12:00:17 +01:00
Maptool's update
This commit is contained in:
parent
e1ba20639b
commit
a19c57fe44
|
@ -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:
|
||||
|
45
mods/maptools/NODES.md
Normal file
45
mods/maptools/NODES.md
Normal file
|
@ -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.
|
11
mods/maptools/README.md
Normal file
11
mods/maptools/README.md
Normal file
|
@ -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>
|
|
@ -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
|
|
@ -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.
|
|
@ -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")
|
||||
|
@ -69,8 +74,6 @@ minetest.register_alias("fake_fire", "maptools:fake_fire")
|
|||
minetest.register_alias("ffire", "maptools:fake_fire")
|
||||
minetest.register_alias("igniter", "maptools:igniter")
|
||||
|
||||
-- Unbreakable block aliases
|
||||
|
||||
minetest.register_alias("stone_u", "maptools:stone")
|
||||
minetest.register_alias("tree_u", "maptools:tree")
|
||||
minetest.register_alias("cobble_u", "maptools:cobble")
|
||||
|
|
29
mods/maptools/config.lua
Normal file
29
mods/maptools/config.lua
Normal file
|
@ -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)
|
47
mods/maptools/craftitems.lua
Normal file
47
mods/maptools/craftitems.lua
Normal file
|
@ -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,
|
||||
})
|
|
@ -1,12 +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"),
|
||||
|
@ -14,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(),
|
||||
})
|
||||
|
||||
|
@ -24,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(),
|
||||
})
|
||||
|
||||
|
@ -34,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
|
||||
})
|
||||
|
@ -45,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
|
||||
})
|
||||
|
@ -56,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
|
||||
})
|
||||
|
@ -77,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(),
|
||||
})
|
||||
|
||||
|
@ -87,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(),
|
||||
})
|
||||
|
||||
|
@ -97,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(),
|
||||
})
|
||||
|
||||
|
@ -107,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(),
|
||||
})
|
||||
|
||||
|
@ -120,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(),
|
||||
})
|
||||
|
||||
|
@ -132,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(),
|
||||
})
|
||||
|
||||
|
@ -142,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(),
|
||||
})
|
||||
|
||||
|
@ -152,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},
|
||||
|
@ -165,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(),
|
||||
})
|
||||
|
||||
|
@ -175,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(),
|
||||
})
|
||||
|
||||
|
@ -185,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(),
|
||||
})
|
||||
|
||||
|
@ -195,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(),
|
||||
})
|
||||
|
||||
|
@ -205,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(),
|
||||
})
|
||||
|
||||
|
@ -215,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(),
|
||||
})
|
||||
|
||||
|
@ -225,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(),
|
||||
})
|
||||
|
||||
|
@ -236,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},
|
||||
}),
|
||||
|
@ -248,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},
|
||||
}),
|
||||
|
@ -269,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
|
||||
|
@ -280,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(),
|
||||
})
|
||||
|
||||
|
@ -290,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(),
|
||||
})
|
||||
|
||||
|
@ -300,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(),
|
||||
})
|
||||
|
||||
|
@ -310,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(),
|
||||
})
|
||||
|
||||
|
@ -321,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(),
|
||||
})
|
||||
|
||||
|
@ -331,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(),
|
||||
})
|
||||
|
||||
|
@ -341,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(),
|
||||
})
|
||||
|
||||
|
@ -351,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,9 +360,9 @@ minetest.register_node("maptools:diamondblock", {
|
|||
description = S("Unbreakable Diamond Block"),
|
||||
range = 12,
|
||||
stack_max = 10000,
|
||||
tiles = {"default_diamond_block.png"},
|
||||
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(),
|
||||
})
|
||||
|
||||
|
@ -373,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(),
|
||||
})
|
||||
|
||||
|
@ -383,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(),
|
||||
})
|
||||
|
|
|
@ -1,551 +1,32 @@
|
|||
MAPTOOLS_CREATIVE = 1 -- Set this to 0 if you want Map Tools nodes and items to appear in the creative inventory.
|
||||
|
||||
-- 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")
|
||||
dofile(minetest.get_modpath("maptools").."/default_nodes.lua")
|
||||
|
||||
--[[
|
||||
Map Tools by Calinou
|
||||
Licensed under the zlib license for code and CC BY-SA 3.0 for textures, see LICENSE.txt for info.
|
||||
=====================================================================
|
||||
** Map Tools **
|
||||
By Calinou.
|
||||
|
||||
Copyright (c) 2012-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
=====================================================================
|
||||
--]]
|
||||
|
||||
-- Redefine cloud so that the admin pickaxe can mine it.
|
||||
maptools = {}
|
||||
|
||||
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(),
|
||||
})
|
||||
|
||||
-- Items
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "maptools:infinitefuel",
|
||||
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},
|
||||
})
|
||||
local S
|
||||
if minetest.get_modpath("intllib") then
|
||||
S = intllib.Getter()
|
||||
else
|
||||
S = function(s) return s end
|
||||
end
|
||||
maptools.intllib = S
|
||||
|
||||
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},
|
||||
})
|
||||
local modpath = minetest.get_modpath("maptools")
|
||||
|
||||
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", {
|
||||
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},
|
||||
})
|
||||
|
||||
-- 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},
|
||||
},
|
||||
})
|
||||
|
||||
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)
|
||||
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", "Carbone: [maptools] loaded.")
|
||||
minetest.log("action", S("[maptools] loaded."))
|
||||
end
|
||||
|
|
429
mods/maptools/nodes.lua
Normal file
429
mods/maptools/nodes.lua
Normal file
|
@ -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(),
|
||||
})
|
Binary file not shown.
Before Width: | Height: | Size: 295 B |
Binary file not shown.
Before Width: | Height: | Size: 295 B |
Binary file not shown.
Before Width: | Height: | Size: 498 B |
61
mods/maptools/tools.lua
Normal file
61
mods/maptools/tools.lua
Normal file
|
@ -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)
|
Loading…
Reference in New Issue
Block a user