wmlunits: Fix portrait logic
[portrait] was an implementation detail of an early version of the GUI2 [message] dialog back in 1.5.x and it was supposed to go away shortly after the experimentation stage, according to mordante, and especially after ~RIGHT() was implemented. For some bizarre reason, units.w.o has been relying on this tag all along, meaning that many UMC unit portraits, and all mainline portraits since a 1.13.x release are no longer displayed because they are specified using the standard profile= attribute instead.
This commit is contained in:
parent
3746925eab
commit
667f9a2f11
1 changed files with 2 additions and 4 deletions
|
@ -693,13 +693,11 @@ class HTMLOutput:
|
|||
u.get_text_val("id"), x.name.decode("utf8")))
|
||||
return None, None
|
||||
image = self.wesnoth.get_unit_value(x, "image")
|
||||
portrait = x.get_all(tag="portrait")
|
||||
portrait = self.wesnoth.get_unit_value(x, "profile")
|
||||
if not portrait:
|
||||
bu = self.wesnoth.get_base_unit(u)
|
||||
if bu:
|
||||
portrait = bu.get_all(tag="portrait")
|
||||
if portrait:
|
||||
portrait = portrait[0].get_text_val("image")
|
||||
portrait = self.wesnoth.get_unit_value(bu, "profile")
|
||||
if not image:
|
||||
if x.name == b"female":
|
||||
baseunit = self.wesnoth.get_base_unit(u)
|
||||
|
|
Loading…
Add table
Reference in a new issue