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.h
parent0934e5bc329c2b292110b1559c4114f9d1dbba9d (diff)
Added support for entity templates.
Diffstat (limited to 'src/entityproperties.h')
-rw-r--r--src/entityproperties.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/entityproperties.h b/src/entityproperties.h
index 9a276cb..6fc3d5b 100644
--- a/src/entityproperties.h
+++ b/src/entityproperties.h
@@ -63,6 +63,22 @@ public:
inline const QString & subsections() const {
return properties_subsections;
}
+
+ /**
+ * @brief returns the template type of this object
+ * 0 = normal template from templates.ini
+ * 1 = ship templatefrom ships.ini
+ * */
+ inline const int template_type() const {
+ return properties_template_type;
+ }
+
+ /**
+ * @brief returns the template label of this object
+ * */
+ inline const QString &template_label() const {
+ return properties_template_label;
+ }
/* ---- mutators ---- */
@@ -132,6 +148,24 @@ public:
properties_angles.assign(yaw, pitch, roll);
}
+ /**
+ * @brief set the object template
+ * @param template_type 0 = template, 1 = ship
+ * @param template_label label of the template to be used
+ * */
+ inline void set_template(const int template_type, const QString &template_label) {
+ properties_template_type = template_type;
+ properties_template_label = template_label;
+ }
+
+ inline void set_template_type(const int template_type) {
+ properties_template_type = template_type;
+ }
+
+ inline void set_template_label(const QString &template_label) {
+ properties_template_label = template_label;
+ }
+
private:
float properties_radius;
@@ -139,6 +173,9 @@ private:
QString properties_type;
Vector3f properties_angles;
+
+ int properties_template_type;
+ QString properties_template_label;
};
} // namespace editor