[wmlunits] for campaigns, define a difficulty

The first preprocessor symbol listed in a campaigns difficulties=...
attribute is now set when parsing WML looking for unit definitions.
This commit is contained in:
Allefant 2014-01-27 16:57:16 +01:00
parent d8cd999248
commit 91800c34c8

View file

@ -212,6 +212,9 @@ def list_contents():
d = campaign.get_text_val("define")
d2 = campaign.get_text_val("extra_defines")
if d2: d += "," + d2
d3 = campaign.get_text_val("difficulties")
if d3:
d += "," + d3.split(",")[0]
append(info, cid, d, c = campaign)
return info