aboutsummaryrefslogtreecommitdiff
path: root/src/entry.cc
diff options
context:
space:
mode:
authorYour Name <you@example.com>2023-11-21 16:26:34 -0500
committerYour Name <you@example.com>2023-11-21 16:26:34 -0500
commit0d32e0d3342ef2455014c8e1164977c816763317 (patch)
tree0e0a445332accf0eda8f23fe586f614844bee463 /src/entry.cc
parent5678a600b7d1ec4e79724258dfefe45a49258ea3 (diff)
downloaddmtool-0d32e0d3342ef2455014c8e1164977c816763317.tar.gz
dmtool-0d32e0d3342ef2455014c8e1164977c816763317.tar.bz2
dmtool-0d32e0d3342ef2455014c8e1164977c816763317.zip
Added rudimentary item creation
Diffstat (limited to 'src/entry.cc')
-rw-r--r--src/entry.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/entry.cc b/src/entry.cc
index 9c9b3da..f958e17 100644
--- a/src/entry.cc
+++ b/src/entry.cc
@@ -7,7 +7,7 @@
#include <stdexcept>
namespace entry {
- // Returns either a feature, an item, a creature, or a spell
+ // Returns a feature, item, creature, or spell
std::shared_ptr<Entry> Entry::create(const nlohmann::json& data) {
if(data["entry"] == "feature") {
return Feature::create(data);
@@ -41,6 +41,8 @@ namespace entry {
}
std::string Entry::getName(void) const {return data->name;}
+ void Entry::setName(const std::string& name) {data->name = name;}
+ std::string Entry::getEntryType(void) const {return data->entry;}
std::string Entry::getType(void) const {return data->type;}
std::string Entry::getText(void) const {return data->text;}
std::string Entry::getText(const creature::Creature& c) const {