Fix maptools

master
Lejo1 2020-06-29 12:20:34 +02:00
parent 87a7bc13ea
commit 2e1655aabf
No known key found for this signature in database
GPG Key ID: 7249ED75EF7EBABC
38 changed files with 1 additions and 1651 deletions

1
mods/maptools Submodule

@ -0,0 +1 @@
Subproject commit b537954edfb10d4e592598f133bce87107ebdc02

View File

@ -1,13 +0,0 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.{lua,luacheckrc}]
indent_style = tab
indent_size = 4

View File

@ -1,29 +0,0 @@
std = "lua51+minetest"
unused_args = false
allow_defined_top = true
max_line_length = 90
globals = {
"maptools"
}
stds.minetest = {
read_globals = {
"DIR_DELIM",
"minetest",
"core",
"dump",
"vector",
"nodeupdate",
"VoxelManip",
"VoxelArea",
"PseudoRandom",
"ItemStack",
"default",
table = {
fields = {
"copy",
},
},
}
}

View File

@ -1,9 +0,0 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
args: [--fix=lf]

View File

@ -1,15 +0,0 @@
dist: bionic
language: python
python:
- 3.7.1
install:
- sudo apt-get update -qq
- sudo apt-get install -qqq luarocks
- pip3 install pre-commit
- luarocks install --local luacheck
script:
- pre-commit run --all-files
- $HOME/.luarocks/bin/luacheck .

View File

