introduced [has_unit]search_recall_list=yes|no (def no) parameter

in SSFs (as in [have_unit])
This commit is contained in:
Anonymissimus 2011-05-19 22:49:01 +00:00
parent 64907f0833
commit 437a438fee
2 changed files with 11 additions and 0 deletions

View File

@ -33,6 +33,7 @@ Version 1.9.6+svn:
-- assigns a new recruit list to the leader
* added support for inline SSF to [store_side], added attribute
"side" in the created array
* introduced [has_unit]search_recall_list=yes|no (def no) parameter in SSFs
Version 1.9.6:
* Campaigns:

View File

@ -132,6 +132,16 @@ bool side_filter::match_internal(const team &t) const
break;
}
}
if(!found && unit_filter["search_recall_list"].to_bool(false)) {
const std::vector<unit>& recall_list = t.recall_list();
foreach(const unit& u, recall_list) {
scoped_recall_unit this_unit("this_unit", t.save_id(), &u - &recall_list[0]);
if(u.matches_filter(unit_filter, u.get_location(), flat_)) {
found = true;
break;
}
}
}
if (!found) {
return false;
}