blob: 84f23feb28927379f4ff710cc5718d3f6c07764c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "json.hpp"
#include "feature.h"
#include "spellcasting.h"
#include "utils.h"
#include <sstream>
#include <map>
using namespace std;
typedef nlohmann::json json;
namespace feature {
shared_ptr<Feature> Feature::create(const json& data) {
if(data["type"] == "spellcasting") {
return utils::loadDFromJson<Feature, Spellcasting>(data);
}
return shared_ptr<Feature>(new Feature(data));
}
}
|