diff options
author | Your Name <you@example.com> | 2022-01-16 21:32:01 -0500 |
---|---|---|
committer | Your Name <you@example.com> | 2022-01-16 21:32:01 -0500 |
commit | d0e356d09e30a11c1e072415a5088f829d5c0a04 (patch) | |
tree | 1e64d37b9b424cd74c30ad4c8225828c7a76874e /src/feature.cc | |
parent | 3f78a7e1647ba94129236bd2bf4fc855c109628a (diff) | |
download | dmtool-d0e356d09e30a11c1e072415a5088f829d5c0a04.tar.gz dmtool-d0e356d09e30a11c1e072415a5088f829d5c0a04.tar.bz2 dmtool-d0e356d09e30a11c1e072415a5088f829d5c0a04.zip |
Worked on features
Diffstat (limited to 'src/feature.cc')
-rw-r--r-- | src/feature.cc | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/feature.cc b/src/feature.cc deleted file mode 100644 index 941de4e..0000000 --- a/src/feature.cc +++ /dev/null @@ -1,19 +0,0 @@ -#include "feature.h" -#include "spellcasting.h" -#include "attack.h" -#include "utils.h" -#include <nlohmann/json.hpp> -#include <memory> - -using namespace std; - -namespace entry { - shared_ptr<Feature> Feature::create(const nlohmann::json& data) { - if(data["type"] == "spells") { - return utils::loadDFromJson<Feature, Spellcasting>(data); - } else if(data["type"] == "attack") { - return utils::loadDFromJson<Feature, Attack>(data); - } - return shared_ptr<Feature>(new Feature(data)); - } -} |