Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-02-25 18:45:02 +0000
committerStijn Buys <ingar@osirion.org>2012-02-25 18:45:02 +0000
commit9e7b304351872f0d1c1fb7cc5af7e8bc3c7df678 (patch)
tree6e40d4ff00cbf63cb36a89abbfb8f90b5b273e06 /src/entityproperties.cc
parent0934e5bc329c2b292110b1559c4114f9d1dbba9d (diff)
Added support for entity templates.
Diffstat (limited to 'src/entityproperties.cc')
-rw-r--r--src/entityproperties.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/entityproperties.cc b/src/entityproperties.cc
index bdc2394..3a0dff6 100644
--- a/src/entityproperties.cc
+++ b/src/entityproperties.cc
@@ -13,6 +13,7 @@ namespace editor
EntityProperties::EntityProperties()
{
properties_radius = 0;
+ properties_template_type = 0;
}
EntityProperties::~EntityProperties()
@@ -62,6 +63,16 @@ void EntityProperties::save(QTextStream &textstream)
}
textstream << "[" << type() << "]" << '\n';
+
+ save_comment(textstream, "template");
+ if (template_label().size()) {
+ if (template_type() == 0) {
+ textstream << "template=" << template_label() << '\n';
+ } else if (template_type() == 1) {
+ textstream << "ship=" << template_label() << '\n';
+ }
+ }
+
save_comment(textstream, "label");
if (label().size())
textstream << "label=" << label() << '\n';