This commit is contained in:
@@ -6,6 +6,7 @@ use crate::StringKey;
|
||||
|
||||
/// A library to store all items.
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "wasm", derive(unique_type_id_derive::UniqueTypeId))]
|
||||
pub struct ItemLibrary {
|
||||
/// The underlying data structure.
|
||||
map: IndexMap<StringKey, Box<Item>>,
|
||||
|
||||
@@ -2,6 +2,7 @@ use crate::defines::LevelInt;
|
||||
|
||||
/// This library holds several misc settings for the library.
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "wasm", derive(unique_type_id_derive::UniqueTypeId))]
|
||||
pub struct LibrarySettings {
|
||||
/// The highest level a Pokemon can be.
|
||||
maximum_level: LevelInt,
|
||||
|
||||
@@ -6,6 +6,7 @@ use crate::StringKey;
|
||||
|
||||
/// A library to store all data for Pokemon species.
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "wasm", derive(unique_type_id_derive::UniqueTypeId))]
|
||||
pub struct SpeciesLibrary {
|
||||
/// The underlying map.
|
||||
map: IndexMap<StringKey, Box<Species>>,
|
||||
|
||||
@@ -17,8 +17,15 @@ impl From<u8> for TypeIdentifier {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<u8> for TypeIdentifier {
|
||||
fn into(self) -> u8 {
|
||||
self.val
|
||||
}
|
||||
}
|
||||
|
||||
/// All data related to types and effectiveness.
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "wasm", derive(unique_type_id_derive::UniqueTypeId))]
|
||||
pub struct TypeLibrary {
|
||||
/// A list of types
|
||||
types: HashMap<StringKey, TypeIdentifier>,
|
||||
|
||||
Reference in New Issue
Block a user