Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r--src/core/entity.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc
index bed17fb..e74b8b5 100644
--- a/src/core/entity.cc
+++ b/src/core/entity.cc
@@ -7,6 +7,7 @@
#include <vector>
#include <iomanip>
+#include "auxiliary/functions.h"
#include "sys/sys.h"
#include "core/entity.h"
#include "core/cvar.h"
@@ -170,6 +171,30 @@ void Entity::set_zone(Zone *zone)
entity_zone->add(this);
}
+void Entity::set_label(char const *label)
+{
+ entity_label.assign(label);
+ aux::to_label(entity_label);
+}
+
+void Entity::set_label(std::string const &label)
+{
+ entity_label.assign(label);
+ aux::to_label(entity_label);
+}
+
+void Entity::set_name(char const *name)
+{
+ entity_name.assign(name);
+ aux::strip_quotes(entity_name);
+}
+
+void Entity::set_name(std::string const &name)
+{
+ entity_name.assign(name);
+ aux::strip_quotes(entity_name);
+}
+
void Entity::serialize_server_create(std::ostream & os) const
{
os << entity_moduletypeid << " "