Fixed dependencies for 'styling';

Fixed: specific character prefered over .* for keywords

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@306 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-04-28 21:58:29 +00:00
parent 5fa6cc3db9
commit e38cc6e2c9
11 changed files with 49 additions and 42 deletions
+4 -10
View File
@@ -154,25 +154,19 @@ ScriptValueP make_iterator(const Set& set) {
return new_intrusive1<ScriptCollectionIterator<vector<CardP> > >(&set.cards);
}
void mark_dependency_member(Set* value, const String& name, const Dependency& dep) {
void mark_dependency_member(const Set& set, const String& name, const Dependency& dep) {
// is it the card list?
if (name == _("cards")) {
value->game->dependent_scripts_cards.add(dep);
set.game->dependent_scripts_cards.add(dep);
return;
}
// is it the keywords?
if (name == _("keywords")) {
value->game->dependent_scripts_keywords.add(dep);
set.game->dependent_scripts_keywords.add(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.add(dep);
}
}
void mark_dependency_member(const SetP& value, const String& name, const Dependency& dep) {
mark_dependency_member(value.get(), name, dep);
mark_dependency_member(set.data, name, dep);
}
// in scripts, set.something is read from the set_info