78349 Commits

Author SHA1 Message Date
Charles Dang
693d5ba190 Added utils::variant_index 2021-01-19 16:40:59 +11:00
Charles Dang
25bebba84f Actions/Advancement: used utils::visit for this
Necessary, no, but I was having a little fun. :P
2021-01-19 15:02:01 +11:00
Charles Dang
6f5fab5f8d Added utils::decayed_is_same 2021-01-19 15:01:56 +11:00
Charles Dang
f6a99b5f14 Cleaned up utils/general.hpp includes 2021-01-19 15:01:50 +11:00
mattsc
0905ee1fe7 Fast Micro AI: fix variable name
This wouldn't have been an issue, if there weren't also a local variable of the same name in the evaluation function. The way it was though, it caused an error when trying to execute an attack by the AI leader.
2021-01-18 19:29:55 -08:00
Charles Dang
ee28ac0e26
Unit: converted upkeep handling to std::variant (#5459)
Since MacOS doesn't properly support std::variant (it has problems with std::visit specifically) unless it targets MacOS 10.14 or later, this adds a wrapper class that uses std::variant and friends on all platforms except MacOS, where boost::variant is used. The USING_BOOST_VARIANT define is then defined on MacOS and should be used to guard for code (such as inheriting from boost::static_visitor) that isn't needed with std::variant.

unit::upkeep_parser_visitor is still unconditionally boost::variant-compatible since it's used by const_attribute_value::apply_visitor, and configs still use boost::variant under the hood.

Additionally, these visitors are used in multiple places, so I can't convert them to lambas in-class.

Finally, I used brace-init for the upkeep types and visitors to make it clearer these are not functions.

As for the static_cast changes, for some reason mingw had issues converting double or long long int to the upkeep variant (which keeps an int specifically). No idea why it had no problem dealing with this with boost::variant.
2021-01-19 14:24:05 +11:00
Severin Glöckner
b10e061b24 Systemd Unit File: fix typo
The define is FIFODIR, but for cmake it's called FIFO_DIR
2021-01-19 01:59:04 +01:00
Iris Morelle
69970e6852 Fix a dumb typo 2021-01-18 18:47:49 -03:00
Andrey Bienkowski
1f374dd0a7 HTTT: don't change unit id
05b_Isle_of_the_Damned was using black magic: [store_unit] plus [set_variable] to change a unit's id. This confused wmllint. This is also just unnecessarily complicated since there are two more conventional ways to refer to the same unit: role=Advisor and id=$hidden_advisor.id
2021-01-18 21:18:15 +01:00
Andrey Bienkowski
579cec4139 Fix wmllint error: no textdomain string 2021-01-18 13:58:04 -06:00
Andrey Bienkowski
26ac543d71 [wmllint] DiD: suppress: Inky speaks in his/her "die" event rather than "last breath"
It is a common mistake to have a unit speak in his/her "die" event (after the death animation is played). Wmllint tries to catch that. In this case, however, Inky does not actually die (as far as the plot is concerned) so it is a perfectly
valid stylistic choice for her to make a "Bloub" sound as she dives into the water.
2021-01-18 13:57:56 -06:00
Andrey Bienkowski
67ea5b5eed DiD: Explain the Inky encounter logic 2021-01-18 13:57:56 -06:00
Andrey Bienkowski
b155192fb3 DiD: add wmllint: recognize Jaime 2021-01-18 13:57:27 -06:00
Andrey Bienkowski
208bf55c86 Use wmllint: recognize instead of blanket ignore 2021-01-18 13:57:02 -06:00
Severin Glöckner
37dfcad927 Hide warnings from GCC if compiling with LTO
This adds the change from d643edc (in scons) and 941433e (in cmake) to the linking step as well, but only when using LTO

closes  #5350
2021-01-18 13:53:05 -06:00
Gunter Labes
24d3872b3d
Fix pango markup error 2021-01-18 15:47:53 +01:00
Steve Cotton
8bff60f441 Run wmlindent on DiD's scenarios 2021-01-18 14:08:29 +01:00
Andrey Bienkowski
b9d64a63e5 Add wmllint: display on/off around multiline messsages 2021-01-18 01:09:07 -06:00
Andrey Bienkowski
92ecc63962 Silence a wmllint false positive 2021-01-18 01:09:07 -06:00
Pentarctagon
3ddb5ce313
Fix macro arguments. 2021-01-18 00:57:49 -06:00
Pentarctagon
74d914f45f Convert relevant cases of lexical_cast to std::to_string().
In general I think it's best to use std implementations unless there's a functional or performance reason not to, but also in a few cases this also allows removing the include of lexical_cast.hpp.
2021-01-18 00:51:41 -06:00
nemaara
92ccc9ae5b
Merge pull request #5457 from hexagonrecursion/DiD-plus-exp
DiD: refactor scripted experience gain
2021-01-18 00:22:47 -05:00
Charles Dang
b54ce01134 Deployed structured bindings
This doesn't touch cases where `std::tie` was used with `std::ignore`, since there isn't a way to
ignore a variable in structured bindings and choosing a random variable name might trigger unused
variable warnings on CI (will have to confirm that, though).
2021-01-18 09:43:59 +11:00
Charles Dang
3bea67efc6 Quit Confirmation: defined static variable inline 2021-01-18 09:43:05 +11:00
Andrey Bienkowski
30fb6a7d96 DiD: refactor scripted experience gain
My primary motivation was internationalization: with one added string we can translate all these messages.
2021-01-17 19:57:05 +03:00
Martin Hrubý (hrubymar10)
f91f02b4fd
Fix Xcode project 2021-01-17 12:14:39 +01:00
Martin Hrubý (hrubymar10)
22dc527294
Use new automatic signing in Xcode project 2021-01-17 11:58:26 +01:00
newfrenchy83
6f85e689e6
Update codeblock for recent changes (#5455)
* update codeblock for recent changes

* update codeblock test for recent changes

* Update wesnothd.cbp

* Update wesnothd.cbp

* update scons codeblock
2021-01-17 21:45:31 +11:00
Charles Dang
f3f6a15d90 Units/Frame: cleaned up some redundant logic
These are already set to indeterminate initially in the initializer list.
2021-01-17 21:29:37 +11:00
Charles Dang
248eab0267 Fixup efa330a35c04bada6ae65a522597eaf144356e98 2021-01-17 21:29:15 +11:00
Charles Dang
b2e22b8aed Reapply d0100758f855ec0d8f30dff41e8a8b6ff2d45fda 2021-01-17 21:28:47 +11:00
Charles Dang
ddf1ed9f0a Upgrade to Lua 5.3.6
Resolves #5452. There were no official patches to apply.
2021-01-17 21:28:47 +11:00
Charles Dang
040a52ce25 Cleaned up some SDL includes 2021-01-17 18:01:38 +11:00
Severin Glöckner
deeb7460d7 Move changelog entry for Isar’s
from 1.15.8 to 1.15.9
2021-01-17 06:38:31 +01:00
Severin Glöckner
efa330a35c NR S12: move dialogue from victory event
It's not shown with :n then
2021-01-17 06:35:49 +01:00
Severin Glöckner
deb007f1b1 NR S13: use new code features
Using location_id (which accepts multiple values sice 1.15.0)
and the new macros for handling overlays and ellipses.

Side effect: the now-leaders won't have the loyal trait anmore
2021-01-17 06:35:49 +01:00
Severin Glöckner
2d94d90449 NR S13: use Sisal as fallback for Eryssa
The situation of having her but not Eryssa is new.
2021-01-17 06:35:49 +01:00
Severin Glöckner
c5bc4e9c3f NR S12+S13: let Eryssa die
She's not needed anymore.
2021-01-17 06:35:49 +01:00
Severin Glöckner
7733e55077 NR S10: Fix side 7 objectives
closes #5373
2021-01-17 06:35:49 +01:00
Severin Glöckner
4846a08c5f NR: Krash's side is always orange 2021-01-17 06:35:49 +01:00
Charles Dang
1f7d6239da Make scons happy while I work on this dialog 2021-01-17 16:14:10 +11:00
Charles Dang
f323deb23e Don't use optional::value since MacOS < 10.14 doesn't like it 2021-01-17 12:25:10 +11:00
Charles Dang
f8bf44ecf0 Updated changelog 2021-01-17 11:48:24 +11:00
Charles Dang
8037076e5d Synced Context: defined static members inline 2021-01-17 11:48:23 +11:00
Charles Dang
3176c7a5a5 Used inline variables for metaprogramming constants 2021-01-17 11:48:22 +11:00
Charles Dang
6d155ced61 Updated VS projectfiles for recent changes
- Adding the Match History viewer
- Removing utils/optional_fwd.hpp
- Adding the wesnothd game history query handling
2021-01-17 11:48:22 +11:00
Charles Dang
e3f8b68796 Added basic dialog definitions for the Match History viewer 2021-01-17 11:48:21 +11:00
Charles Dang
3ff0b7f081 Added a HAVE_CXX20 define 2021-01-17 11:48:17 +11:00
Charles Dang
bb49aa8397 Used [[maybe_unused]] directly 2021-01-17 11:48:16 +11:00
Charles Dang
c35a73f5f1 Used std::clamp directly 2021-01-17 11:48:15 +11:00