Only hide secret achievements
This commit is contained in:
parent
bf55e67abc
commit
faccec00f6
@ -54,7 +54,7 @@ LUI.MenuBuilder.registerType("achievements_menu", function(root, controller)
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Faded",
|
"Faded",
|
||||||
500
|
1000
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
@ -300,7 +300,11 @@ LUI.MenuBuilder.registerType("achievements_menu", function(root, controller)
|
|||||||
if (locked) then
|
if (locked) then
|
||||||
btnbg:animateToState("locked")
|
btnbg:animateToState("locked")
|
||||||
image:animateToState("locked")
|
image:animateToState("locked")
|
||||||
desc:setText("")
|
|
||||||
|
if (achievements.issecret(i)) then
|
||||||
|
title:setText(Engine.ToUpperCase(Engine.Localize("ACHIEVEMENT_HIDDEN")))
|
||||||
|
desc:setText(Engine.Localize("ACHIEVEMENT_HIDDEN_DESC"))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
addelement(achievementcontainer)
|
addelement(achievementcontainer)
|
||||||
|
@ -128,6 +128,8 @@
|
|||||||
"LUA_MENU_ACHIEVEMENTS_DESC": "View achievements.",
|
"LUA_MENU_ACHIEVEMENTS_DESC": "View achievements.",
|
||||||
"LUA_MENU_UNKNOWN_ACHIEVEMENT": "???",
|
"LUA_MENU_UNKNOWN_ACHIEVEMENT": "???",
|
||||||
|
|
||||||
|
"ACHIEVEMENT_HIDDEN": "Secret achievement",
|
||||||
|
"ACHIEVEMENT_HIDDEN_DESC": "Keep playing to unlock it",
|
||||||
"ACHIEVEMENT_EARNED": "Achievement Unlocked!",
|
"ACHIEVEMENT_EARNED": "Achievement Unlocked!",
|
||||||
"ACHIEVEMENT_NAME_0": "Is That All You Got?",
|
"ACHIEVEMENT_NAME_0": "Is That All You Got?",
|
||||||
"ACHIEVEMENT_DETAIL_0": "Earn all available trophies for Call of Duty®: Modern Warfare® 2 Campaign Remastered.",
|
"ACHIEVEMENT_DETAIL_0": "Earn all available trophies for Call of Duty®: Modern Warfare® 2 Campaign Remastered.",
|
||||||
|
@ -70,13 +70,13 @@ namespace achievements
|
|||||||
achievement_t(ACHIEVEMENT_40, "NIGHT_MUSEUM", ACHIEVEMENT_RARITY_1),
|
achievement_t(ACHIEVEMENT_40, "NIGHT_MUSEUM", ACHIEVEMENT_RARITY_1),
|
||||||
achievement_t(ACHIEVEMENT_41, "STUDENT_MASTER", ACHIEVEMENT_RARITY_1),
|
achievement_t(ACHIEVEMENT_41, "STUDENT_MASTER", ACHIEVEMENT_RARITY_1),
|
||||||
achievement_t(ACHIEVEMENT_42, "REAL_GUN_GAME", ACHIEVEMENT_RARITY_1),
|
achievement_t(ACHIEVEMENT_42, "REAL_GUN_GAME", ACHIEVEMENT_RARITY_1),
|
||||||
achievement_t(ACHIEVEMENT_43, "PRECOGNITIVE_PARANOIA", ACHIEVEMENT_RARITY_0),
|
achievement_t(ACHIEVEMENT_43, "PRECOGNITIVE_PARANOIA", ACHIEVEMENT_RARITY_0, true),
|
||||||
achievement_t(ACHIEVEMENT_44, "IMMORTAL", ACHIEVEMENT_RARITY_2),
|
achievement_t(ACHIEVEMENT_44, "IMMORTAL", ACHIEVEMENT_RARITY_2),
|
||||||
achievement_t(ACHIEVEMENT_45, "SILENT_SKIES", ACHIEVEMENT_RARITY_0),
|
achievement_t(ACHIEVEMENT_45, "SILENT_SKIES", ACHIEVEMENT_RARITY_0),
|
||||||
achievement_t(ACHIEVEMENT_46, "CLAYMORE", ACHIEVEMENT_RARITY_0),
|
achievement_t(ACHIEVEMENT_46, "CLAYMORE", ACHIEVEMENT_RARITY_0),
|
||||||
achievement_t(ACHIEVEMENT_47, "BIRD_HUNTER", ACHIEVEMENT_RARITY_1),
|
achievement_t(ACHIEVEMENT_47, "BIRD_HUNTER", ACHIEVEMENT_RARITY_1),
|
||||||
achievement_t(ACHIEVEMENT_48, "HOT_POTATO", ACHIEVEMENT_RARITY_0),
|
achievement_t(ACHIEVEMENT_48, "HOT_POTATO", ACHIEVEMENT_RARITY_0),
|
||||||
achievement_t(ACHIEVEMENT_49, "CLOWN_IN_TRAINING", ACHIEVEMENT_RARITY_0),
|
achievement_t(ACHIEVEMENT_49, "CLOWN_IN_TRAINING", ACHIEVEMENT_RARITY_0, true),
|
||||||
achievement_t(ACHIEVEMENT_50, "HEADBANGER", ACHIEVEMENT_RARITY_0),
|
achievement_t(ACHIEVEMENT_50, "HEADBANGER", ACHIEVEMENT_RARITY_0),
|
||||||
achievement_t(ACHIEVEMENT_51, "BRAINS", ACHIEVEMENT_RARITY_2),
|
achievement_t(ACHIEVEMENT_51, "BRAINS", ACHIEVEMENT_RARITY_2),
|
||||||
achievement_t(ACHIEVEMENT_52, "RAMIREZ", ACHIEVEMENT_RARITY_2),
|
achievement_t(ACHIEVEMENT_52, "RAMIREZ", ACHIEVEMENT_RARITY_2),
|
||||||
@ -378,6 +378,16 @@ namespace achievements
|
|||||||
return achievements[id].rarity;
|
return achievements[id].rarity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool is_secret(int id)
|
||||||
|
{
|
||||||
|
if (id >= ACHIEVEMENT_TOTAL_COUNT)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return achievements[id].secret;
|
||||||
|
}
|
||||||
|
|
||||||
class component final : public component_interface
|
class component final : public component_interface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -75,6 +75,7 @@ namespace achievements
|
|||||||
achievement_id id;
|
achievement_id id;
|
||||||
std::string_view code;
|
std::string_view code;
|
||||||
achievement_rarity rarity;
|
achievement_rarity rarity;
|
||||||
|
bool secret{};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct achievement_file_t
|
struct achievement_file_t
|
||||||
@ -93,4 +94,5 @@ namespace achievements
|
|||||||
std::string get_details(int id);
|
std::string get_details(int id);
|
||||||
std::optional<std::string> get_background(int id);
|
std::optional<std::string> get_background(int id);
|
||||||
int get_rarity(int id);
|
int get_rarity(int id);
|
||||||
|
bool is_secret(int id);
|
||||||
}
|
}
|
||||||
|
@ -694,6 +694,7 @@ namespace ui_scripting
|
|||||||
achievements_table["getname"] = achievements::get_name;
|
achievements_table["getname"] = achievements::get_name;
|
||||||
achievements_table["getdetails"] = achievements::get_details;
|
achievements_table["getdetails"] = achievements::get_details;
|
||||||
achievements_table["getbackground"] = achievements::get_background;
|
achievements_table["getbackground"] = achievements::get_background;
|
||||||
|
achievements_table["issecret"] = achievements::is_secret;
|
||||||
achievements_table["count"] = achievements::get_count;
|
achievements_table["count"] = achievements::get_count;
|
||||||
|
|
||||||
achievements_table["table"] = []()
|
achievements_table["table"] = []()
|
||||||
|
Loading…
Reference in New Issue
Block a user