mail[Wesnoth-commits] r25391 - /trunk/data/tools/wmlunits


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by esr on March 31, 2008 - 19:42:
Author: esr
Date: Mon Mar 31 19:42:53 2008
New Revision: 25391

URL: http://svn.gna.org/viewcvs/wesnoth?rev=25391&view=rev
Log:
Implement do_not_list interpretation for wml_units.

Modified:
    trunk/data/tools/wmlunits

Modified: trunk/data/tools/wmlunits
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wmlunits?rev=25391&r1=25390&r2=25391&view=diff
==============================================================================
--- trunk/data/tools/wmlunits (original)
+++ trunk/data/tools/wmlunits Mon Mar 31 19:42:53 2008
@@ -66,9 +66,11 @@
             units = WML.get_first("+units")
 
         newunits = units.get_all("unit_type")
+        self.units_by_campaign[campaign] = []
         for unit in newunits:
-            unit.campaign = campaign
-        self.units_by_campaign[campaign] = newunits
+            if unit.get_text_val("do_not_list", "no") == "no":
+                self.units_by_campaign[campaign].append(unit)
+                unit.campaign = campaign
 
     def find_unit(self, unit_id):
         "Find unit by id.  Relies on IDs being unique."




Related Messages


Powered by MHonArc, Updated Mon Mar 31 20:02:08 2008