81559 Commits

Author SHA1 Message Date
Celtic Minstrel
cb3e6356dd Move the Dwarvish Miner unit to core
This also changes the tracking of what they're carrying to be a status instead of a role, which should be more portable to other use-cases.
2023-01-25 00:03:06 -05:00
Celtic Minstrel
b649374b9f WFL: Allow using locations_in_radius without the game state 2023-01-24 23:46:11 -05:00
Celtic Minstrel
9f57ca0ea2 Schema validator seems to do strange things on relative paths.
Make sure to always pass it an absolute path.
2023-01-24 23:39:22 -05:00
Celtic Minstrel
7ef71decc5 Correct some errors in the schema that were unearthed by the previous commit 2023-01-24 23:39:21 -05:00
Celtic Minstrel
5ec1d80bc1 Fix an issue with schema validator not reporting errors at top level 2023-01-24 23:39:21 -05:00
Celtic Minstrel
f43c52cdbf Update the pbl file schema
* forum_auth and [translation] were missing
* passphrase and email are only relevant with forum_auth=no
2023-01-24 23:39:21 -05:00
Steve Cotton
fba0970509 Add a unit test for scoped arrays
The existing test for scoped vars is both copied and renamed.
2023-01-24 21:02:35 +01:00
Tahsin Jahin Khalid
edb482ac83 HttT: make injured sergeant lie flat on ground 2023-01-24 19:40:09 +01:00
Iris Morelle
20e8402ae0 bi: Re-add screen dpi report
This was a casualty of 575286cb8609a913bc6d7788e06647a9f5519325
even though this particular use case is purely diagnostic for
devs reference when handling bug reports.
2023-01-23 20:55:20 +01:00
Iris Morelle
daf126c75d bi: Add SDL renderer report
This includes information on the renderer's name, whether it's
a software renderer or it's hardware accelerated, whether vsync
is enabled, and the maximum texture size.

(The other items in SDL_RendererInfo do not seem particularly
relevant to us right now.)
2023-01-23 20:55:20 +01:00
Iris Morelle
1a430b7ecc bi: Fix --report SIGSEGV caused by uninitialised video
At some point in 1.17.x, the check for whether the game window
was null disappeared. This brings it back by exposing a check
through the video namespace so as to avoid piggybacking further
on the video::get_window() function, which we are meant to avoid
using.
2023-01-23 20:54:06 +01:00
Iris Morelle
edbf332d48 Fix game data dir search for Visual Studio builds on Windows
The logic we used here hasn't had the desired results since the move
from using custom Visual Studio project files to using the CMake
integration system, so this patch updates it to match the layout we get
with the CMake integration on Visual Studio 2019 and 2022.

The previous logic remains an alternative for configurations where it
could be beneficial to use pwd as the data dir.
2023-01-23 08:15:19 +01:00
Severin Glöckner
9b235a2dec TSG 6a: scroll to the unit instead of speaker 2023-01-23 00:44:22 +01:00
Severin Glöckner
fa33c47d53 TSG 4: update code to match map
when this code was written, the adjacent terrain was not yet shallow water.
2023-01-23 00:41:56 +01:00
Steve Cotton
42baec931c Fix crash in scenario editor when placing units
The previous bugfix fixed a crash when loading savegames with units whose
abilities accessed the map while the display_context was still being
constructed, however it reintroduced a bug in the scenario editor. Using the
unit tool always crashed when adding any unit.

This commit uses 4d1fc268b1's code path whenever possible, however it falls
back to 6a21fdc675's code path when 4d1fc268b1 would assert. In practise one
path is used in game and the other is used in the scenario editor, but doing
the logic in this way ensures that any edge cases are going to affect the
scenario editor rather than the game itself.

Cherry picked from commit 1485cfd6256b73bb06aa34c512c2890749b45487,
with conflicts because code from attack_type::weapon_specials() has
moved to attack_type::weapon_specials_impl_adj().
2023-01-23 00:04:33 +01:00
Nils Kneuper
f535c07f3d updated Spanish translation 2023-01-22 20:51:04 +01:00
Pentarctagon
99bb65d1b3 whitespace fix. 2023-01-21 14:37:48 -06:00
Tahsin Jahin Khalid
ca49d10a47
[Achievements] add correct tag (#7306)
it's `[set_achievement]` (in the Lua file)

achievements: correct content_for=
tutorial: use correct id on achievement
2023-01-21 12:54:09 -06:00
Pentarctagon
fa084677c5 Add textdomain to achievements files. 2023-01-21 10:51:25 -06:00
Pentarctagon
59bef8c1e2 update changelog. 2023-01-21 10:34:03 -06:00
Pentarctagon
d1465a9eb9
Add basic achievements functionality. (#7237)
* Add basic achievements functionality.

This reads the mainline achievements.cfg and then all the achievements of each installed add-on.

This is intentionally handled separately from other WML loading so that:
a) All achievements and their status are able to be displayed on the main menu right after Wesnoth starts and regardless of which add-ons are active.
b) Add-ons can add additional achievements to other content, whether UMC or mainline. For example, a modification that adds more achievements for mainline campaigns.

