Rename unique_identifier --> personality_value, minor fixes
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -50,8 +50,8 @@ struct PokemonData {
|
||||
level: Atomic<LevelInt>,
|
||||
/// The amount of experience of the Pokemon.
|
||||
experience: AtomicU32,
|
||||
/// A unique random number for this Pokemon.
|
||||
unique_identifier: u32,
|
||||
/// The personality value of the Pokemon.
|
||||
personality_value: u32,
|
||||
|
||||
/// The gender of the Pokemon.
|
||||
gender: RwLock<Gender>,
|
||||
@@ -171,7 +171,7 @@ impl Pokemon {
|
||||
display_form: None,
|
||||
level: Atomic::new(level),
|
||||
experience: AtomicU32::new(experience),
|
||||
unique_identifier,
|
||||
personality_value: unique_identifier,
|
||||
gender: RwLock::new(gender),
|
||||
coloring,
|
||||
held_item: RwLock::new(None),
|
||||
@@ -239,16 +239,19 @@ impl Pokemon {
|
||||
}
|
||||
}
|
||||
/// The current level of the Pokemon.
|
||||
/// [See also](https://bulbapedia.bulbagarden.net/wiki/Level)
|
||||
pub fn level(&self) -> LevelInt {
|
||||
self.data.level.load(Ordering::Relaxed)
|
||||
}
|
||||
/// The amount of experience of the Pokemon.
|
||||
/// [See also](https://bulbapedia.bulbagarden.net/wiki/Experience)
|
||||
pub fn experience(&self) -> u32 {
|
||||
self.data.experience.load(Ordering::Relaxed)
|
||||
}
|
||||
/// A unique random number for this Pokemon.
|
||||
pub fn unique_identifier(&self) -> u32 {
|
||||
self.data.unique_identifier
|
||||
/// The personality value of the Pokemon.
|
||||
/// [See also](https://bulbapedia.bulbagarden.net/wiki/Personality_value)
|
||||
pub fn personality_value(&self) -> u32 {
|
||||
self.data.personality_value
|
||||
}
|
||||
/// The gender of the Pokemon.
|
||||
pub fn gender(&self) -> Gender {
|
||||
|
||||
Reference in New Issue
Block a user