@ -1,49 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [2.1.0] - 2020-06-08
### Changed
- 10 coins of each type can now be crafted using 2 ingots (bronze, silver or gold).
- Silver coins require [More Ores](https://github.com/minetest-mods/moreores)
to be crafted, since minetest_game doesn't have silver ingots.
- Coins are now displayed in the creative inventory.
- Moved translations from intllib to Minetest's built-in localization system.
- This allows translations to show up independently of the server's language.
## [2.0.0] - 2019-11-25
### Changed
- The minimum supported Minetest version is now 5.0.0.
- Map Tools nodes/items can no longer be dropped to prevent them from falling
into bad hands.
### Fixed
- The inventory images of `no_interact`, `no_build`, `ignore_like_no_clip`
and `ignore_like_no_point` now use textures that are available in
Minetest Game 5.0.0.
## [1.1.0] - 2019-03-23
### Changed
- Increased the range of the Admin Pickaxe from 12 to 20 nodes.
- Updated intllib support to avoid using deprecated functions.
## 1.0.0 - 2017-02-19
- Initial versioned release.
[Unreleased]: https://github.com/minetest-mods/maptools/compare/v2.1.0...HEAD
[2.1.0]: https://github.com/minetest-mods/maptools/compare/v2.0.0...v2.1.0
[2.0.0]: https://github.com/minetest-mods/maptools/compare/v1.1.0...v2.0.0
[1.1.0]: https://github.com/minetest-mods/maptools/compare/v1.0.0...v1.1.0

View File

@ -1,10 +0,0 @@
# Contributing to Map Tools
Thank you for your interest in Map Tools! Before contributing,
be sure to know about these few guidelines:
- Contributions have to be licensed under the zlib license (or compatible)
for code, and CC BY-SA 3.0 (or compatible) for assets.
- Make sure to update the changelog, keeping the
[changelog format](http://keepachangelog.com/en/1.0.0/) we use.
- Don't bump the version yourself. Maintainers will do this when necessary.

View File

@ -1,13 +0,0 @@
# zlib license
Copyright © 2012-2020 Hugo Locurcio and contributors
**This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.**
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

View File

@ -1,40 +0,0 @@
# List of nodes/items
To use an item, make sure you have the `give` privilege, then use
`/give <player> <item code> [amount]` or `/giveme <item code> [amount]`.
**Tip:** To give yourself a large amount of items quickly (65535 as of writing),
use `-1` as the amount.
## Nodes
:warning: denotes an unpointable, unbreakable block; be very careful with them,
as they cannot be removed by hand (they can only be removed with
[WorldEdit](https://github.com/Uberi/Minetest-WorldEdit) or similar).
| Item code | Description |
| ----------------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `maptools:{block}_u` | Unbreakable, non-flammable, non-falling, non-decaying blocks. Most common default blocks have an unbreakable form available (`maptools:stone_u`, `maptools:wood_u`, …) |
| `maptools:full_grass` | Unbreakable block with the grass texture on all sides. |
| `maptools:player_clip` | :warning: Invisible, non-pointable block that blocks players and entities. |
| `maptools:full_clip` | Invisible, pointable block that blocks players and entities. Also available as a thin face (`maptools:full_clip_face`). |
| `maptools:smoke_block` | Some smoke (doesn't damage players or entities). |
| `maptools:no_build` | :warning: Very basic building prevention. |
| `maptools:no_interact` | Prevents interacting through the block (opening chests, furnaces, attacking entities, …), but can still be walked through. |
| `maptools:damage_{1…5}` | :warning: Damaging blocks which damage players by 1 to 5 HP per second. |
| `maptools:kill` | :warning: Instant kill blocks (damages players by 20 HP per second). |
| `maptools:drowning` | :warning: Simulates drowning in water. |
| `maptools:light_block` | :warning: Invisible non-solid block, prevents light from passing through. |
| `maptools:light_bulb` | :warning: Invisible non-solid block, emitting the maximum amount of light. |
## Items
| Item code | Description |
| -------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `maptools:admin_pick` | A bright magenta pickaxe with infinite durability, digs everything including unbreakable blocks instantly. No drops are given when digging nodes. |
| `maptools:admin_pick_with_drops` | Same as the admin pickaxe, but drops are given when digging nodes. |
| `maptools:infinite_fuel` | Fuel lasting for a near-infinite time (about 50 real-life years). |
| `maptools:super_apple` | A yellow apple which heals the player by 20 HP when used. |
| `maptools:copper_coin` | Decorative item (can be used in mini-games). |
| `maptools:silver_coin` | Decorative item (can be used in mini-games). |
| `maptools:gold_coin` | Decorative item (can be used in mini-games). |

View File

@ -1,75 +0,0 @@
# Map Tools
Map Tools for [Minetest](https://www.minetest.net/), a free and open source infinite
world block sandbox game.
## Resources
- [Forum topic](https://forum.minetest.net/viewtopic.php?f=11&t=1882)
- [List of nodes and items available](NODES_ITEMS.md)
## Installation
### Download the mod
To install Map Tools, clone this Git repository into your Minetest's `mods/`
directory:
```bash
git clone https://github.com/minetest-mods/maptools.git
```
You can also
[download a ZIP archive](https://github.com/minetest-mods/maptools/archive/master.zip)
of Map Tools.
### Enable the mod
Once you have installed Map Tools, you need to enable it in Minetest.
The procedure is as follows:
#### Using the client's main menu
This is the easiest way to enable Map Tools when playing in singleplayer
(or on a server hosted from a client).
1. Start Minetest and switch to the **Local Game** tab.
2. Select the world you want to enable Map Tools in.
3. Click **Configure**, then enable `maptools` by double-clicking it
(or ticking the **Enabled** checkbox).
4. Save the changes, then start a game on the world you enabled Map Tools on.
5. Map Tools should now be running on your world.
#### Using a text editor
This is the recommended way to enable the mod on a server without using a GUI.
1. Make sure Minetest is not currently running (otherwise, it will overwrite
the changes when exiting).
2. Open the world's `world.mt` file using a text editor.
3. Add the following line at the end of the file:
```text
load_mod_maptools = true
```
If the line is already present in the file, then replace `false` with `true`
on that line.
4. Save the file, then start a game on the world you enabled Map Tools on.
5. Map Tools should now be running on your world.
## Version compatibility
Map Tools is currently primarily tested with Minetest 5.1.0.
It may or may not work with newer or older versions. Issues arising in older
versions than 5.0.0 will generally not be fixed.
## License
Copyright © 2012-2020 Hugo Locurcio and contributors
- Map Tools code is licensed under the zlib license, see
[`LICENSE.md`](LICENSE.md) for details.
- Unless otherwise specified, Map Tools textures are licensed under
[CC BY-SA 3.0 Unported](https://creativecommons.org/licenses/by-sa/3.0/).

View File

@ -1,96 +0,0 @@
--[[
Map Tools: alias definitions
Copyright © 2012-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
minetest.register_alias("adminpick", "maptools:pick_admin")
minetest.register_alias("adminpickaxe", "maptools:pick_admin")
minetest.register_alias("admin_pick", "maptools:pick_admin")
minetest.register_alias("admin_pickaxe", "maptools:pick_admin")
minetest.register_alias("pick_admin", "maptools:pick_admin")
minetest.register_alias("pickaxe_admin", "maptools:pick_admin")
minetest.register_alias("pickadmin", "maptools:pick_admin")
minetest.register_alias("pickaxeadmin", "maptools:pick_admin")
minetest.register_alias("adminpickdrops", "maptools:pick_admin_with_drops")
minetest.register_alias("adminpickaxedrops", "maptools:pick_admin_with_drops")
minetest.register_alias("admin_pick_drops", "maptools:pick_admin_with_drops")
minetest.register_alias("admin_pickaxe_drops", "maptools:pick_admin_with_drops")
minetest.register_alias("pick_admin_drops", "maptools:pick_admin_with_drops")
minetest.register_alias("pickaxe_admin_drops", "maptools:pick_admin_with_drops")
minetest.register_alias("pickadmindrops", "maptools:pick_admin_with_drops")
minetest.register_alias("pickaxeadmindrops", "maptools:pick_admin_with_drops")
minetest.register_alias("infinitefuel", "maptools:infinitefuel")
minetest.register_alias("infinite_fuel", "maptools:infinitefuel")
minetest.register_alias("ifuel", "maptools:infinitefuel")
minetest.register_alias("superapple", "maptools:superapple")
minetest.register_alias("super_apple", "maptools:superapple")
minetest.register_alias("sapple", "maptools:superapple")
minetest.register_alias("nobuild", "maptools:nobuild")
minetest.register_alias("nointeract", "maptools:nointeract")
minetest.register_alias("damage_1", "maptools:damage_1")
minetest.register_alias("damage_2", "maptools:damage_2")
minetest.register_alias("damage_3", "maptools:damage_3")
minetest.register_alias("damage_4", "maptools:damage_4")
minetest.register_alias("damage_5", "maptools:damage_5")
minetest.register_alias("pusher_1", "maptools:pusher_1")
minetest.register_alias("pusher_2", "maptools:pusher_2")
minetest.register_alias("pusher_3", "maptools:pusher_3")
minetest.register_alias("pusher_4", "maptools:pusher_4")
minetest.register_alias("pusher_5", "maptools:pusher_5")
minetest.register_alias("pusher_6", "maptools:pusher_6")
minetest.register_alias("pusher_7", "maptools:pusher_7")
minetest.register_alias("pusher_8", "maptools:pusher_8")
minetest.register_alias("pusher_9", "maptools:pusher_9")
minetest.register_alias("pusher_10", "maptools:pusher_10")
minetest.register_alias("killblock", "maptools:kill")
minetest.register_alias("kill_block", "maptools:kill")
minetest.register_alias("lightblock", "maptools:lightblock")
minetest.register_alias("light_block", "maptools:lightblock")
minetest.register_alias("lightbulb", "maptools:lightbulb")
minetest.register_alias("light_bulb", "maptools:lightbulb")
minetest.register_alias("playerclip", "maptools:playerclip")
minetest.register_alias("player_clip", "maptools:playerclip")
minetest.register_alias("pclip", "maptools:playerclip")
minetest.register_alias("fullclip", "maptools:fullclip")
minetest.register_alias("full_clip", "maptools:fullclip")
minetest.register_alias("fclip", "maptools:fullclip")
minetest.register_alias("full_clip", "maptools:fullclip")
minetest.register_alias("full_clip_face", "maptools:fullclip_face")
minetest.register_alias("fullclip_face", "maptools:fullclip_face")
minetest.register_alias("fullclipface", "maptools:fullclip_face")
minetest.register_alias("player_clip_bottom", "maptools:playerclip_bottom")
minetest.register_alias("playerclip_bottom", "maptools:playerclip_bottom")
minetest.register_alias("playerclipbottom", "maptools:playerclip_bottom")
minetest.register_alias("player_clip_top", "maptools:playerclip_top")
minetest.register_alias("playerclip_top", "maptools:playerclip_top")
minetest.register_alias("playercliptop", "maptools:playerclip_top")
minetest.register_alias("permanentfire", "maptools:permanent_fire")
minetest.register_alias("permanent_fire", "maptools:permanent_fire")
minetest.register_alias("pfire", "maptools:permanent_fire")
minetest.register_alias("fakefire", "maptools:fake_fire")
minetest.register_alias("fake_fire", "maptools:fake_fire")
minetest.register_alias("ffire", "maptools:fake_fire")
minetest.register_alias("igniter", "maptools:igniter")
minetest.register_alias("stone_u", "maptools:stone")
minetest.register_alias("tree_u", "maptools:tree")
minetest.register_alias("cobble_u", "maptools:cobble")
minetest.register_alias("wood_u", "maptools:wood")
minetest.register_alias("sand_u", "maptools:sand")
minetest.register_alias("gravel_u", "maptools:gravel")
minetest.register_alias("brick_u", "maptools:brick")
minetest.register_alias("dirt_u", "maptools:dirt")
minetest.register_alias("glass_u", "maptools:glass")
minetest.register_alias("sandstone_u", "maptools:sandstone")
minetest.register_alias("desert_stone_u", "maptools:desert_stone")
minetest.register_alias("desertstone_u", "maptools:desert_stone")
minetest.register_alias("desert_sand_u", "maptools:desert_sand")
minetest.register_alias("desertsand_u", "maptools:desert_sand")
minetest.register_alias("leaves_u", "maptools:leaves")
minetest.register_alias("grass_u", "maptools:grass")
minetest.register_alias("fullgrass", "maptools:fullgrass")
minetest.register_alias("fullgrass_u", "maptools:fullgrass")
minetest.register_alias("mossycobble_u", "maptools:mossycobble")
minetest.register_alias("mossy_cobble_u", "maptools:mossycobble")

View File

@ -1,29 +0,0 @@
--[[
Map Tools: configuration handling
Copyright © 2012-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
maptools.config = {}
local function getbool_default(setting, default)
local value = minetest.settings:get_bool(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.settings:get("maptools." .. name) or default
end
end
-- Show Map Tools stuff in creative inventory (1 or 0):
setting("integer", "hide_from_creative_inventory", 1)

View File

@ -1,64 +0,0 @@
--[[
Map Tools: item definitions
Copyright © 2012-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
local S = maptools.S
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,
})
minetest.register_craft({
output = "maptools:copper_coin 10",
type = "shapeless",
recipe = { "default:copper_ingot", "default:copper_ingot" }
})
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,
})
if minetest.get_modpath("moreores") then
minetest.register_craft({
output = "maptools:silver_coin 10",
type = "shapeless",
recipe = { "moreores:silver_ingot", "moreores:silver_ingot" }
})
end
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,
})
minetest.register_craft({
output = "maptools:gold_coin 10",
type = "shapeless",
recipe = { "default:gold_ingot", "default:gold_ingot" }
})
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,
})

View File

@ -1,452 +0,0 @@
--[[
Map Tools: unbreakable default nodes
Copyright © 2012-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
local S = maptools.S
maptools.creative = maptools.config["hide_from_creative_inventory"]
minetest.register_node("maptools:stone", {
description = S("Unbreakable Stone"),
range = 12,
stack_max = 10000,
tiles = {"default_stone.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_stone_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:stonebrick", {
description = S("Unbreakable Stone Brick"),
range = 12,
stack_max = 10000,
tiles = {"default_stone_brick.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_stone_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:tree", {
description = S("Unbreakable Tree"),
range = 12,
stack_max = 10000,
tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node,
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:jungletree", {
description = S("Unbreakable Jungle Tree"),
range = 12,
stack_max = 10000,
tiles = {
"default_jungletree_top.png",
"default_jungletree_top.png",
"default_jungletree.png",
},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node,
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:cactus", {
description = S("Unbreakable Cactus"),
range = 12,
stack_max = 10000,
tiles = {"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node,
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:papyrus", {
description = S("Unbreakable Papyrus"),
drawtype = "plantlike",
range = 12,
stack_max = 10000,
tiles = {"default_papyrus.png"},
inventory_image = "default_papyrus.png",
wield_image = "default_papyrus.png",
walkable = false,
paramtype = "light",
sunlight_propagates = true,
drop = "",
selection_box = {
type = "fixed",
fixed = {-0.375, -0.5, -0.375, 0.375, 0.5, 0.375}
},
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_leaves_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:dirt", {
description = S("Unbreakable Dirt"),
range = 12,
stack_max = 10000,
tiles = {"default_dirt.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_dirt_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:wood", {
description = S("Unbreakable Wooden Planks"),
range = 12,
stack_max = 10000,
tiles = {"default_wood.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_wood_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:junglewood", {
description = S("Unbreakable Junglewood Planks"),
range = 12,
stack_max = 10000,
tiles = {"default_junglewood.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_wood_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:glass", {
description = S("Unbreakable Glass"),
range = 12,
stack_max = 10000,
drawtype = "glasslike",
tiles = {"default_glass.png"},
paramtype = "light",
sunlight_propagates = true,
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_glass_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:leaves", {
description = S("Unbreakable Leaves"),
range = 12,
stack_max = 10000,
drawtype = "allfaces_optional",
tiles = {"default_leaves.png"},
paramtype = "light",
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_leaves_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:sand", {
description = S("Unbreakable Sand"),
range = 12,
stack_max = 10000,
tiles = {"default_sand.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_sand_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:gravel", {
description = S("Unbreakable Gravel"),
range = 12,
stack_max = 10000,
tiles = {"default_gravel.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.35},
dug = {name="default_gravel_footstep", gain=0.6},
}),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:clay", {
description = S("Unbreakable Clay"),
range = 12,
stack_max = 10000,
tiles = {"default_clay.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_dirt_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:desert_sand", {
description = S("Unbreakable Desert Sand"),
range = 12,
stack_max = 10000,
tiles = {"default_desert_sand.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_sand_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:sandstone", {
description = S("Unbreakable Sandstone"),
range = 12,
stack_max = 10000,
tiles = {"default_sandstone.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_stone_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:sandstone_brick", {
description = S("Unbreakable Sandstone Brick"),
range = 12,
stack_max = 10000,
tiles = {"default_sandstone_brick.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_stone_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:desert_stone", {
description = S("Unbreakable Desert Stone"),
range = 12,
stack_max = 10000,
tiles = {"default_desert_stone.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_stone_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:desert_cobble", {
description = S("Unbreakable Desert Cobble"),
range = 12,
stack_max = 10000,
tiles = {"default_desert_cobble.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_stone_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:desert_stonebrick", {
description = S("Unbreakable Desert Stone Brick"),
range = 12,
stack_max = 10000,
tiles = {"default_desert_stone_brick.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_stone_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:grass", {
description = S("Unbreakable Dirt with Grass"),
range = 12,
stack_max = 10000,
tiles = {
"default_grass.png",
"default_dirt.png",
"default_dirt.png^default_grass_side.png",
},
paramtype2 = "facedir",
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain = 0.4},
}),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:fullgrass", {
description = S("Unbreakable Full Grass"),
range = 12,
stack_max = 10000,
tiles = {"default_grass.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
on_drop = maptools.drop_msg
})
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}}
),
on_drop = maptools.drop_msg
})
end
minetest.register_node("maptools:cobble", {
description = S("Unbreakable Cobblestone"),
range = 12,
stack_max = 10000,
tiles = {"default_cobble.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_stone_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:mossycobble", {
description = S("Unbreakable Mossy Cobblestone"),
range = 12,
stack_max = 10000,
tiles = {"default_mossycobble.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_stone_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:brick", {
description = S("Unbreakable Brick"),
range = 12,
stack_max = 10000,
tiles = {"default_brick.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_stone_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:coalblock", {
description = S("Unbreakable Coal Block"),
range = 12,
stack_max = 10000,
tiles = {"default_coal_block.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_stone_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:steelblock", {
description = S("Unbreakable Steel Block"),
range = 12,
stack_max = 10000,
tiles = {"default_steel_block.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_stone_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:goldblock", {
description = S("Unbreakable Gold Block"),
range = 12,
stack_max = 10000,
tiles = {"default_gold_block.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_stone_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:copperblock", {
description = S("Unbreakable Copper Block"),
range = 12,
stack_max = 10000,
tiles = {"default_copper_block.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_stone_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:bronzeblock", {
description = S("Unbreakable Bronze Block"),
range = 12,
stack_max = 10000,
tiles = {"default_bronze_block.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_stone_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:diamondblock", {
description = S("Unbreakable Diamond Block"),
range = 12,
stack_max = 10000,
tiles = {"default_diamond_block.png"},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
sounds = default.node_sound_stone_defaults(),
on_drop = maptools.drop_msg
})
-- Farming:
minetest.register_node("maptools:soil_wet", {
description = "Wet Soil",
range = 12,
stack_max = 10000,
tiles = {
"default_dirt.png^farming_soil_wet.png",
"default_dirt.png^farming_soil_wet_side.png",
},
drop = "",
groups = {
unbreakable = 1,
not_in_creative_inventory = maptools.creative,
soil = 3,
wet = 1,
grassland = 1,
},
sounds = default.node_sound_dirt_defaults(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:desert_sand_soil_wet", {
description = "Wet Desert Sand Soil",
range = 12,
stack_max = 10000,
drop = "",
tiles = {"farming_desert_sand_soil_wet.png", "farming_desert_sand_soil_wet_side.png"},
groups = {
unbreakable = 1,
not_in_creative_inventory = maptools.creative,
soil = 3,
wet = 1,
desert = 1,
},
sounds = default.node_sound_sand_defaults(),
on_drop = maptools.drop_msg
})

View File

@ -1,28 +0,0 @@
--[[
=====================================================================
** Map Tools **
By Calinou.
Copyright © 2012-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
=====================================================================
--]]
maptools = {}
local modpath = minetest.get_modpath("maptools")
local S = minetest.get_translator("maptools")
maptools.S = S
maptools.drop_msg = function(itemstack, player)
local name = player:get_player_name()
minetest.chat_send_player(name, S("[maptools] tools/nodes do not drop!"))
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")

View File

@ -1,38 +0,0 @@
# textdomain: maptools
[maptools] loaded.=[maptools] cargado.
Cloud=Nube
Infinite Fuel=Combustible Infinito
Admin Pickaxe=Pico de Administrador
Copper Coin=Moneda de Cobre
Silver Coin=Moneda de Plata
Gold Coin=Moneda de Oro
Super Apple=Super Manzana
Fake Ladder=Escalera Falsa
Smoke Block=Bloque de Humo
Damaging Block: %s=Bloque Dañino: %s
Kill Block=Bloque Mortal
Build Prevention=Bloqueador de Construcción
Interact Prevention=Bloqueador de Interacción
Climb Block=Bloque Escalable
Light Block=Bloqueador de Luz
Light Bulb=Lamparilla
Player Clip=Bloqueo de Jugador
Full Clip=Bloqueo Total
Unbreakable Stone=Piedra Irrompible
Unbreakable Sand=Arena Irrompible
Unbreakable Desert Stone=Piedra Desértica Irrompible
Unbreakable Desert Sand=Arena Desértica Irrompible
Unbreakable Gravel=Gravilla Irrompible
Unbreakable Dirt=Tierra Irrompible
Unbreakable Dirt with Grass=Hierba Irrompible
Unbreakable Full Grass=Bloque de Hierba Irrompible
Unbreakable Brick=Ladrillos Irrompibles
Unbreakable Wooden Planks=Planchas de Madera Irrompibles
Unbreakable Tree=Tronco de Árbol Irrompible
Unbreakable Glass=Cristal Irrompible
Unbreakable Sandstone=Arenisca Irrompible
Unbreakable Leaves=Foliaje Irrompible
Unbreakable Cobblestone=Guijarros Irrompibles
Unbreakable Mossy Cobblestone=Guijarros Enmohecidos Irrompibles

View File

@ -1,46 +0,0 @@
# textdomain: maptools
[maptools] loaded.=[maptools] a été chargé.
Cloud=Nuage
Infinite Fuel=Carburant infini
Admin Pickaxe=Pioche d'administrateur
Admin Pickaxe With Drops=Pioche d'administrateur qui donne des objets
Copper Coin=Pièce de cuivre
Silver Coin=Pièce d'argent
Gold Coin=Pièce d'or
Super Apple=Super pomme
Fake Ladder=Fausse échelle
Smoke Block=Bloc de fumée
Damaging Block: %s=Bloc de dégâts : %s
Kill Block=Bloc qui tue
Build Prevention=Prévention de construction
Interact Prevention=Prévention d'interaction
Climb Block=Bloc à grimper
Light Block=Bloqueur de lumière
Light Bulb=Bloc lumineux
Player Clip=Bloque-joueurs
Player Clip Bottom Face=Face inférieure de bloque-joueurs
Player Clip Top Face=Face supérieure de bloque-joueurs
Full Clip=Bloque-tout
Full Clip Face=Face de bloque-tout
Permanent Fire=Feu permanent
Fake Fire=Faux feu
Igniter=Incendieur
Pusher: %s=Pousseur : %s
Unbreakable Stone=Pierre incassable
Unbreakable Sand=Sable incassable
Unbreakable Desert Stone=Pierre de désert incassable
Unbreakable Desert Sand=Sable de désert incassable
Unbreakable Gravel=Gravier incassable
Unbreakable Dirt=Terre incassable
Unbreakable Dirt with Grass=Herbe incassable
Unbreakable Full Grass=Bloc d'herbe incassable
Unbreakable Brick=Briques incassables
Unbreakable Wooden Planks=Planches de bois incassables
Unbreakable Tree=Tronc d'arbre incassable
Unbreakable Glass=Verre incassable
Unbreakable Sandstone=Grès incassable
Unbreakable Leaves=Feuillage incassable
Unbreakable Cobblestone=Pierre taillée incassable
Unbreakable Mossy Cobblestone=Pierre taillée mousseusse incassable

View File

@ -1,46 +0,0 @@
# textdomain: maptools
[maptools] loaded.=[maptools] caricato.
Cloud=Nuvola
Infinite Fuel=Combustibile infinito
Admin Pickaxe=Piccone della amministrazione
Admin Pickaxe With Drops=Piccone della amministrazione che lascia cadere a terra
Copper Coin=Moneta di rame
Silver Coin=Moneta di argento
Gold Coin=Moneta di oro
Super Apple=Super mela
Fake Ladder=Finta scala a pioli
Smoke Block=Blocco di fumo
Damaging Block: %s=Blocco che danneggia : %s
Kill Block=Blocco che uccide
Build Prevention=Impedimento alla costruzione
Interact Prevention=Impedimento alla interazione
Climb Block=Blocco su cui ci si può arrampicare
Light Block=Blocco di luce
Light Bulb=Lampadina
Player Clip=Blocca giocatori
Player Clip Bottom Face=Blocca giocatori - faccia inferiore
Player Clip Top Face=Glocca giocatori - faccia superiore
Full Clip=Blocca tutti
Full Clip Face=Faccia del blocca tutti
Permanent Fire=Fuoco eterno
Fake Fire=Fuoco finto
Igniter=Accendino
Pusher: %s=Che ha spinto : %s
Unbreakable Stone=Pietra infrangibile
Unbreakable Sand=Sabbia infrangibile
Unbreakable Desert Stone=Pietra del deserto infrangibile
Unbreakable Desert Sand=Sabbia del deserto infrangibile
Unbreakable Gravel=Ghiaia infrangibile
Unbreakable Dirt=Terra infrangibile
Unbreakable Dirt with Grass=Erba infrangibile
Unbreakable Full Grass=Blocco d'erba infrangibile
Unbreakable Brick=Mattoni infrangibile
Unbreakable Wooden Planks=Assi in legno infrangibili
Unbreakable Tree=Albero infrangibile
Unbreakable Glass=Vetro infrangibile
Unbreakable Sandstone=Arenaria infrangibile
Unbreakable Leaves=Foglie infrangibili
Unbreakable Cobblestone=Ciottolo infrangibile
Unbreakable Mossy Cobblestone=Ciottolo muschioso infrangibile

View File

@ -1,46 +0,0 @@
# textdomain: maptools
[maptools] loaded.=
Cloud=Nuage
Infinite Fuel=
Admin Pickaxe=
Admin Pickaxe With Drops=
Copper Coin=
Silver Coin=
Gold Coin=
Super Apple=
Fake Ladder=
Smoke Block=
Damaging Block: %s=
Kill Block=
Build Prevention=
Interact Prevention=
Climb Block=
Light Block=
Light Bulb=
Player Clip=
Player Clip Bottom Face=
Player Clip Top Face=
Full Clip=
Full Clip Face=
Permanent Fire=
Fake Fire=
Igniter=
Pusher: %s=
Unbreakable Stone=
Unbreakable Sand=
Unbreakable Desert Stone=
Unbreakable Desert Sand=
Unbreakable Gravel=
Unbreakable Dirt=
Unbreakable Dirt with Grass=
Unbreakable Full Grass=
Unbreakable Brick=
Unbreakable Wooden Planks=
Unbreakable Tree=
Unbreakable Glass=
Unbreakable Sandstone=
Unbreakable Leaves=
Unbreakable Cobblestone=
Unbreakable Mossy Cobblestone=

View File

@ -1,5 +0,0 @@
name = maptools
description = Adds various special versions of normal blocks, tools, and other map maintainer tools.
depends = default
optional_depends = moreores
min_minetest_version = 5.0.0

View File

@ -1,485 +0,0 @@
--[[
Map Tools: node definitions
Copyright © 2012-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
local S = maptools.S
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(),
on_drop = maptools.drop_msg
})
-- 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(),
on_drop = maptools.drop_msg
})
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(),
on_drop = maptools.drop_msg
})
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},
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:fake_walkable", {
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,
node_box = {
type = "fixed",
fixed = {
{0, 0, 0, 0, 0, 0},
},
},
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
on_drop = maptools.drop_msg
})
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},
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:fake_walkable_pointable", {
description = S("Player Clip"),
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},
on_drop = maptools.drop_msg
})
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},
on_drop = maptools.drop_msg
})
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_violet.png",
tiles = {"invisible.png"},
paramtype = "light",
walkable = false,
sunlight_propagates = true,
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
on_drop = maptools.drop_msg
})
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_violet.png",
tiles = {"invisible.png"},
paramtype = "light",
pointable = false,
sunlight_propagates = true,
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
on_drop = maptools.drop_msg
})
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},
on_drop = maptools.drop_msg
})
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,
},
on_drop = maptools.drop_msg
})
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,
},
on_drop = maptools.drop_msg
})
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,
},
on_drop = maptools.drop_msg
})
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,
},
on_drop = maptools.drop_msg
})
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 = 14,
paramtype = "light",
sunlight_propagates = true,
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:nobuild", {
description = S("Build Prevention"),
range = 12,
stack_max = 10000,
inventory_image = "default_steel_block.png^default_flint.png",
drawtype = "airlike",
walkable = false,
pointable = false,
paramtype = "light",
sunlight_propagates = true,
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:nointeract", {
description = S("Interact Prevention"),
range = 12,
stack_max = 10000,
inventory_image = "default_steel_block.png^default_bush_stem.png",
drawtype = "airlike",
walkable = false,
paramtype = "light",
sunlight_propagates = true,
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:climb", {
description = S("Climb Block"),
range = 12,
stack_max = 10000,
inventory_image = "default_steel_block.png^default_ladder_wood.png",
drawtype = "airlike",
walkable = false,
climbable = true,
pointable = false,
paramtype = "light",
sunlight_propagates = true,
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
on_drop = maptools.drop_msg
})
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},
on_drop = maptools.drop_msg
})
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},
on_drop = maptools.drop_msg
})
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},
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:ladder", {
description = S("Fake Ladder"),
range = 12,
stack_max = 10000,
drawtype = "signlike",
tiles = {"default_ladder_wood.png"},
inventory_image = "default_ladder_wood.png",
wield_image = "default_ladder_wood.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(),
on_drop = maptools.drop_msg
})
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,
on_drop = maptools.drop_msg
})
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,
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:igniter", {
drawtype = "airlike",
range = 12,
stack_max = 10000,
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,
on_drop = maptools.drop_msg
})
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(),
on_drop = maptools.drop_msg
})
minetest.register_node("maptools:drowning", {
description = S("Drownable Air"),
range = 12,
stack_max = 10000,
inventory_image = "default_steel_block.png^dye_black.png",
drawtype = "airlike",
paramtype = "light",
pointable = false,
walkable = false,
drowning = 1,
sunlight_propagates = true,
drop = "",
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
on_drop = maptools.drop_msg
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 549 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 B

View File

@ -1,63 +0,0 @@
--[[
Map Tools: tool definitions
Copyright © 2012-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
local S = maptools.S
maptools.creative = maptools.config["hide_from_creative_inventory"]
local pick_admin_toolcaps = {
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", {
description = S("Admin Pickaxe"),
range = 20,
inventory_image = "maptools_adminpick.png",
groups = {not_in_creative_inventory = maptools.creative},
tool_capabilities = pick_admin_toolcaps,
on_drop = maptools.drop_msg,
})
minetest.register_tool("maptools:pick_admin_with_drops", {
description = S("Admin Pickaxe with Drops"),
range = 20,
inventory_image = "maptools_adminpick_with_drops.png",
groups = {not_in_creative_inventory = maptools.creative},
tool_capabilities = pick_admin_toolcaps,
on_drop = maptools.drop_msg,
})
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."
)
-- The node is removed directly, which means it even works
-- on non-empty containers and group-less nodes
minetest.remove_node(pos)
-- Run node update actions like falling nodes
minetest.check_for_falling(pos)
end
end)