From e1eea28d88cb6c2852e16a15043ef5c45367aff9 Mon Sep 17 00:00:00 2001 From: Maksim Date: Wed, 16 Dec 2020 18:42:36 +0100 Subject: [PATCH] Add 'not_cuttable' group to Protector Block --- locale/ru.txt | 2 +- protector.lua | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/ru.txt b/locale/ru.txt index 41ed41e..818b58a 100644 --- a/locale/ru.txt +++ b/locale/ru.txt @@ -112,7 +112,7 @@ Unknown subcommand: @1=Неизвестная подкоманда: @1 ### protector.lua ### Protector Block=Защитный Блок -You are not allowed to protect that area:=Вам не разрешено защищать эту область: +You are not allowed to protect that area: @1=Вам не разрешено защищать эту область: @1 You have already protected this area.=Вы уже защитили эту область. The area from @1 to @1 has been protected as ID @1=Зона от @1 до @1 была защещена, ID @1 Protecting area @1, Owned by @1=Защищённая зона @1, Владелец: @1 diff --git a/protector.lua b/protector.lua index 533982f..7a5ba95 100644 --- a/protector.lua +++ b/protector.lua @@ -14,13 +14,13 @@ local vadd, vnew = vector.add, vector.new minetest.register_node("areas:protector", { description = S("Protector Block"), - groups = {cracky = 1}, tiles = { "default_stonebrick_carved.png", "default_stonebrick_carved.png", "default_stonebrick_carved.png^areas_protector_stone.png" }, paramtype = "light", + groups = {cracky = 1, not_cuttable = 1}, node_placement_prediction = "", on_place = function(itemstack, player, pointed) @@ -32,7 +32,7 @@ minetest.register_node("areas:protector", { if not minetest.is_protected_action(pos, name) then local perm, err = areas:canPlayerAddArea(pos1, pos2, name) if not perm then - minetest.chat_send_player(name, red(S("You are not allowed to protect that area:") .. " ") .. err) + minetest.chat_send_player(name, red(S("You are not allowed to protect that area: @1", err))) return itemstack end if minetest.find_node_near(pos, 4, {"areas:protector"}) then @@ -40,7 +40,7 @@ minetest.register_node("areas:protector", { return itemstack end - local id = areas:add(name, "Protector Block", pos1, pos2) + local id = areas:add(name, S("Protector Block"), pos1, pos2) areas:save() minetest.chat_send_player(name, (S("The area from @1 to @1 has been protected as ID @1",