Changed Achievements to Advancements in player visible text.

This commit is contained in:
PrairieWind 2022-09-23 09:24:31 -06:00 committed by cora
parent d43494e3b7
commit f9f74d2af7
6 changed files with 38 additions and 38 deletions

@ -217,7 +217,7 @@ function awards.unlock(name, award)
-- Get award
minetest.log("action", name.." has gotten award "..award)
minetest.chat_send_all(S("@1 has made the achievement @2", name, minetest.colorize(mcl_colors.GREEN, "[" .. (awdef.title or award) .. "]")))
minetest.chat_send_all(S("@1 has made the advancement @2", name, minetest.colorize(mcl_colors.GREEN, "[" .. (awdef.title or award) .. "]")))
data.unlocked[award] = award
awards.save()
@ -257,9 +257,9 @@ function awards.unlock(name, award)
local custom_announce = awdef.custom_announce
if not custom_announce then
if awdef.secret then
custom_announce = S("Secret achievement gotten:")
custom_announce = S("Secret Advancement Made:")
else
custom_announce = S("Achievement gotten:")
custom_announce = S("Advancement Made:")
end
end
@ -283,9 +283,9 @@ function awards.unlock(name, award)
elseif awards.show_mode == "chat" then
local chat_announce
if awdef.secret == true then
chat_announce = S("Secret achievement gotten: @1")
chat_announce = S("Secret Advancement Made: @1")
else
chat_announce = S("Achievement gotten: @1")
chat_announce = S("Advancement Made: @1")
end
-- use the chat console to send it
minetest.chat_send_player(name, string.format(chat_announce, title))
@ -306,9 +306,9 @@ function awards.unlock(name, award)
})
local hud_announce
if awdef.secret == true then
hud_announce = S("Secret achievement gotten!")
hud_announce = S("Secret Advancement Made!")
else
hud_announce = S("Achievement gotten!")
hud_announce = S("Advancement Made!")
end
local two = player:hud_add({
hud_elem_type = "text",
@ -389,10 +389,10 @@ function awards.getFormspec(name, to, sid)
local def = awards.def[item.name]
if def and def.secret and not item.got then
formspec = formspec .. "label[1,2.75;"..minetest.formspec_escape(S("(Secret achievement)")).."]"..
formspec = formspec .. "label[1,2.75;"..minetest.formspec_escape(S("(Secret Advancement)")).."]"..
"image[1,0;3,3;awards_unknown.png]"
if def and def.description then
formspec = formspec .. "textarea[0.25,3.25;4.8,1.7;;"..minetest.formspec_escape(S("Get this achievement to find out what it is."))..";]"
formspec = formspec .. "textarea[0.25,3.25;4.8,1.7;;"..minetest.formspec_escape(S("Make this advancement to find out what it is."))..";]"
end
else
local title = item.name
@ -450,7 +450,7 @@ function awards.getFormspec(name, to, sid)
first = false
if def.secret and not award.got then
formspec = formspec .. "#707070" .. minetest.formspec_escape(S("(Secret Award)"))
formspec = formspec .. "#707070" .. minetest.formspec_escape(S("(Secret Advancement)"))
else
local title = award.name
if def and def.title then

@ -18,7 +18,7 @@ local S = minetest.get_translator(minetest.get_current_modname())
minetest.register_chatcommand("awards", {
params = S("[c|clear|disable|enable]"),
description = S("Show, clear, disable or enable your achievements"),
description = S("Show, clear, disable or enable your advancements."),
func = function(name, param)
if param == "clear" then
if awards.player(name).disabled ~= nil then
@ -30,10 +30,10 @@ minetest.register_chatcommand("awards", {
end
elseif param == "disable" then
awards.disable(name)
minetest.chat_send_player(name, S("You have disabled your achievements."))
minetest.chat_send_player(name, S("You have disabled your advancements."))
elseif param == "enable" then
awards.enable(name)
minetest.chat_send_player(name, S("You have enabled your achievements."))
minetest.chat_send_player(name, S("You have enabled your advancements."))
elseif param == "c" then
if awards.player(name).disabled ~= nil then
minetest.chat_send_player(name, S("Awards are disabled, enable them first by using /awards enable!"))
@ -50,16 +50,16 @@ minetest.register_chatcommand("awards", {
end
})
minetest.register_privilege("achievements", {
description = S("Can give achievements to any player"),
minetest.register_privilege("advancements", {
description = S("Can give advancements to any player"),
give_to_singleplayer = false,
give_to_admin = false,
})
minetest.register_chatcommand("achievement", {
params = S("(grant <player> (<achievement> | all)) | list"),
privs = { achievements = true },
description = S("Give achievement to player or list all achievements"),
minetest.register_chatcommand("advancement", {
params = S("(grant <player> (<advancement> | all)) | list"),
privs = { advancements = true },
description = S("Give advancement to player or list all advancements"),
func = function(name, param)
if param == "list" then
local list = {}
@ -92,7 +92,7 @@ minetest.register_chatcommand("achievement", {
awards.unlock(playername, achievement)
return true, S("Done.")
else
return false, S("Achievement “@1” does not exist.", achievement)
return false, S("Advancement “@1” does not exist.", achievement)
end
end
})

@ -11,9 +11,9 @@
(Secret Award)=
<achievement ID>=
<name>=
Achievement gotten!=
Achievement gotten:=
Achievement gotten: @1=
Advancement Made!=
Advancement Made:=
Advancement: @1=
Achievement not found.=
All your awards and statistics have been cleared. You can now start again.=
Awards=
@ -27,16 +27,16 @@ Join the game.=
List awards in chat (deprecated)=
Place a block: @1=
Place blocks: @1×@2=
Secret achievement gotten!=
Secret achievement gotten:=
Secret achievement gotten: @1=
Secret Advancement Made!=
Secret Advancement Made:=
Secret Advancement Made: @1=
Show details of an achievement=
Show, clear, disable or enable your achievements=
Get this achievement to find out what it is.=
Show, clear, disable or enable your advancements.=
Make this advancement to find out what it is.=
Write @1 chat messages.=
Write something in chat.=
You have disabled your achievements.=
You have enabled your achievements.=
You have disabled your advancements.=
You have enabled your advancements.=
You have not gotten any awards.=
You've disabled awards. Type /awards enable to reenable.=
[c|clear|disable|enable]=
@ -49,16 +49,16 @@ Place @1 block(s).=
Dig @1 block(s).=
Eat @1 item(s).=
Craft @1 item(s).=
Can give achievements to any player=
(grant <player> (<achievement> | all)) | list=
Give achievement to player or list all achievements=
Can give advancements to any player=
(grant <player> (<advancement> | all)) | list=
Give advancement to player or list all advancements=
@1 (@2)=
Invalid syntax.=
Invalid action.=
Player is not online.=
Done.=
Achievement “@1” does not exist.=
@1 has made the achievement @2=
Advancement “@1” does not exist.=
@1 has made the advancement @2=
Mine a block: @1=
Mine blocks: @1×@2=
Awards are disabled, enable them first by using /awards enable!=

@ -392,7 +392,7 @@ function mcl_inventory.set_creative_formspec(player, start_i, pagenum, inv_size,
-- Achievements button
"image_button[9,3;1,1;mcl_achievements_button.png;__mcl_achievements;]" ..
--"style_type[image_button;border=;bgimg=;bgimg_pressed=]" ..
"tooltip[__mcl_achievements;"..F(S("Achievements")) .. "]" ..
"tooltip[__mcl_achievements;"..F(S("Advancements")) .. "]" ..
-- Switch stack size button
"image_button[9,4;1,1;default_apple.png;__switch_stack;]" ..

@ -119,7 +119,7 @@ local function set_inventory(player, armor_change_only)
form = form ..
-- Achievements button
"image_button[7,3;1,1;mcl_achievements_button.png;__mcl_achievements;]" ..
"tooltip[__mcl_achievements;" .. F(S("Achievements")) .. "]" ..
"tooltip[__mcl_achievements;" .. F(S("Advancements")) .. "]" ..
-- For shortcuts
"listring[current_player;main]" ..

@ -2,7 +2,7 @@
Recipe book=
Help=
Select player skin=
Achievements=
Advancements=
Building Blocks=
Decoration Blocks=
Redstone=