summaryrefslogtreecommitdiffstats
path: root/sigmod/Tile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sigmod/Tile.cpp')
-rw-r--r--sigmod/Tile.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/sigmod/Tile.cpp b/sigmod/Tile.cpp
index 3646dbd3..d4468056 100644
--- a/sigmod/Tile.cpp
+++ b/sigmod/Tile.cpp
@@ -31,6 +31,7 @@ Sigmod::Tile::Tile(const Tile& tile) :
Sigmod::Tile::Tile(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
+ m_walkable(true),
m_script("", "")
{
}
@@ -60,6 +61,7 @@ void Sigmod::Tile::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
+ LOAD(walkable);
LOAD(script);
}
@@ -67,6 +69,7 @@ QDomElement Sigmod::Tile::save() const
{
SAVE_CREATE();
SAVE(name);
+ SAVE(walkable);
SAVE(script);
return xml;
}
@@ -76,6 +79,11 @@ void Sigmod::Tile::setName(const QString& name)
CHECK(name);
}
+void Sigmod::Tile::setWalkable(const bool walkable)
+{
+ CHECK(walkable);
+}
+
void Sigmod::Tile::setScript(const Sigcore::Script& script)
{
CHECK(script);
@@ -86,6 +94,11 @@ QString Sigmod::Tile::name() const
return m_name;
}
+bool Sigmod::Tile::walkable() const
+{
+ return m_walkable;
+}
+
Sigcore::Script Sigmod::Tile::script() const
{
return m_script;
@@ -96,6 +109,7 @@ Sigmod::Tile& Sigmod::Tile::operator=(const Tile& rhs)
if (this == &rhs)
return *this;
COPY(name);
+ COPY(walkable);
COPY(script);
return *this;
}