Add msg when all entries are already revealed

This commit is contained in:
Wuzzy 2016-12-27 19:14:32 +01:00
parent a2c4961f28
commit 5ffa16917e
3 changed files with 14 additions and 9 deletions

View File

@ -186,21 +186,24 @@ function doc.mark_all_entries_as_revealed(playername)
end end
end end
local msg
if reveal1 then if reveal1 then
-- Needed because new entries are added to player's view on entry list -- Needed because new entries are added to player's view on entry list
doc.data.players[playername].entry_textlist_needs_updating = true doc.data.players[playername].entry_textlist_needs_updating = true
-- Notify msg = S("All help entries revealed!")
local msg = S("All help entries unlocked!")
if minetest.get_modpath("central_message") ~= nil then
cmsg.push_message_player(minetest.get_player_by_name(playername), msg)
else
minetest.chat_send_player(playername, msg)
end
-- Play notification sound (ignore sound limit intentionally) -- Play notification sound (ignore sound limit intentionally)
minetest.sound_play({ name = "doc_reveal", gain = 0.2 }, { to_player = playername }) minetest.sound_play({ name = "doc_reveal", gain = 0.2 }, { to_player = playername })
doc.data.players[playername].last_reveal_sound = os.time() doc.data.players[playername].last_reveal_sound = os.time()
else
msg = S("All help entries are already revealed.")
end
-- Notify
if minetest.get_modpath("central_message") ~= nil then
cmsg.push_message_player(minetest.get_player_by_name(playername), msg)
else
minetest.chat_send_player(playername, msg)
end end
end end

View File

@ -2,7 +2,8 @@
> = > > = >
Access to the requested entry has been denied; this entry is secret. You may unlock access by progressing in the game. Figure out on your own how to unlock this entry. = Der Zugriff auf den angeforderten Eintrag wurde verweigert; dieser Eintrag ist geheim. Sie können durch weiteren Spielfortschritt den Zugriff freischalten. Finden Sie selbst heraus, wie Sie diesen Eintrag freischalten können. Access to the requested entry has been denied; this entry is secret. You may unlock access by progressing in the game. Figure out on your own how to unlock this entry. = Der Zugriff auf den angeforderten Eintrag wurde verweigert; dieser Eintrag ist geheim. Sie können durch weiteren Spielfortschritt den Zugriff freischalten. Finden Sie selbst heraus, wie Sie diesen Eintrag freischalten können.
All entries read. = Alle Einträge gelesen. All entries read. = Alle Einträge gelesen.
All help entries unlocked! = Alle Hilfseinträge freigeschaltet! All help entries revealed! = Alle Hilfseinträge aufgedeckt!
All help entries are already revealed. = Alle Hilfseinträge sind schon aufgedeckt.
Allows you to reveal all hidden help entries with /help_reveal = Ermöglicht es Ihnen, alle verborgenen Hilfseinträge mit /help_reveal freizuschalten Allows you to reveal all hidden help entries with /help_reveal = Ermöglicht es Ihnen, alle verborgenen Hilfseinträge mit /help_reveal freizuschalten
Category list = Kategorienliste Category list = Kategorienliste
Currently all entries in this category are hidden from you.\nUnlock new entries by progressing in the game. = Momentan sind alle Einträge in dieser Kategorie vor Ihnen verborgen.\nSchalten Sie neue Einträge frei, indem Sie im Spiel fortschreiten. Currently all entries in this category are hidden from you.\nUnlock new entries by progressing in the game. = Momentan sind alle Einträge in dieser Kategorie vor Ihnen verborgen.\nSchalten Sie neue Einträge frei, indem Sie im Spiel fortschreiten.

View File

@ -2,7 +2,8 @@
> = > =
Access to the requested entry has been denied; this entry is secret. You may unlock access by progressing in the game. Figure out on your own how to unlock this entry. = Access to the requested entry has been denied; this entry is secret. You may unlock access by progressing in the game. Figure out on your own how to unlock this entry. =
All entries read. = All entries read. =
All help entries unlocked! = All help entries revealed! =
All help entries are already revealed. =
Allows you to reveal all hidden help entries with /help_reveal = Allows you to reveal all hidden help entries with /help_reveal =
Category list = Category list =
Currently all entries in this category are hidden from you.\\nUnlock new entries by progressing in the game. = Currently all entries in this category are hidden from you.\\nUnlock new entries by progressing in the game. =