1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
/// `AchievementTier`s represent a specific tier within an achievement.
#[derive(Debug, Serialize, Deserialize)]
pub struct AchievementTier {
    count: u64,
    points: u64,
}

impl AchievementTier {
    /// Returns the "requirement amount" necessary to fulfill this tier of the achievement.
    /// E.g., the total number of kills for a kill achievement tier, the total amount of items in a
    /// collection achievement tier, etc.
    pub fn count(&self) -> u64 {
        self.count
    }

    /// Returns the number of Achievement Points this tier is worth.
    pub fn points(&self) -> u64 {
        self.points
    }
}