Tweak messages for locks mod

This commit is contained in:
Wuzzy 2019-08-30 02:52:30 +02:00
parent 8a7dc21b9e
commit a25486c49a
3 changed files with 25 additions and 5 deletions

View File

@ -67,12 +67,28 @@ minetest.register_tool(
local meta = minetest.get_meta(pos)
meta:set_float("last_lock_pick", minetest.get_gametime() + picked_time)
local own = meta:get_string("lock_owner")
if own then
-- TODO: Add sound + particle effect to show success
local burglar = player:get_player_name()
local owner = meta:get_string("lock_owner")
if owner then
if owner ~= burglar then
minetest.chat_send_player(
owner,
minetest.colorize("#f00",
S("@1 has broken into your locked chest!", burglar)))
minetest.chat_send_player(
burglar,
minetest.colorize("#0f0", S("You have broken the lock!")))
else
minetest.chat_send_player(
burglar,
minetest.colorize("#0f0", S("You have broken into your own locked chest!")))
end
else
minetest.chat_send_player(
own,
minetest.colorize("#f00",
S("@1 has broken into your locked chest!", player:get_player_name())))
burglar,
minetest.colorize("#0f0", S("You have broken the lock!")))
end
end

View File

@ -1,6 +1,8 @@
# textdomain: locks
Lock Pick=Dietrich
@1 has broken into your locked chest!=@1 hat Ihre abgeschlossene Truhe geknackt!
You have broken the lock!=Sie haben das Schloss geknackt!
You have broken into your own locked chest!=Sie haben Ihre eigene abgeschlossene Truhe geknackt!
Lock=Schloss
Locked Chest=Abgeschlossene Truhe
Locked Chest (Owned by @1)=Abgeschlossene Truhe (Eigentümer: @1)

View File

@ -1,6 +1,8 @@
# textdomain: locks
Lock Pick=
@1 has broken into your locked chest!=
You have broken the lock!=
You have broken into your own locked chest!=
Lock=
Locked Chest=
Locked Chest (Owned by @1)=