If the leader hasn't been discovered, the "Unknown Unit" topic will be shown.
Fixes#1491
(cherry-picked from commit a8f83f6e687abe997d33a028f841c0bdd5495a11)
Half-fix for issue #1634 and issue #1924.
The issue that remains to be solved is that on subsequent sessions after
a campaign has failed to load, it is possible for the game to generate a
cache entry for it that only contains the main menu WML for it.
Apparently the config cache transactions mechanism causes the game to
try to generate a cache entry with the wrong defines (a define set that
doesn't include the campaign's symbol, for instance) instead of the ones
that are actually needed and used to match the cache entry's filename
via checksumming. As a result, on subsequent sessions the failed
campaign is aborted with "failed to load the scenario" instead of
displaying the real WML error again (since the error is not hit again if
it depends on the campaign's symbol being defined).
In the meantime, this at least removes the red herring error and makes
the underlying issue a bit more visible. It's a very crude hack but it
does the job.
(cherry-picked from commit 0c2298d8c2057344b9c94c9fe7ce848838b363e6)
For lobby messages, there was a length cap in place already, but the
truncated message was lost in processing because it ended up in a WML
document that isn't the one relayed to listening clients.
On the other hand, whisper messages were missing the truncate logic
entirely. Oops.
(The logic for in-game messages does truncate messages correctly as far
as I can tell, and additionally the client UI doesn't allow overlong
messages.)
Thanks to Soliton for pointing me towards the faulty code.
(cherry-picked from commit cdc8da25aea2cbc055dc12879d2c4333fecfc3e1)
NOTE: the rule for the "true orc" case does not work. The string in
question will just have to be fuzzied.
[ci skip]
(cherry-picked from commit 72948787450d2ba273b9a901455ae02ccf1cce5e)
Apparently, this also causes the slider's value to be saved when dismissing the dialog with the checkbox disabled.
Fixes#2741
(cherry-picked from commit e126e5ba3672fe87e7045bce8580ac26b1f536aa)
Also fixes#2958 in the process since the entire setup process isn't repeated
when resetting selections.
(cherry-picked from commit 30121aeb9c31420564d0249e99cf777098244d83)
Fixes the campaign selection dialog's modification dropdown saying "1 other" for
the first mod you select.
(cherry-picked from commit f54b3f722515c94a96d8ba1694e65ae4697c1c01)
Also initialized it to 0 in the ctor instead of relying on that being set
via set_values().
(cherry-picked from commit e8bd3c26d2dfaed83edb5f66b55b3ddaa5004911)
menu_button doesn't even actually inherit from clickable_item. The only reason
[dis]connect_click_handler was declared in this class is the original implementation
was copied extensively from the Button widget.
Using NOTIFY_MODIFIED also means callbacks can fire if set_value/set_selected is used
on a menu_button.
The [dis]connect_click_handler functions were also removed from multimenu_button. All
callbacks for this widget type already used NOTIFY_MODIFIED signals.
(cherry-picked from commit 55f14ff22cf09c8e28da3c97731913349073fcd1)
Retvals are only relevant for widgets that are supposed to trigger something
like a window closure, and that makes sense for neither of these widgets. The
only reason the Menu Button widget has it is its original implementation was
largely copied from the Button widget, and the Multimenu Button widget copied
from the Menu Button widget.
(cherry-picked from commit 2d9b7d82c6a602c0b142bea38cebdb3650db62d6)
Also update Dead Water's copy of it to use race= instead of a
list of unit types (as done for the core object in 613dd431).
(cherry-picked from commit ad7bc19dd98990b443bd5037952ff612dce502af)
This commit excludes changes to S05 Tirigaz, I think changing the dialogue
there is going to be more complicated, and it's better for that to have a
separate PR.
(cherry-picked from commit d5f6c1723910ba32326aff466c1fb710f6afa803)
[ci skip]
Really no reason for the text area to grow since the text is set in pre_show and
therefor the widget is always the right size. >_<
(cherry-picked from commit 01d37ca7953f3efdd143f7265ecc94dc01791ebb)
The orc calls them fish-men several times, so changing it to "merfolk"
wouldn't fit.
Also a whitespace fix from wmlindent.
[ci skip]
(cherry-picked from commit ce093e229016f09da90415dd59305c36958b7c18)