add: policy achievements

This commit is contained in:
trisua 2025-06-30 18:49:41 -04:00
parent d90b08720a
commit 973373426a
7 changed files with 83 additions and 13 deletions

View file

@ -493,7 +493,10 @@ pub struct ExternalConnectionData {
}
/// The total number of achievements needed to 100% Tetratto!
pub const ACHIEVEMENTS: usize = 28;
pub const ACHIEVEMENTS: usize = 30;
/// "self-serve" achievements can be granted by the user through the API.
pub const SELF_SERVE_ACHIEVEMENTS: &[AchievementName] =
&[AchievementName::OpenTos, AchievementName::OpenPrivacyPolicy];
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
pub enum AchievementName {
@ -525,6 +528,8 @@ pub enum AchievementName {
EditNote,
CreatePostWithTitle,
CreateRepost,
OpenTos,
OpenPrivacyPolicy,
}
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
@ -565,6 +570,8 @@ impl AchievementName {
Self::EditNote => "I take it back!",
Self::CreatePostWithTitle => "Must declutter",
Self::CreateRepost => "More than a like or comment...",
Self::OpenTos => "Well informed!",
Self::OpenPrivacyPolicy => "Privacy conscious",
}
}
@ -598,6 +605,8 @@ impl AchievementName {
Self::EditNote => "Edit a note.",
Self::CreatePostWithTitle => "Create a post with a title.",
Self::CreateRepost => "Create a repost or quote.",
Self::OpenTos => "Open the terms of service.",
Self::OpenPrivacyPolicy => "Open the privacy policy.",
}
}
@ -633,6 +642,8 @@ impl AchievementName {
Self::EditNote => Uncommon,
Self::CreatePostWithTitle => Common,
Self::CreateRepost => Common,
Self::OpenTos => Uncommon,
Self::OpenPrivacyPolicy => Uncommon,
}
}
}