Introduce unlocks list, hook things up.

Unlocks should only be used for achievements that are not already in the
items lists.
This commit is contained in:
Bartosz Taudul 2024-06-08 12:34:02 +02:00
parent 9d7222eb4a
commit fde874eedf
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 9 additions and 3 deletions

View File

@ -49,7 +49,7 @@ AchievementItem ai_connectToServer = { "connectToClient", "First profiling sessi
{
tracy::OpenWebpage( "https://github.com/wolfpld/tracy/releases" );
}
}, ac_connectToServerItems };
}, ac_connectToServerItems, ac_instrumentationItems };
AchievementItem* ac_achievementsIntroItems[] = {
&ai_connectToServer,
@ -67,11 +67,16 @@ AchievementItem ai_achievementsIntro = { "achievementsIntro", "Click here to dis
ImGui::SameLine();
TextColoredUnformatted( 0xFF44FF44, ICON_FA_CIRCLE_CHECK );
ImGui::TextWrapped( "Good luck!" );
}, ac_achievementsIntroItems, true, 1 };
}, ac_achievementsIntroItems, nullptr, true, 1 };
AchievementItem* ac_firstStepsItems[] = { &ai_achievementsIntro, nullptr };
AchievementCategory ac_firstSteps = { "firstSteps", "First steps", ac_firstStepsItems, 1 };
AchievementCategory* AchievementCategories[] = { &ac_firstSteps, nullptr };
AchievementCategory* AchievementCategories[] = {
&ac_firstSteps,
&ac_instrumentation,
nullptr
};
}

View File

@ -29,6 +29,7 @@ struct AchievementItem
const char* name;
void(*description)(const ctx&);
AchievementItem** items;
AchievementItem** unlocks;
bool keepOpen;
uint64_t unlockTime;
uint64_t doneTime;