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)
The problem was introduced by commit 0f511e8 due to the [modify_unit] tag apparently causing prisoners to disappear because technically they were duplicates as they had merely been unstored and still existed on the recall list as well.
(cherry-picked from commit c9bb31d1cc9182a4450f29ae529416d2192ab4f9)
DW 5 Tirigaz - Changes to orc leader death event
Fixes#3092 - Updates objectives if orc leader is killed first, and gives additional dialogue
Fixes#3903 - Gold event doesn't fire if ghosts kill the orc leader
(cherry-picked from commit b3c40498d83d4ad3d0701baaee7ca8166546c7e3)
This was due to the change in the MP initialization process wherein the lobby wouldn't
show up until the initial gamelist was received. Since the admin auth message is sent
after [join_game] and before the initial gamelist, and the chatbox widget handled parsing
the auth message, the client was never marked as authenticated and therefor couldn't
observe private games. This fixes that by adding auth parsing to the MP initialization
process.
Note this doesn't fix the issue of the auth confirmation not showing up in the lobby chat
(issue #2920). I'll have to think of a way to fix that separately.
(cherry-picked from commit e8d55062c4293391ce6a9d70ed24bfa57aaa6490)