Marking something as achieved is handled by the new [set_achieved] tag and whether an achievement has been completed can be checked via [has_achievement].

There is no attempt to prevent people from manually editing which achievements they've accomplished.

NOTE: These are *not* in any way related to Steam achievements!
2023-01-21 10:32:45 -06:00
Nils Kneuper
8887d9eac2 updated French translation 2023-01-21 10:46:06 +01:00
Nils Kneuper
6de89de7f6 updated Spanish translation 2023-01-21 10:45:08 +01:00
Iris Morelle
3e3cd06121 units: Limit energy bar sizes to the game tile size
Because of the move to hardware rendering in commit
afd6baa7cf1685610c72305f5c9f989078462dff, some relevant info
was lost that was previously used to limit bar height in
particular.

This patch re-adds a dimension check and additionally ensures
that the bar width doesn't exceed the tile size either.

Fixes #7171.
2023-01-20 11:17:22 +01:00
Tahsin Jahin Khalid
0b483953e9
[LoW] S3: fix mismatched coords of Urudin retreat (#7221)
The trigger for the move_to is now an area of 19 hexes.

Co-authored-by: Wedge009 <wedge009@wedge009.net>
2023-01-20 11:14:55 +01:00
Tahsin Jahin Khalid
e04858f753 LoW: fix scenario count inconsistency
Closes #7218
2023-01-20 02:50:05 +01:00
Steve Cotton
1640076dc4 Make the CI check the indent on most of the unit tests
There were two `--exclude` statements both pointing at the data/test
directory before, which was a trivial bug.

Exclude cve_tests because of the binary file that's masquerading as a .cfg;
I think it's correct to exclude the whole directory because any new tests
added there might also use weird edge cases in the parsing.

Exclude lua_tests as a "keep this PR small" thing. We should fix the bugs in
wmlindent, but I don't want to take on that work.

The exclusion of TerrainWML is again because I don't want to take on the work
of working out whether it's problems with terrain masks or bugs in wmlindent.

Most of the files in those directories wouldn't be changed, the ones that would
(or would trigger an error about not being valid UTF-8 ) are:

* data/test/scenarios/cve_tests/test_cve_2018_1999023_2.cfg
* data/test/scenarios/lua_tests/functional/lua_functional.cfg
* data/test/scenarios/lua_tests/wesnoth/map/mapgen_filter.cfg
* data/test/scenarios/wml_tests/TerrainWML/test_terrain_mask.cfg
2023-01-20 02:28:54 +01:00
Steve Cotton
5b4029429b Fix indentation in unit tests using sync.evaluate_*
I think I'm using two wmlindent bugs against each other here, putting two
opening statements on the same line to balance two closing statements on the
same line. However, the unit tests ought to be code that can be cut & pasted
elsewhere without causing indentation problems, and this is simpler than fixing
wmlindent's Lua parsing.
2023-01-20 02:28:54 +01:00
Steve Cotton
5f1d46513a Reindent unit tests and unit test macros
This doesn't cover all of the unit tests, it's the result of running wmlindent
on all of them and then reviewing whether the changes were bugs in the test, or
whether they're bugs in wmlindent.

Note: there are two cve_2018_1999023 tests. The other one needs to be treated
as a binary file, but the one changed here is plain text that loads its attack
from a separate file.

The change in start_position_generic.cfg doesn't seem good, but it's not
particularly bad and it's what wmlindent currently does.
2023-01-20 02:28:54 +01:00
loonycyborg
91d4543a3b
Update screenshot links in appdata per issue #7260 2023-01-19 23:31:11 +03:00
Wedge009
54bf10bda8 LoW S17: @nemaara's suggestions to adjust opponents' gold to offset the carry-over correction in S14. 2023-01-19 21:00:47 +01:00
Wedge009
223c03d7ef LoW S14: @nemaara's suggestions to adjust starting gold to offset the carry-over correction in S11. 2023-01-19 21:00:47 +01:00
Wedge009
e99a833c3e Make gold carry-over consistent with objectives.
Resolves #7230.
2023-01-19 21:00:47 +01:00
Kingofd
492c20baa6
Add exclusive unit traits handling similar to require_amla (#7109) 2023-01-19 13:49:39 -05:00
Steve Cotton
a4e17ac867 Show races with [race]help_taxonomy= as a tree in the help
For example, UtBS' Quenoth Elves now appear as a subfolder of Elves, and a major
reorganisation of animals is being discussed in https://r.wesnoth.org/t56522 .

Multiple levels of nesting are supported. If [race]help_taxonomy= points to a
race that isn't defined, or isn't defined with the current set of add-ons, then
it will fall back to adding the race at the top level. Discovering a unit
belonging to a subgroup will automatically treat the parent group as discovered
too.

I may have missed a trick in writing this nicely, the code uses several different
traversal patterns over the tree that it's constructing.
2023-01-18 15:34:22 +01:00
Steve Cotton
686e35e0e3 Use two-color orbs for allies' units (configurable by preferences)
These orbs no longer look the same as the player's own orbs, so they
won't cause confusion in multiplayer.

The relevant part of the advanced preference now shows:

```
[ ] - Show ally orb
[ ] - During ally’s turn, use a two-color orb to show movement
Radio buttons for colors: ( )  ( )  ( )  ( )  ( )  ( )  ( )
```

That offers these choices:

* Don't show ally orbs at all
* Always use the one-color (with ally color, not status)
* Use the two-color when that ally is playing, single color at other times
* Use the two-color when that ally is playing, no orb at other times

Rename some `allied_orb` functions to be `ally_orb`. This makes them consistent
with both the names of the corresponding `enemy_orb` functions and the WML
attribute that's used in the preferences file.

This probably doesn't need a change to the in-game help, at least for the en_US
version of the documentation. The current text in data/core/help.cfg is:

* Blue for allied units, except during that ally's own turn.
* During the ally's own turn, their units will be shown with the colors showing
whether the units can still move and attack; however their moves, and the
corresponding orb changes, are delayed as explained in "Shroud and Fog of War'.
2023-01-17 18:06:46 +01:00
Steve Cotton
be432e441b Bump vcpkg baseline to use a non-obsolete version of libtool
The vital commit is fd766eba2b4cf59c7123d46189be373e2cee959d, but
I'm taking the most recent version of vcpkg as the new baseline
because it might as well use the latest.
2023-01-17 14:09:46 +01:00
Steve Cotton
bc7b177332 Compatibility with Boost 1.81's locale changes
The collector_base class has been deprecated in Boost 1.81, and we're compiling
with Werror on the Windows CI so it needs an immediate fix for the new vcpkg.
2023-01-17 14:09:46 +01:00
Gunter Labes
04cedaba2e
Grammar correction 2023-01-17 10:16:13 +01:00
Toranks
092fd23758
Test fire_event of kill unit on recall list (#7283) 2023-01-16 13:25:09 +01:00
Nils Kneuper
d9be724690 updated British English translation 2023-01-15 11:46:13 +01:00
Nils Kneuper
4d982c187a fixed credits for Spanish translation update 2023-01-15 11:44:46 +01:00
Nils Kneuper
6227521306 updated Finnish translation 2023-01-15 11:44:08 +01:00
Nils Kneuper
103bd36bf0 updated Spanish translation 2023-01-15 11:39:45 +01:00
Wedge009
4bfa97ab12 Add missing text domain declarations for unit test files. 2023-01-15 18:40:21 +11:00
Pentarctagon
20c38a08e9 1.17.12+dev 2023-01-14 18:31:58 -06:00
Pentarctagon
b08582209b 1.17.12 1.17.12 2023-01-14 18:27:55 -06:00
Pentarctagon
292f77a456 pot-update and regenerate doc files 2023-01-14 18:24:11 -06:00
Steve Cotton
d35ea2f2dc Orb color preferences dialog layout and tooltip
Add some spacing to make it clearer what is grouped with what, move the
disengage orb's setting to be part of the partial orb's group, and add
a tooltip for it.

This dialog uses checkbox labels as section headers to indicate what the rows
of colors refer to. This commit doesn't change that, but it makes the grouping
clearer. Actual section headers would take additional space and probably not
look any better.
2023-01-14 18:10:14 +01:00
Nils Kneuper
b960edace6 updated French translation 2023-01-14 12:03:49 +01:00