84739 Commits

Author SHA1 Message Date
newfrenchy83
0dce4e4731
Have [filter_attack/weapon]type= pick the type which does more damage (#8936)
resolve [filter_attack/weapon]type= can check both type when it wait only effective type.

* add 'base_type' filter for detect original type of attack reagrdless of [damage_type] modifications

if for some reason the original type must be filtered instead of effective type, this attribute is here for that.

* add effective_type in formulas
2025-02-01 10:36:55 -06:00
Gunter Labes
2c0a1cdaa7
Do not require the appdata path to exist 2025-02-01 17:06:42 +01:00
Gunter Labes
064caa681e
Use just the commit hash in the branch name and add proper version info 2025-02-01 15:10:13 +01:00
Nils Kneuper
4f640801e3 updated Hungarian translation 2025-02-01 14:14:47 +01:00
Tahsin Jahin Khalid
e3d7407058
[SotBE] S10: refine objectives flow (#9817)
* SotBE: S10: refine objectives flow

* S10: fix typographic errors

---------

Co-authored-by: Tahsin Jahin Khalid <5283677+knyghtmare@users.noreply.github.com>
2025-02-01 18:18:49 +06:00
Tahsin Jahin Khalid
f9643c6849
SotBE: refine map for S16 (#9824)
nothing related to scenario balance has changed. Purely aesthetic refinements.

Co-authored-by: Tahsin Jahin Khalid <5283677+knyghtmare@users.noreply.github.com>
2025-02-01 16:01:09 +06:00
Subhraman Sarkar
adc95a06cd tests: call set_main_thread 2025-01-31 07:35:10 +05:30
Subhraman Sarkar
814553229d charconv fixes
without these changes, wesnoth will not compile if USE_FALLBACK_CHARCONV is defined.
also typofixed assert.
2025-01-30 22:07:04 +05:30
Subhraman Sarkar
c9b54a5eda events: set main thread in main() 2025-01-30 22:06:48 +05:30
Gunter Labes
e7da2b621a
Add optional date argument 2025-01-30 11:22:58 +01:00
Gunter Labes
9bd6b47036
Improve error wording 2025-01-30 10:47:25 +01:00
Gunter Labes
ae0b3ec149
Error out if a comment could not be generated 2025-01-29 11:12:10 +01:00
Tahsin Jahin Khalid
f621574524
SotBE S7: update map (#9812)
* SotBE S7: update map

* SotBE S7: slightly tone down map refinements

---------

Co-authored-by: Tahsin Jahin Khalid <5283677+knyghtmare@users.noreply.github.com>
2025-01-29 13:59:21 +06:00
Subhraman Sarkar
f43cb9b451 advanced prefs: clear list everytime advanced prefs are reloaded. (#9581) 2025-01-28 22:35:49 +01:00
Toom
eb4312ffb8
Convert hex to new format, closes #9799 (#9801) 2025-01-28 12:47:08 -06:00
Subhraman Sarkar
7d01f994e8 types: readd include to gettext 2025-01-28 18:57:34 +05:30
Subhraman Sarkar
eebefcf72a race, types: fix inconsistent & placement and minor cleanup 2025-01-28 18:08:17 +05:30
Gunter Labes
c3248c8564
Enable building wesnothd and campaignd 2025-01-28 09:22:31 +01:00
Gunter Labes
fa238045b1
Remove unnecessary template and optional use 2025-01-28 09:22:31 +01:00
Yoruma
bb07f533ed
Fix invalid WFL crashes Wesnoth (#9437)
Handle case of unquesionably empty expression between brackets & Catch error when evaluating formula

Fix #9249
2025-01-27 21:24:17 -05:00
newfrenchy83
e092acb30f
Do not truncate ability value calculation
Use the floating point ability/weapon special value in damage calculation. Change some more internal calculations from truncation to rounding.

Fixes #9467.
2025-01-28 00:02:40 +01:00
Tahsin Jahin Khalid
7c503054c9
SotBE: S13: refine map (#9808)
* SotBE: S13: refine map
2025-01-27 22:42:51 +06:00
newfrenchy83
3421fe81bf revert Unit/Type: drop bar_scaling keys as well
revert fc8e8eb09e (diff-dc56bda7f509dc7a0a91fbd69d289b59257ae33e16556cff72e86598172f788f) because scaling keys used in TSG and TDG
2025-01-27 11:16:42 -05:00
Charles Dang
0ffc4d4c6f Display: remove unnecessary capture 2025-01-26 22:36:57 -05:00
Charles Dang
fc8e8eb09e Unit/Type: drop bar_scaling keys as well
As suggested by soliton in #9806
2025-01-26 22:36:17 -05:00
Gunter Labes
4092f01988
Remove duplicate textdomain declarations 2025-01-26 22:24:18 +01:00
Severin Glöckner
fe091b967b credits for German translation
[ci skip]
2025-01-26 21:25:38 +01:00
Charles Dang
428f77f624 Unit: remove bar scaling overrides
See #7292, closes #2913. Apparently, this has never worked, and based on discussion in #7292, it's not even particularly useful. Plus, since it was removed from the schema two years ago, has been functionally deprecated since then.

The keys in unit_type remain untouched.
2025-01-26 15:19:09 -05:00
Celtic Minstrel
88db38a406 Fix [message] with two images.
Fix #8770
2025-01-26 15:17:30 -05:00
Charles Dang
3cf56d8ff1 entity_location: better validity check in get_unit (resolves #9803) 2025-01-26 12:41:04 -05:00
Nils Kneuper
95a0024bfb updated British English translation 2025-01-26 12:24:39 +01:00
Nils Kneuper
98bac658e2 remove old rule which makes a string in TSG now fuzzy 2025-01-26 12:23:00 +01:00
Nils Kneuper
c858d41e4c updated Bengali translation 2025-01-26 12:18:33 +01:00
Dalas121
c7d3db402e
TDG S00, fix side 1 having no save_id
a1dd77a fixed Delfador's unset disable_stronger_amlas variable, but inadvertently broken the campaign due to an unset save_id for side 1. By placing Delfador inside [leader] instead, we resolve both issues.
2025-01-25 16:27:12 -06:00
Toom
aa379157c9 Fix parameter name re #9799 2025-01-25 21:52:51 +01:00
Dalas121
a1dd77ad77
TDG S00, fix AMLAs applying to Delfador 2025-01-25 10:35:46 -06:00
JJ Marr
38b3a3b7ba Remove config::append_children(config&& cfg)
Move semantics imply that an r-value parameter is no longer useful once
it is passed into a function. However, this function is used as a helper
function that only partially moves from cfg, so that the rest of cfg
can be reused by the caller.

I don't believe this is a good mechanism for a function call. This
overload is only used in one place: append(config&& cfg), so this commit
moves the relevant logic there. This ensures there's no re-use of a
moved-from object.

Splitting this out separately since it's a special case and API change.
2025-01-25 08:58:45 -05:00
JJ Marr
7ddd4ff02e Allow partial moving
The official C++ core guidelines policy is you must move rvalues.

This is inflexible in practice in the Wesnoth codebase.
2025-01-25 08:58:45 -05:00
JJ Marr
0b46bd3044 Enable performance-no-automatic-move
Variables can be automatically moved when a function returns. However,
declaring a variable as const prevents that move from occuring (as the
move modifies the moved-from variable).
2025-01-25 08:58:45 -05:00
JJ Marr
15acd0c00a Lint for performance-move-constructor-init
This checks when a move constructor for an object copy constructs its
member classes or parent classes. Copying unnecessary as all of the
members of the moved-from object can be clobbered by the move.
2025-01-25 08:58:45 -05:00
JJ Marr
259160e1e4 Lint for performance-move-const-arg
These are cases in which something is std::moved and no move actually
occurs.
2025-01-25 08:58:45 -05:00
JJ Marr
c34d689726 Warn against not moving rvalue parameter
If a function takes in an rvalue, it's taking ownership of the object
that's being moved into it. If the object never moves that rvalue param,
then there was no point to moving it into the function.

As an example of a problem this catches, in context_manager.cpp,
replace_map_context_with took in an rvalue unique_ptr "mc" to a map
context. The function then swapped it with a given value in
map_contexts_. This swap was unnecessary because "mc" expired after the
function call was complete. It is more optimal to std::move(mc) into
the value in map_context_ that we were previously swapping with.
2025-01-25 08:58:45 -05:00
JJ Marr
fc1ac27b48 Enable bugprone-move-forwarding reference
A forwarding reference is one of the form (note the template parameter):

    template<class X>
    void foo( X&& x );

The difference between this and a regular rvalue reference (where X is
not a template) is that foo() also accept lvalues. So it is possible to
call:

    std::string s = "Example";
    foo(s)

And if the body of foo(X&& x) std::moves x, then s will be invalidated.

This check warns on usage of std::move in this context and recommends
std::forward, which automatically determines whether to std::move
depending on whether foo() is called with an rvalue or an lvalue.
2025-01-25 08:58:45 -05:00
JJ Marr
af82672ca9 Add bugprone-use-after-move
It's generally bad practice to use something after it's been std::moved
from.
2025-01-25 08:58:45 -05:00
Dalas121
121196eb70
TSG: Improve Translatability (#9797)
Some po hints and string changes to make TSG more translatable, as requested by @celerini in #9682.
2025-01-25 07:24:06 -06:00
Nils Kneuper
842b91661c updated British English translation 2025-01-24 23:56:37 +01:00
Toom
870951248f
Expose [fire_event][data] values to WML variable $data 2025-01-24 21:57:06 +01:00
Steve Cotton
84a05d2269 For translation stats, TSG is now the tutorial
For working out which languages have 80% of core translated, TSG is
now relevant and the old tutorial isn't. This means that the 80%
threshold has increased by around 500 strings.

Add missing changelog entries for 1.19.8 directly to the changelog.
2025-01-24 16:43:08 +01:00
Thewodoros
6ff26aad31 Make frostbite affect wild ogres when sighted
This way it's less obvious that they were not affected before being
sighted.
2025-01-23 19:01:05 -06:00
Thewodoros
24df7aaa8e Simplify ogres sighted events
This also creates a variable which we'll use for the frostbite event.
2025-01-23 19:01:05 -06:00