cards dependencies, clearing order cache

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@134 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-12-21 19:54:18 +00:00
parent f522cb9be6
commit e8f580b691
6 changed files with 54 additions and 7 deletions
+18 -1
View File
@@ -129,7 +129,21 @@ ScriptValueP make_iterator(const Set& set) {
}
void mark_dependency_member(Set* value, const String& name, const Dependency& dep) {
// TODO
// is it the card list?
if (name == _("cards")) {
value->game->dependent_scripts_cards.push_back(dep);
return;
}
// is it the keywords?
if (name == _("keywords")) {
value->game->dependent_scripts_keywords.push_back(dep);
return;
}
// is it in the set data?
IndexMap<FieldP,ValueP>::const_iterator it = value->data.find(name);
if (it != value->data.end()) {
(*it)->fieldP->dependent_scripts.push_back(dep);
}
}
void mark_dependency_member(const SetP& value, const String& name, const Dependency& dep) {
mark_dependency_member(value.get(), name, dep);
@@ -157,6 +171,9 @@ int Set::positionOfCard(const CardP& card, const ScriptValueP& order_by) {
}
return order->find(card);
}
void Set::clearOrderCache() {
order_cache.clear();
}
// ----------------------------------------------------------------------------- : Styling