PkmnLib_rs/src/static_data/libraries/library_settings.rs

22 lines
566 B
Rust
Raw Normal View History

use crate::defines::LevelInt;
2022-07-01 15:07:22 +00:00
/// This library holds several misc settings for the library.
#[derive(Debug)]
2022-08-20 10:22:12 +00:00
#[cfg_attr(feature = "wasm", derive(unique_type_id_derive::UniqueTypeId))]
pub struct LibrarySettings {
2022-07-01 15:07:22 +00:00
/// The highest level a Pokemon can be.
maximum_level: LevelInt,
}
impl LibrarySettings {
2022-07-01 15:07:22 +00:00
/// Creates a new settings library.
pub fn new(maximum_level: LevelInt) -> Self {
Self { maximum_level }
}
2022-07-01 15:07:22 +00:00
/// The highest level a Pokemon can be.
pub fn maximum_level(&self) -> LevelInt {
self.maximum_level
}
}