From 0d32e0d3342ef2455014c8e1164977c816763317 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 21 Nov 2023 16:26:34 -0500 Subject: Added rudimentary item creation --- src/entry.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/entry.cc') 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 namespace entry { - // Returns either a feature, an item, a creature, or a spell + // Returns a feature, item, creature, or spell std::shared_ptr 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 { -- cgit v1.2.3