81858 Commits

Author SHA1 Message Date
Severin Glöckner
c12f22334e new credit entry 2023-04-15 20:56:39 +02:00
Nils Kneuper
3aa8df3d33 updated French translation 2023-04-15 13:02:19 +02:00
Pentarctagon
8e6df8cd1f Fix incorrect query for selecting new clients by download source.
The old query was:
* Selecting data from 2 months ago instead of 1 month ago for some reason, presumably left over from when I was testing the query out for different time periods.
* Counting non-new players who used a new download source as new players.
2023-04-14 22:32:48 -05:00
Severin Glöckner
f6b6e1e0c8 updated German translation 2023-04-15 03:15:40 +02:00
Severin Glöckner
90df947efe stun: chaneg textdomain
other abilities are in wesnoth-help
the dirdctory containing the files is searched for wesnoth-help
2023-04-15 02:40:17 +02:00
newfrenchy83
b4f93d4748 fix test of presence of attack/second_attacl in filter_attack function 2023-04-13 21:33:44 +02:00
Steve Cotton
e0e8af894e Fix -Wshorten-64-to-32: math.hpp
The last uses of this were removed in 0fbc12ea01986bc97ef6426e0edc89f12224a0d5.

The only uses of the other fixed-point functions from math.hpp are in
src/sdl/utils.cpp. That should probably move to using color.hpp instead,
but this commit is just to solve the -Wshorten-64-to-32 warning.
2023-04-13 13:55:11 +02:00
Eric Gallager
bad664f7e0
Try to fix map diff failure when terrain doesn't have an image associated with it 2023-04-13 10:41:38 +02:00
Severin Glöckner
ef9e289573 merge German translation 2023-04-13 07:34:24 +02:00
Severin Glöckner
1bedcf8bfe change textdomain & image path of mainline merfolk units 2023-04-13 06:10:28 +02:00
Wedge009
d13d3a2ad5 MP Match History: Replace get_rows() with get_item_count()
get_rows() retrieves the information from [row].
Resolves #7489.
2023-04-12 12:42:10 +10:00
Pentarctagon
61b37a746f Correctly handle no game history data existing.
Fixes #7489
2023-04-11 15:32:42 -05:00
newfrenchy83
88439d6427
Fix a bug in [event][filter_attack] when trying to use special_id/type_active to detect a special whose activity is conditional. (#7509)
When we try to trigger an event conditioned by the use of a special whose activity is subject to a condition, we cannot use special_active because the specials are always considered inactive. Additionally, abilities used as weapons possessed or taught by a leadership are also not detectable in [event][filter_attack]. This PR is there to remedy this double problem.

Also remove matches_special_filter and directly use matches_filter.
2023-04-11 19:34:28 +02:00
Steve Cotton
e973cdb489 Temporarily disable Windows CI builds
It's better to disable them that to get in the habit of ignoring the CI fails
from the following two issues; this can be reverted once either is fixed.

glib has a bug where it builds things out of order which results in it failing
to build the dependencies, which fails the build.
https://github.com/microsoft/vcpkg/issues/28722

vcpkg also has a bug where it very often fails to use the cache of the
previously built dependencies even if none of them changed, which then makes it
rebuild all the dependencies again.
https://github.com/microsoft/vcpkg/issues/26601

If the glib bug was fixed, then the errors wouldn't happen since rebuilding the
dependencies wouldn't fail. If the caching bug was fixed, then the errors
wouldn't happen since it'd just reuse the cached dependencies.
2023-04-10 19:30:23 +02:00
Steve Cotton
29749b6af0 Add comments to display and display_context, silence 64-to-32 warnings
The static casts are for -Wshorten-64-to-32 warnings, it would take a
lot of work to fix this in a better way.
2023-04-10 10:47:46 +02:00
Charles Dang
b64e1dd9c6 Display: removed orphaned function declarations
These were refactored out in bef3d1092c1078ed93c7b46d7745e30a2ca15a00
2023-04-10 04:25:13 -04:00
Tahsin Jahin Khalid
13750eebc5
Units/Nibbler: set resistances to be same as level ups (#7517)
Closes #7516
2023-04-10 13:45:35 +08:00
Pentarctagon
08c6d0b30c Fix log rotation.
Previously it was checked whether the logs directory was writable, which needed to get the log directory, which needed to get the userdata directory, which causes the userdata paths to get initialized, which triggered log rotation. This resulted in rotation being triggered before the logging path was set, which resulted in it always being skipped. Now log rotation is done in the logger class after it has been checked whether the logs directory is writable or not.
2023-04-10 00:34:39 -05:00
Wedge009
39deda9a04 Crop dragon unit images to fit the side-bar window. Resolves #7472. 2023-04-10 08:28:10 +07:00
Charles Dang
b94d360886 Removed a stray '#' 2023-04-09 21:04:06 -04:00
Charles Dang
dbc980fc65 Made reports more const-y
Reports should never have side affects. If they do you're doing something wrong.
2023-04-09 21:03:36 -04:00
nemaara
9e34c3c5ab Tutorial: fix achievement description 2023-04-09 12:41:25 -07:00
Pentarctagon
31e23d2d7e Fix -Wshorten-64-to-32: team.hpp
There's not that many hexes on a maximally-sized map, so it's a safe
assumption that this can cast to int.

Commit message by: Octalot
2023-04-08 14:29:29 +02:00
Nils Kneuper
b1cf5a3f27 updated Spanish translation 2023-04-08 12:09:10 +02:00
Nils Kneuper
9ffcacbdc6 updated Czech translation 2023-04-08 09:52:42 +02:00
Nils Kneuper
60798c5401 updated French translation 2023-04-08 09:51:26 +02:00
Nils Kneuper
7b4696fe71 updated Turkish translation 2023-04-08 09:50:22 +02:00
gfgtdf
246a3a5609 add config::find_mandatory_child
unlike find_child which returns an optional, this returns
reference, and throws when no such child is found.

This was intended but forgottten for the
"deploy optional_child" commit.

This fixes some codes that used config::find_child and
relied on the throwing behaviour by catching config::error
2023-04-07 23:14:07 +02:00
Elvish_Hunter
242a9874c8 wesnoth_addon_manager: removed unused --color switch 2023-04-07 22:03:56 +02:00
Steve Cotton
a0e3c8a506 Editor palettes: fix -Wshorten-64-to-32 and improve docs
Use int for measurements of pixels, vs std::size_t for container sizes.

The scroll_bottom() methods were never called, although scroll_top() is
used when switching between subgroups. The logic is scroll_bottom() was
broken; items_start wasn't changed inside the loop, so the loop would
run at most once.
2023-04-07 18:53:26 +02:00
nemaara
c5467c1f4d Remove screen_fade from skip animations 2023-04-06 20:37:05 -07:00
Pentarctagon
d35cf620ab Fix achievement progression only updating after opening and closing wesnoth. 2023-04-06 20:47:22 -05:00
Elvish_Hunter
1d31c674c9 Changelog entry for PR #7512 2023-04-05 20:15:34 +02:00
Elvish_Hunter
9fe4286240 Add support for [effect] apply_to=level 2023-04-05 20:11:09 +02:00
Tahsin Jahin Khalid
df776abad8
Bone Knight: add missing Submerge ability
Units: Add `submerge` ability to Bone Knight and solve RIPLIB
2023-04-06 00:32:13 +08:00
Steve Cotton
60c840bc16 Fix -Wshorten-64-to-32: config.hpp and config.cpp
Use std::size_t instead of unsigned int for container sizes.

There's one place where it still uses signed int, for using a negative index to
access children from the end of the array. Overflow shouldn't be a worry here,
as it would require 2**31 objects to be in the container, implying the container
and children would use at least 32GB even if every child object was empty.

Co-authored by: Pentarctagon
2023-04-05 18:15:11 +02:00
Tahsin Jahin Khalid
cdc451c870 Units: Bone Knight gets submerged
Apparently, Skeleton Rider has it and its advancement does not...what
2023-04-05 20:03:44 +08:00
gfgtdf
c5763af4e3 planning mode: Fix game hanging during enemies attack
Fixes #5302, planning mode now no longer tries to set the
defendings unit animation to "standing" during an attack when
there were planned moves for the defender.
2023-04-03 20:56:39 +02:00
gfgtdf
9de3ae1db9 Fix crash on unit animations #5032
I don't really know how this code supposed to code work, i just
added a guard against possible UB there.
2023-04-03 20:56:18 +02:00
gfgtdf
2efe6e1b25 Fix assertion on invalid replay data
Fixes #2818
Fixes #4180
2023-04-03 20:55:39 +02:00
gfgtdf
409cef794b Replace some if (false) wtih better code.
Trying to recover what the intention was here.
2023-04-03 18:49:13 +02:00
Pentarctagon
e00be80394 Whitespace fixup. 2023-04-02 21:40:21 -05:00
gfgtdf
a71892e509 Fix bad allow_undo in UtbS
The event changed the gamestate by adding an event
that changes the gamestate. We now use variables to instead of
nested events events since that is easier to handle in
[on_undo], which allows us to use [allow_undo] here.
2023-04-03 03:26:10 +02:00
gfgtdf
9804935cad wc: mapgen: move total_tiles to scenario_data 2023-04-03 03:26:10 +02:00
gfgtdf
c75fa8b4cb wc: mapgen: move get_scenario_data to seperate function
it was just a one liner but a rather complicated one
2023-04-03 03:26:10 +02:00
gfgtdf
cf19f4f686 wc: mapgen: document set_terrain function 2023-04-03 03:26:10 +02:00
gfgtdf
f963dc80bd remove unused code in src/persist_var.cpp 2023-04-03 02:29:15 +02:00
gfgtdf
3bba135510 Fix game not autosaving on turn 1 2023-04-03 00:40:55 +02:00
gfgtdf
f8bd32eb15 Deploy and refactor config::optional_child
Previously the config class had an operator bool and
it was a common pattern to use if(const config& = cfg.child(..)).
While this pattern was nice to use. It has severe drawbacks, in
particular it was unclear whether a function that took a config&
parameter allowed "invalid" configs, while most functions
did not, there were some that did. Furtheremore it lead to a few
buggy codes that were unconvered by this change (Not fixed though!),
in particular codes that tested local config objects that were
not references to being invalid, which could never be the case.
This commits replaces those with just `true` in order to not
change behaviour.

Some obvious cases were also removed including for example
things like `assert(config());` There is ony case in the ai code
that i'm not 100% sure of where one implementation of a virtual
function checked for an invalid config and another one that didn't.

With this, all code that check for a config child to be
present now uses config::optional_child which returns an object
that behaves similar to optional<(const) config&>, so it throws
on invalid dereferencing. But it also has operator[string] for
convinience, in particular to make is similary
easy to use the the previous `if (config& = .. child())`.
Also it has a tool DEBUG_CONFIG which tests whether all
optional_config values are checked before they are derefereneced.

Another method manditory_child was
added that throws when the key is not found, which replaces all
occurances of child() that did not check whether the result was
valid. This was neccecary (this= adding a new method instead of
renaming .child) to keep track of converted changes, and be sure
no occurances of child() were accidentally changed to the
throwing version.

We might want to rename one of mandatory_child or optional_child
to just child later. Not sure which one yet. I think it's better
to keep it in the current state (no config::child() ) for a while
though, so that people that currently used child() in their open
prs or other work get an error and not wrongly rely on the previous
behviour of config::child.

The interface of vconfig was not changed in this commit.
2023-04-03 00:39:12 +02:00
gfgtdf
231f9ea905 Move check for deprecated wml code in seperate function 2023-04-03 00:39:12 +02:00