Support for serializing and deserializing a Pokemon
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-07-22 12:23:33 +02:00
parent f23fc43405
commit 12802ce542
15 changed files with 473 additions and 12 deletions

View File

@@ -53,6 +53,7 @@ impl Ability for AbilityImpl {
/// An ability index allows us to find an ability on a form. It combines a bool for whether the
/// ability is hidden or not, and then an index of the ability.
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[repr(C)]
pub struct AbilityIndex {
/// Whether or not the ability we're referring to is a hidden ability.

View File

@@ -3,6 +3,7 @@
/// Required for standard pokemon functions, but somewhat controversial nowadays. Consider adding a feature
/// that allows for a more progressive gender system for those that want it?
#[derive(Eq, PartialEq, Copy, Clone, Debug)]
#[cfg_attr(feature = "serde", derive(serde_repr::Serialize_repr, serde_repr::Deserialize_repr))]
#[repr(u8)]
pub enum Gender {
/// The Pokemon has no gender.