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

View File

@ -217,7 +217,7 @@ function awards.unlock(name, award)
-- Get award -- Get award
minetest.log("action", name.." has gotten award "..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 data.unlocked[award] = award
awards.save() awards.save()
@ -257,9 +257,9 @@ function awards.unlock(name, award)
local custom_announce = awdef.custom_announce local custom_announce = awdef.custom_announce
if not custom_announce then if not custom_announce then
if awdef.secret then if awdef.secret then
custom_announce = S("Secret achievement gotten:") custom_announce = S("Secret Advancement Made:")
else else
custom_announce = S("Achievement gotten:") custom_announce = S("Advancement Made:")
end end
end end
@ -283,9 +283,9 @@ function awards.unlock(name, award)
elseif awards.show_mode == "chat" then elseif awards.show_mode == "chat" then
local chat_announce local chat_announce
if awdef.secret == true then if awdef.secret == true then
chat_announce = S("Secret achievement gotten: @1") chat_announce = S("Secret Advancement Made: @1")
else else
chat_announce = S("Achievement gotten: @1") chat_announce = S("Advancement Made: @1")
end end
-- use the chat console to send it -- use the chat console to send it
minetest.chat_send_player(name, string.format(chat_announce, title)) minetest.chat_send_player(name, string.format(chat_announce, title))
@ -306,9 +306,9 @@ function awards.unlock(name, award)
}) })
local hud_announce local hud_announce
if awdef.secret == true then if awdef.secret == true then
hud_announce = S("Secret achievement gotten!") hud_announce = S("Secret Advancement Made!")
else else
hud_announce = S("Achievement gotten!") hud_announce = S("Advancement Made!")
end end
local two = player:hud_add({ local two = player:hud_add({
hud_elem_type = "text", hud_elem_type = "text",
@ -389,10 +389,10 @@ function awards.getFormspec(name, to, sid)
local def = awards.def[item.name] local def = awards.def[item.name]
if def and def.secret and not item.got then 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]" "image[1,0;3,3;awards_unknown.png]"
if def and def.description then 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 end
else else
local title = item.name local title = item.name
@ -450,7 +450,7 @@ function awards.getFormspec(name, to, sid)
first = false first = false
if def.secret and not award.got then 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 else
local title = award.name local title = award.name
if def and def.title then if def and def.title then

View File

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

View File

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

View File

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

View File

@ -119,7 +119,7 @@ local function set_inventory(player, armor_change_only)
form = form .. form = form ..
-- Achievements button -- Achievements button
"image_button[7,3;1,1;mcl_achievements_button.png;__mcl_achievements;]" .. "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 -- For shortcuts
"listring[current_player;main]" .. "listring[current_player;main]" ..

View File

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