aboutsummaryrefslogtreecommitdiff
path: root/builtin/game/register.lua
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2018-05-20 14:51:26 +0200
committerSmallJoker <SmallJoker@users.noreply.github.com>2018-05-20 14:51:26 +0200
commit6d6b894c7ad7fbd2dcfab25488738149dc0efb06 (patch)
treea3b0d778cddfc0e6b37da8b10a99a0e4ec537e65 /builtin/game/register.lua
parent122eed7a3449eead6f87f45f2eb55c11c3cf171e (diff)
downloadminetest-6d6b894c7ad7fbd2dcfab25488738149dc0efb06.tar.gz
minetest-6d6b894c7ad7fbd2dcfab25488738149dc0efb06.tar.bz2
minetest-6d6b894c7ad7fbd2dcfab25488738149dc0efb06.zip
Small usage changes for air and ignore items (#7305)
* Remove “you hacker you!” from node description * Prevent placement of ignore in builtin * Prevent giving of "unknown" explicitly
Diffstat (limited to 'builtin/game/register.lua')
-rw-r--r--builtin/game/register.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/builtin/game/register.lua b/builtin/game/register.lua
index 1e478bc35..43bb9e067 100644
--- a/builtin/game/register.lua
+++ b/builtin/game/register.lua
@@ -338,7 +338,7 @@ core.register_item(":unknown", {
})
core.register_node(":air", {
- description = "Air (you hacker you!)",
+ description = "Air",
inventory_image = "air.png",
wield_image = "air.png",
drawtype = "airlike",
@@ -355,7 +355,7 @@ core.register_node(":air", {
})
core.register_node(":ignore", {
- description = "Ignore (you hacker you!)",
+ description = "Ignore",
inventory_image = "ignore.png",
wield_image = "ignore.png",
drawtype = "airlike",
@@ -368,6 +368,13 @@ core.register_node(":ignore", {
air_equivalent = true,
drop = "",
groups = {not_in_creative_inventory=1},
+ on_place = function(itemstack, placer, pointed_thing)
+ minetest.chat_send_player(
+ placer:get_player_name(),
+ minetest.colorize("#FF0000",
+ "You can't place 'ignore' nodes!"))
+ return ""
+ end,
})
-- The hand (bare definition)