From 9e7b304351872f0d1c1fb7cc5af7e8bc3c7df678 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 25 Feb 2012 18:45:02 +0000 Subject: Added support for entity templates. --- src/editorwindow.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/editorwindow.cc') diff --git a/src/editorwindow.cc b/src/editorwindow.cc index bd00189..6757745 100644 --- a/src/editorwindow.cc +++ b/src/editorwindow.cc @@ -143,6 +143,14 @@ bool EditorWindow::loadFile(const QString &filename) entity->properties()->set_comment("label", ini.comment()); entity->properties()->set_label(str); + } else if (ini.got_key_string("template", str)) { + entity->properties()->set_comment("template", ini.comment()); + entity->properties()->set_template(0, str); + + } else if (ini.got_key_string("ship", str)) { + entity->properties()->set_comment("template", ini.comment()); + entity->properties()->set_template(1, str); + } else if (ini.got_key_string("name", str)) { entity->properties()->set_comment("name", ini.comment()); entity->properties()->set_name(str); -- cgit v1.2.3