Add 'not_cuttable' group to Protector Block

master
Maksim 2020-12-16 18:42:36 +01:00
parent 7044c74804
commit e1eea28d88
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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",