summaryrefslogtreecommitdiff
path: root/src/resources/itemdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-02-12 17:02:17 +0200
committerAndrei Karas <akaras@inbox.ru>2011-02-12 17:02:17 +0200
commit992c2920f7e1940aa293e27cf4ea7ec23668a673 (patch)
tree4328076c6585a015433cb8bb763eab687da675bc /src/resources/itemdb.cpp
parent428770c113abf002e5cc0b79ae872db1f26cf283 (diff)
downloadmv-992c2920f7e1940aa293e27cf4ea7ec23668a673.tar.gz
mv-992c2920f7e1940aa293e27cf4ea7ec23668a673.tar.bz2
mv-992c2920f7e1940aa293e27cf4ea7ec23668a673.tar.xz
mv-992c2920f7e1940aa293e27cf4ea7ec23668a673.zip
Add items attribute what allow hide other sprites only by id.
Diffstat (limited to 'src/resources/itemdb.cpp')
-rw-r--r--src/resources/itemdb.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index 075104516..97a6ba1f4 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -205,6 +205,8 @@ void ItemDB::load()
std::string drawBefore = XML::getProperty(node, "drawBefore", "");
std::string drawAfter = XML::getProperty(node, "drawAfter", "");
std::string removeSprite = XML::getProperty(node, "removeSprite", "");
+ std::string removeSpriteIds = XML::getProperty(node, "removeSpriteIds", "");
+ std::set<int> rSprites = splitToIntSet(removeSpriteIds, ',');
std::string tags[3];
tags[0] = XML::getProperty(node, "tag",
@@ -265,6 +267,7 @@ void ItemDB::load()
itemInfo->setDrawAfter(parseSpriteName(drawAfter));
itemInfo->setDrawPriority(drawPriority);
itemInfo->setRemoveSprite(parseSpriteName(removeSprite));
+ itemInfo->setRemoveSpriteIds(rSprites);
std::string effect;
for (int i = 0; i < int(sizeof(fields) / sizeof(fields[0])); ++i)