From b8d7e5624c00699e8cef68ebd514b3ae50631a43 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Wed, 12 Feb 2020 20:30:22 +0100 Subject: [PATCH] Update to latest version of CreatureLib, apply new ENUM macro. --- conanfile.py | 2 +- src/Library/Evolutions/EvolutionMethod.hpp | 21 +++++---------------- src/Library/TimeOfDay.hpp | 11 ++++------- 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/conanfile.py b/conanfile.py index b87bf72..98584e4 100644 --- a/conanfile.py +++ b/conanfile.py @@ -44,7 +44,7 @@ class PkmnLibConan(ConanFile): self.options["AngelScript"].link_std_statically = True def requirements(self): - self.requires("CreatureLib/3f57051219232f42bacf3475d231cfe693e1e101@creaturelib/master") + self.requires("CreatureLib/1969f59a9ca1408b6c107d679a83f6b73aeb2af9@creaturelib/master") if self.options.script_handler == "angelscript": self.requires("AngelScript/2.34@AngelScript/Deukhoofd") else: diff --git a/src/Library/Evolutions/EvolutionMethod.hpp b/src/Library/Evolutions/EvolutionMethod.hpp index 53b5643..2330f26 100644 --- a/src/Library/Evolutions/EvolutionMethod.hpp +++ b/src/Library/Evolutions/EvolutionMethod.hpp @@ -2,22 +2,11 @@ #define PKMNLIB_EVOLUTIONMETHOD_HPP #include -namespace PkmnLib::Library{ - enum class EvolutionMethod : uint8_t{ - Level, - HighFriendship, - KnownMove, - LocationBased, - TimeBased, - HoldsItem, - IsGenderAndLevel, - EvolutionItemUse, - EvolutionItemUseWithGender, - Trade, - TradeWithHeldItem, - TradeWithSpecificPokemon, - Custom - }; +namespace PkmnLib::Library { + ENUM(EvolutionMethod, uint8_t, Level, HighFriendship, KnownMove, LocationBased, TimeBased, HoldsItem, + IsGenderAndLevel, EvolutionItemUse, EvolutionItemUseWithGender, Trade, TradeWithHeldItem, + TradeWithSpecificPokemon, Custom + ) } #endif // PKMNLIB_EVOLUTIONMETHOD_HPP diff --git a/src/Library/TimeOfDay.hpp b/src/Library/TimeOfDay.hpp index 1d0900d..ea94f4b 100644 --- a/src/Library/TimeOfDay.hpp +++ b/src/Library/TimeOfDay.hpp @@ -1,14 +1,11 @@ #ifndef PKMNLIB_TIMEOFDAY_HPP #define PKMNLIB_TIMEOFDAY_HPP +#include #include -namespace PkmnLib::Library{ - enum class TimeOfDay : uint8_t { - Night, - Morning, - Afternoon, - Evening - }; + +namespace PkmnLib::Library { + ENUM(TimeOfDay, uint8_t, Night, Morning, Afternoon, Evening) } #endif // PKMNLIB_TIMEOFDAY_HPP