Author: anonymissimus
Date: Thu Mar 29 17:28:17 2012
New Revision: 53686
URL: http://svn.gna.org/viewcvs/wesnoth?rev=53686&view=rev
Log:
remove support for [object] unit_type= and [object]unit_gender=
1. Both are covered by [object][filter].
2. They were undocumented in the wiki.
3. They are scheduled for removal since early 1.7.
(patch #3211 by brilliand)
Modified:
trunk/src/unit.cpp
Modified: trunk/src/unit.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.cpp?rev=53686&r1=53685&r2=53686&view=diff
==============================================================================
--- trunk/src/unit.cpp (original)
+++ trunk/src/unit.cpp Thu Mar 29 17:28:17 2012
@@ -2336,25 +2336,7 @@
std::vector<t_string> effects_description;
foreach (const config &effect, mod.child_range("effect"))
{
- // See if the effect only applies to certain unit types
- const std::string &type_filter = effect["unit_type"];
- if(type_filter.empty() == false) {
- const std::vector<std::string>& types =
utils::split(type_filter);
- if(std::find(types.begin(),types.end(),type_id()) ==
types.end()) {
- continue;
- }
- }
- // See if the effect only applies to certain genders
- const std::string &gender_filter = effect["unit_gender"];
- if(gender_filter.empty() == false) {
- const std::string& gender = gender_string(gender_);
- const std::vector<std::string>& genders =
utils::split(gender_filter);
- if(std::find(genders.begin(),genders.end(),gender) ==
genders.end()) {
- continue;
- }
- }
- /** @todo The above two filters can be removed in 1.7 they're
covered by the SUF. */
- // Apply SUF. (Filtering on location is probably a bad idea
though.)
+ // Apply SUF.
if (const config &afilter = effect.child("filter"))
if (!matches_filter(vconfig(afilter), loc_)) continue;
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits