81539 Commits

Author SHA1 Message Date
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
Nils Kneuper
ba2bafc64a updated Czech translation 2023-01-14 12:02:59 +01:00
Nils Kneuper
ffc024077b updated Portuguese (Brazil) translation 2023-01-14 12:01:37 +01:00
Pentarctagon
ceb05f3d9f Enable logging to file by default. 2023-01-13 12:51:03 +01:00
Gunter Labes
7ca149ef78
Remove obsolete todo 2023-01-12 18:01:34 +01:00
Tahsin Jahin Khalid
4fd3bc565c Units: add correct textdomain to Grand Dragonfly
Grand Dragonfly was the using the textdomain of the UMC "Coaltion of Swamp Creatures: big Battle 1"
2023-01-12 15:00:49 +01:00
Pentarctagon
0305df5965 Changelog update. 2023-01-11 10:24:06 -06:00
Pentarctagon
3d7d5dbdbf
Add ability to allow secondary authors to upload an add-on. (#7268)
* Add ability to allow secondary authors to upload an add-on.

The secondary_authors attribute is a comma-delimited list of forum accounts that can also upload updates to an add-on. Secondary authors can't change the primary/secondary authors and can't delete the add-on.

The primary author can also make someone else the primary author by:
* Putting their username in the secondary_authors attribute
* Putting someone else's username in the author attribute
* Uploading the add-on while selecting themselves
This works since they are still (until the upload is done) the primary author in the database, so they are allowed to change the authors list, including in this case.
2023-01-11 10:21:55 -06:00
Steve Cotton
e7e6649377 Fix the indentation in the "special_calculations" test
Just a whitespace change, because it can't be used as a reference to cut & paste from
when it's incorrectly indented.
2023-01-10 12:25:16 +01:00
Pentarctagon
bc26194e5b Add era to faction query. 2023-01-09 09:05:44 -06:00
Nils Kneuper
ecb8e4c587 updated Japanese translation 2023-01-08 16:00:12 +01:00
Nils Kneuper
3fb474836e updated French translation 2023-01-07 11:18:55 +01:00
Pentarctagon
fbeae32002 Rename database column SOURCE to ADDON_ID.
Also rename VERSION to ADDON_VERSION.
2023-01-06 19:59:26 -06:00
Pentarctagon
18d1f235ca Noticed I changed the wrong column but forgot to save the file after... 2023-01-06 10:48:42 -06:00
Pentarctagon
859a56f4c2 Shrink max column length.
Required for the updated primary key - the max allowed primary key length is 3072 bytes which isn't enough when there are three VARCHAR(255) columns and each character uses 4 bytes. The max length of the data in these columns so far is also well under 100 characters.
2023-01-06 10:42:21 -06:00
Pentarctagon
e5023e40db Skip inserting rows that would cause a duplicate primary key error.
The cause is that somehow, during regular play, MP campaigns can end up with duplicate values in the [content] data for each [addon]. A very similar issue was fixed in 6c980d12dcd56ccd16ff8b7150cd15ef19f0a821, but there's apparently some other way to trigger it that I haven't been able to reproduce. Since the error itself is harmless, it'll just be avoided server-side to avoid the spurious errors in the server log file.
2023-01-06 10:22:04 -06:00
Steve Cotton
6457ceb206 Checksums: accept 1.16's checksums during replays
This will also accept them during multiplayer matches, but it will still
warn if the unit's stats have changed. When using the new option, the
checksum includes data that has been ignored since 93fe5607a658c74b987.
2023-01-06 16:00:57 +01:00
Steve Cotton
9f780903ab HttT S03: Rewrite intro, hint about training troops for S06
The island gives the player two fronts to progress on, and it's early enough
to give the player time to prepare for the SoE. Hint to them about improving
their recall list.

When trying to add that hint as a single-line change to the dialogue, I
reviewed the existing text and felt it didn't flow well. Reading the feedback
thread, Delfador should have more emotion about finding his childhood home
overrun; however I've gone for practical thoughts first.

The hint isn't #ifdef to only appear on easy, because the text wouldn't flow
without it - take that line out and it goes from "there are more orcs than I
thought" to "we must fight these orcs, who aren't the ones at the SoE". Also,
players who are already doing XP management can feel knowledgeable when they
see it.
2023-01-03 23:32:05 +01:00
Nils Kneuper
0eb6ecb42e updated Italian translation 2023-01-02 12:19:07 +01:00
Nils Kneuper
a086f23a7f updated Turkish translation 2023-01-02 12:18:08 +01:00
Toranks
4a5d1932c7 Fixed texdomain
Weapon specials usually are on wesnoth-help texdomain
2023-01-02 14:06:37 +11:00