78377 Commits

Author SHA1 Message Date
loonycyborg
0ffe194f71 Update flatpak runtime version. This fixes #5552 2021-02-17 21:35:57 +03:00
newfrenchy83
3f131848ea
upgrades codeblock to Lua 5.4.2 (#5556)
* upgrades codeblock to Lua 5.4.2

* fix error

* upgrade to c++20

* upgrade to c++20

* upgradeto c++20

* Update wesnothd.cbp
2021-02-18 02:15:13 +11:00
Celtic Minstrel
54cde58860
pick_advance: Ignore units on the recall list 2021-02-17 09:32:24 -05:00
Celtic Minstrel
174f7365d2 pickadvance: Update deprecated things and other updates
- Use the functional library instead of a hand-rolled filter
- Use stringx.split
- No need for an object ID if using remove_modifications
2021-02-17 00:31:28 -05:00
Iris Morelle
5d67c191ef gui2/statistics_dialog: Minor restyling
* Moved the combobox (sorry celmin) to the top right in a manner akin
   to the search boxes in dialogs with those.
 * Switched list headers to using the gold_small label variation.
2021-02-17 01:49:13 -03:00
Iris Morelle
f8d7969774 gui2/unit_list: Fix Status header's baseline being completely off 2021-02-17 01:28:30 -03:00
Iris Morelle
184a154ded pick_advance: Do away with the Reset button and selection status text
This replaces the Reset button with a dedicated listbox entry, and
replaces the selection status text with code that sets the initial
selection for the listbox and an icon that's used to display whether a
selection applies globally or only to the current unit.
2021-02-17 01:08:13 -03:00
Iris Morelle
d69c735b75 pick_advance: Better dialog caption and menu label 2021-02-17 01:04:43 -03:00
Iris Morelle
1530ab8441 pick_advance: Add Cancel button
(CC #5555)
2021-02-16 23:08:38 -03:00
Iris Morelle
a426d9fa5f pick_advance: Use the correct team colour settings
Also removed a listbox selection callback that serves no purpose beyond
re-setting the selection's icon to what it already is. Weird code.

(CC #5555)
2021-02-16 22:54:25 -03:00
Iris Morelle
bb6ef63f0f pick_advance: Bring the UI layout more in line with the game engine
This does alter some of the code significantly to make it less "clever"
(no more dynamic build) but also less hostile to future modifications
like this.

(CC #5555)
2021-02-16 22:54:25 -03:00
Celtic Minstrel
75522eb224 Update changelog 2021-02-16 20:42:35 -05:00
Celtic Minstrel
d2734973ed Add a command-line option that makes deprecated Lua stuff evaporate 2021-02-16 20:40:18 -05:00
Celtic Minstrel
56272d4b9c Add stack traces on Lua warnings
This means that any deprecation message triggered from Lua now explains exactly where it triggered.

The message still triggers only once, so you would need multiple passes to fix every case, but it seems like an improvement.
2021-02-16 20:02:16 -05:00
Celtic Minstrel
a019edb26c
Fix cave map generator producing passages along the map border
Maps are 0-indexed even in Lua (so that 1 ends up as the lowest passable coordinate), so subtract 1 here

Closes #5407
2021-02-16 13:46:01 -05:00
Elvish_Hunter
2a83e78a3c wmllint: don't try to collect WML tags inside Lua code
Fixes #5509
2021-02-16 16:18:53 +01:00
Celtic Minstrel
a0ee38a49a
Use to-be-closed variables to scope WML variables in tag definitions (#5536) 2021-02-15 21:11:56 -05:00
Iris Morelle
a2d676e394 Take display zoom into account when rendering unit animation frames
It was already considered for registering halos, just not for rendering
regular frames. This commit touches the halo code a little so we don't
need to call get_zoom_factor() multiple times per frame.

Closes #5508.
2021-02-15 21:20:53 -03:00
Celtic Minstrel
438b661494 Avoid map borders in cave generator
Addresses #5407
2021-02-15 18:35:54 -05:00
doofus-01
aef55dcc9e
UtBS Sc8 terrain graphics - Merge pull request #5547
UtBS - new terrain-graphics rules for flood water
2021-02-15 15:05:30 -08:00
Charles Dang
d7eab6894c Campaignd: cleaned up error reporting slightly
This cleans up the awkwardness I introduced in 5de1f8d5ccda92e6e02df84146e85fd84d8fb241 and 78373d7c59e4876c27a6b14ae7ea2b308815eb24.
2021-02-16 09:55:03 +11:00
Celtic Minstrel
3671d3a8a9 Fix music track valid key not working 2021-02-15 16:28:25 -05:00
Celtic Minstrel
7e699ca398 Fix a deprecate_api bug 2021-02-15 16:28:14 -05:00
Celtic Minstrel
b60164b8c1 Utilize the new Lua warning system to push deprecation messages to the in-game console 2021-02-15 15:19:23 -05:00
Celtic Minstrel
c52b71bffd Add a deprecated declaration for unpack so that any older add-on code that uses it still works 2021-02-15 14:26:59 -05:00
doofus-01
d435ec3d0b campaigns - Add flood water to UtBS S8 2021-02-15 10:26:36 -08:00
Pentarctagon
7349ac65e0
lua unpack -> table.unpack
lua 5.4 apparently fully did away with the former.

Fixes #5546
2021-02-15 12:11:48 -06:00
doofus-01
625c41b93b terrain-graphics - small changes related to water transitions 2021-02-15 09:35:53 -08:00
Charles Dang
f1f8769f7d Made optional_reference::ptr return nullptr of no reference is held
Makes more sense than propagating the exception from value(). operator-> *should* throw without value, though, so that was retained.
2021-02-16 04:16:38 +11:00
Charles Dang
e28d0399b4 Updated schema for [campaign] background 2021-02-15 16:45:19 +11:00
nemaara
f179fdb35f TRoW: use background 2021-02-14 22:24:11 -05:00
nemaara
565fae7c5b NR: use background 2021-02-14 22:16:16 -05:00
nemaara
157ed152e7 Liberty: use background 2021-02-14 22:13:19 -05:00
nemaara
b6be6c8243 AToTB: use background instead of image 2021-02-14 22:06:06 -05:00
nemaara
3d08a2a0db DiD: use background instead of image 2021-02-14 21:54:33 -05:00
nemaara
3e81f0e34e Add TRoW rebalance to changelog 2021-02-14 21:40:26 -05:00
nemaara
e238f6e9e0 TRoW: rebalance pass 2021-02-14 21:38:49 -05:00
Iris Morelle
e12f08f58d UtBS: Revert incomplete gender swap in scenario 9
No need to break UMC for the sake of historical accuracy.
2021-02-14 23:30:54 -03:00
Iris Morelle
e03ebed407 website: New Year copyright update
[ci skip]
2021-02-13 23:08:03 -03:00
Pentarctagon
a7aeff9e49
Changelog update. 2021-02-13 19:30:30 -06:00
Pentarctagon
093db78cc7 Add the Plan Unit Advance modification to mainline. 2021-02-13 19:16:37 -06:00
Pentarctagon
c05e39ecc1 Always have units with multiple advancements level up to the first one listed in the unit_type.
There's already enough randomness in Wesnoth; having the game randomly choose what a unit levels up to in a multiplayer game because it happens to advance on someone else's turn is unnecessary.
This also reduces the need to manually select a unit's advancement path for advancement planning modifications. For example, if you want your Mage to level up into a White Mage, this is now the default and doesn't need to be manually selected by the player.
2021-02-13 19:16:37 -06:00
Pentarctagon
53f9dbb51a Remove the Delay Advancements modification.
While implementationally it's very simple, the feedback so far (minimal as it may be) has been negative due to the side effects on existing gameplay mechanics:
* Delaying advancement until the next time it's the advancing unit's side's turn gives enemies a much larger window to kill the unit to prevent it from leveling up.
* The majority of units don't have multiple advancement options, so delaying their advancement as well isn't helpful.

Additionally, leaving this in for 1.16 would mean that it would not be possible to remove it in 1.17 or later without breaking any replays that did use it.
2021-02-13 19:16:37 -06:00
Iris Morelle
bbcf9db1b5 Update changelog 2021-02-13 20:05:18 -03:00
Iris Morelle
dc451cae24 campaignd: Fix minor log message typo 2021-02-13 20:03:12 -03:00
Iris Morelle
c5abf1bb00 campaignd: Fix UB when servicing [request_campaign]
std::distance(A, B) requires A and B to be random access iterators if
the expression B < A is even expected to make any sense. std::map
produces bidirectional iterators instead, so this code was causing UB
when [request_campaign] was used with a From version newer than the To
version (a.k.a. downgrading an add-on).

This fix also allows us to skip a lot of nonsense in the event that From
== To.
2021-02-13 19:50:07 -03:00
doofus-01
888edc85db
Units - minor fixes to Dunefolk - Merge pull request #5522
- Fix some sprite graphics configurations
 - Give mounted dunefolk the mounted undead variation
2021-02-13 12:54:25 -08:00
doofus-01
57d3539bfe units - make horse-based dunefolk have mounted undead variation 2021-02-13 10:05:16 -08:00
Steve Cotton
4a43d00522 Show a two-color tennis ball orb for the disengaged state (#5155)
As the disengaged state is part-way between the "partial" and "moved" states,
the orb has parts in each color. On the minimap these units are shown in the
partial color (which is also the color that would be used before this change).

This will match the mounted Quenoth units' "disengage" skill, when they
can still move but can't attack. It should also trigger for some UMC abilities
that get extra moves after a character attacks.

During testing, I found that TSG allows some of the bandits to attack on the
first turn of the bandit branch. There's no gameplay change there, but the orbs
make it much clearer that some units can still attack.

I think there are already too many preferences for orbs, so reused the existing
settings for the colors. A new "show disengaged orb" preference is added, which
when disabled shows the old partial orb instead.

Update the orb and ellipse sections of doc/manual/.

Notes about how I created the new orb image:

* create a color range to_ellipse_red with rgb=FF0000,FF0000,000000,FF0000
* wesnoth --render-image 'misc/orb.png~RC(magenta>to_ellipse_red)' images/misc/orb-ellipse-red.png
* open the orb.png and orb-ellipse-red.png images as layers in Gimp, add a layer mask to both of them
* use the layer mask to get each pixel from exactly one of the layers
2021-02-13 18:28:33 +01:00
Charles Dang
561cc33dc4
Upgrade to Lua 5.4.2 (#5535)
The change to static_cast for the definition of  LUAL_BUFFERSIZE replaces the fix previously used (d0100758f855ec0d8f30dff41e8a8b6ff2d45fda) for Lua 5.3. 5.4 removes the static alternative for LUAL_BUFFERSIZE. A better solution would probably be to disable the old-style-cast warning for luaconf.h, but I can't figure out how to do that so using static_cast is the easiest solution. Do note that change will have to be applied each Lua update like the aforementioned commit.
2021-02-14 02:07:12 +11:00