This avoids an issue where people could still apply formatting by using an older client.
Granted, any formatting would still appear in-lobby to anyone using an older client, but
this at least prevents the possibility of formatting appearing indefinitely if a game host
happens to never update their own client.
(cherry-picked from commit 9c311e2ca5db1f2b53570ae5bc0681f574c66f9d)
This is a good point since it ensures any place that might use the title before the lobby
(don't think there's any such places right now) won't inadvertently get formatted.
Also might be worth looking into a way to just strip formatting completely.
(cherry-picked from commit 58a2e23a0c78078844f7fc2d684f04f448081f8b)
Fixes wmllint crashing like this upon encountering a gzip tarball in an
add-on:
Traceback (most recent call last):
File "/home/shadowm/bin/wmllint-1.14", line 3188, in <module>
for fn in allcfgfiles(directory):
File "/home/shadowm/bin/wmllint-1.14", line 2944, in allcfgfiles
if interesting(os.path.join(root, name)):
File "/home/shadowm/bin/wmllint-1.14", line 2927, in interesting
return fn.endswith(".cfg") or is_map(fn) or issave(fn)
File "/home/shadowm/src/wesnoth-1.14/data/tools/wesnoth/wmltools3.py", line 270, in issave
return firstline.startswith("label=")
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
[ci skip]
(cherry-picked from commit c92e167a14229ed0d9b6f16f1d1ca31cacd292cd)
this would bring the whiteboard data of the differnt clients out of sync which could be a problem since the wb network protocoll identifies the actions to be removed ot replaced by index.
(cherry-picked from commit 3a28c3a3460aaff0d59826f401623dad8ecadb3f)
Fixes: https://forums.wesnoth.org/viewtopic.php?f=21&t=48370
In the tutorial when we occupy the first village the message tells us the
village count got incremented, but in the old version it was incremented
only afterwards. Non-narrator messages were updated properly. By adding the
redraw, narrator messages triggered by capture event produce the same
result as other speakers.
(cherry-picked from commit 1ea4149a4456ab8713dde4fbfcdd446b5762adcf)
There are only 3 places where it's actually really needed. Used the game_config_manager
singleton to retrieve a reference in those cases.
(cherry-picked from commit 4eee386664b66e801bd4498e8730c017af03f0aa)
This makes it so addon metadata (title, version) will be fetched from _server.pbl if
present and _info.cfg if not (see #3278).
This also eliminates the temporary addon_source struct and unifies the metadata parsing
and actual loading stages. They used to be separate since single-file addons were a
thing, but those were removed in 3f640b8e718e4c45d8f73798d839bfea0b413fab.
Also a bunch of minor code cleanup.
(cherry-picked from commit cd3c13aca223e8a8c681556fe8020915d98058e0)
This reverts commit c93482560779c0e137d9598b9e7185338afe2b82.
Keep data/test/ in 'scons dist' tarballs to match official tarballs.
(cherry-picked from commit bad6897cbc75225624814b66c9226cf6233e95cf)
This makes 'scons dist' work, although the resulting tarballs are not
yet identical to cmake tarballs.
Remove awk usage made obsolete by the git transition
(7f85fa000c836c27cfe9d829db3b0e8aaeb49821).
Update src/revision.hpp reference to use src/revision.h. The former
name is unused since at least 7625b1e079b470119d72ea67ce955104f464e4b8.
(cherry-picked from commit 0ee485415710288d27f7b766e48fe7451b03c9a4)
The documentation indicates you're not really meant to use the walker directly.
They're part of the implementation of the iterators. They could be used directly,
as shown here, but this is shorter.
(cherry-picked from commit aca7d4e6df4648ff45f48b6acb9e643de8c05103)
Missed in 207e763401a11e86c6c8ad3602efa514812bf902. Was only working for unit types.
(cherry-picked from commit f59f68a5277cb1dcbbbccc023ad005e7653d4fd2)
As per sigurd's trial and error: RELRO's options are unknown entirely and -fstack-protector-strong results in compile errors. Building with just PIE and _FORTIFY_SOURCE enabled does then compile, but results in a broken executable.
(cherry-picked from commit c9541176776aeb676e99f1804d123552430582ee)
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)