From f46be446304dcb2d609fcd2648fd36d3f2fda054 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 28 Sep 2008 18:02:06 +0000 Subject: intro module groundworks --- src/core/entity.cc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/core/entity.cc') 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 #include +#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 << " " -- cgit v1.2.3