mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-07 05:06:32 +00:00
introduced [has_unit]search_recall_list=yes|no (def no) parameter
in SSFs (as in [have_unit])
This commit is contained in:
parent
64907f0833
commit
437a438fee
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user