Commit graph

84096 commits

Author SHA1 Message Date
Charles Dang
698bc98ff2 Avoid brace init for visitor classes
Doesn't play nice with boost::static_visitor for c++20...
2024-07-30 21:03:43 -04:00
Charles Dang
d77700f2f2 Use feature check for parenthesized aggregate initialization 2024-07-30 21:03:43 -04:00
Charles Dang
bd819ced00 MP/Connect: move user_defined implementation out of header 2024-07-30 21:03:43 -04:00
Charles Dang
387fa7458e Terrain/Builder: cleanup various struct ctors and use inline initialization
This avoids issues when building with Clang in C++20 mode. It seems in C++20 (possibly as a
result of vector gaining constexpr functionality), the rule about not referencing incomplete
types in a vector is now more strictly enforced.

See also https://www.lukas-barth.net/blog/cpp20-vector-incomplete/
2024-07-30 21:03:43 -04:00
Charles Dang
a4fa20a331 Schema: delete empty dtors in parser and wml_tag 2024-07-30 21:03:43 -04:00
Charles Dang
221b17b9f6 Schema/Tag: clean up constructors, use inline initialization 2024-07-30 21:03:43 -04:00
Charles Dang
712e66f9ef Display Context: move has_team implementation out of header 2024-07-30 21:03:43 -04:00
Charles Dang
a2e50f56c4 WFL: move variant_list ctor implementation out of header 2024-07-30 21:03:43 -04:00
Charles Dang
764c50f21a Color Range: take span to const color_t 2024-07-30 21:03:43 -04:00
Pentarctagon
3cef48fe38
damage ability tests (#9137) 2024-07-30 19:06:38 -05:00
white-haired-uncle
d74b4061fa
improve tooltip placement on sidebar (#8908) 2024-07-30 17:27:27 -05:00
Subhraman Sarkar
64caa4acda
Allow quick reload of gui2 themes (#9117)
* New "Apply" button in preferences dialog that is used to quickly apply the GUI2 theme, no restart needed.
* gui initialization reorganized a bit. gui2::init() now responsible for reading themes from file only. Actual theme switching and activation done by gui2::switch_theme(). preferences dependency removed from gui and moved to caller of gui2::init(). gui2 tests updated accordingly.
2024-07-30 07:59:54 +05:30
pentarctagon
40cca745d0 fix indentation in changelog 2024-07-29 12:55:12 -05:00
Toom
cd5f878eba fix WRN_NG level 2024-07-29 10:50:57 +10:00
Gunter Labes
1f6c935fe1
Declare locally used function static 2024-07-28 22:10:09 +02:00
Pentarctagon
5c3188581b
update CI to Ubuntu 24.04 (#9139) 2024-07-28 13:07:59 -05:00
Gunter Labes
d8f2df16aa
Document translations target 2024-07-28 17:59:28 +02:00
Nils Kneuper
8961008dc1 updated British English translation 2024-07-27 13:38:31 +02:00
Nils Kneuper
c66701cb35 updated Chinese (Simplified) translation 2024-07-27 13:36:55 +02:00
Nils Kneuper
35451c0683 updated Bengali translation 2024-07-27 13:14:15 +02:00
pentarctagon
8a377e58b2 add database setup commands as well 2024-07-26 20:04:40 -05:00
Subhraman Sarkar
ebe4ee9d09
open load map/save map as dialog in correct folders (#9129)
Opens load map/save map as dialogs in the addon's map directory if an addon is selected.
With no addon selected they open in the editor/maps directory.
2024-07-25 14:35:22 +05:30
Subhraman Sarkar
d47466dfc0
titlescreen: make drop cap algorithm utf8 aware (#9122)
* make drop caps utf8 aware and use locale's script font

1. Uses utf8::insert to modify the string so that it works for non-ASCII characters.
2. Use the locale's script font from data/hardwired/fonts.cfg instead of using Oldania always.

* make the algorithm work for multiple start tags in the tip text

* update condition to prevent throwing exception and don't use utf8::size

* adds comment that the tags do not have multibyte characters
2024-07-25 08:40:30 +05:30
gfgtdf
6cb9cbeca8 add .lua files to .editorconfig
we currently use the same indentation style for  lua as for cpp files
2024-07-24 16:04:27 +02:00
Celtic Minstrel
7f3378d00c Use boost::optional only on MacOS and remove has_optional_value 2024-07-23 13:49:16 -04:00
Celtic Minstrel
2679fec5f2 Add utils/optional_fwd to the Xcode project 2024-07-23 09:29:45 -04:00
Celtic Minstrel
f6ae8ab850 Mass replace all std::optional with utils::optional
Also import bad_optional_access into the utils namespace so we can catch the exception when we need to
2024-07-23 09:29:20 -04:00
Celtic Minstrel
ffde1cb21c Use utils::optional instead of std::optional in filesystem 2024-07-23 09:05:53 -04:00
Celtic Minstrel
62d9ebecc2 Revert "Used std::optional directly since we support C++17 now"
This reverts commit 4d54b2a7fd.
2024-07-23 09:03:13 -04:00
Celtic Minstrel
740aadb273 Revert "utils::optional -> std::optional for 8058dab"
This reverts commit 255fc0d450.
2024-07-23 08:47:35 -04:00
Celtic Minstrel
c89c1b4b4a Revert "Revert "color_t: make macOS happy""
This reverts commit 5a77ff92c6.
2024-07-23 08:25:02 -04:00
Celtic Minstrel
ac431ca9dd Revert "Remove macOS compat path for std::variant and std::any"
This reverts commit c2decdfb58.
2024-07-23 08:23:38 -04:00
Oleksii
b372f9e9ae
DM: S18 recall fix (#9118)
* DM S18 recall fix

* Update 18_The_Portal_of_Doom.cfg

* Update sides.cfg
2024-07-23 15:38:58 +10:00
Gunter Labes
e8e078f968
Print locale error message 2024-07-23 07:33:36 +02:00
pentarctagon
aba0abeb79 1.19.2+dev 2024-07-21 22:40:10 -05:00
pentarctagon
7cf3a8d853 1.19.2 2024-07-21 22:38:25 -05:00
pentarctagon
a57ba21c82 pot-update and regenerate doc files 2024-07-21 22:37:29 -05:00
pentarctagon
6b7d8c5a8d changelog_entries 2024-07-21 22:30:40 -05:00
Celtic Minstrel
a9948d3fff [Lua.MapGen] Accept both comma-separated lists and arrays for f.adjacent 2024-07-21 19:58:03 -04:00
Celtic Minstrel
19f3682bdf [Lua.Mapgen] Add a few more ways to pass a location set to f.find_in
These may be less efficient in some cases, and there's even a couple of degenerate cases, but it's definitely easier to use like this.

This also adds an example of the original method, using a string to reference a separate list.
2024-07-21 19:58:03 -04:00
Celtic Minstrel
4c4b30aaac Fix typo in type name 2024-07-21 19:58:03 -04:00
Celtic Minstrel
a72ec39f79 [Lua] Make f.is_loc work either with a location object or with separate x,y parameters 2024-07-21 19:58:03 -04:00
Celtic Minstrel
e92ee5cb1b [LuaDoc] Document that mapgen wesnoth.map.find[_in_radius] can take a uncompiled filter table.
Also note the split-location, single location, and list overloads for find_in_radius's center and find's in_list.
2024-07-21 19:58:03 -04:00
Celtic Minstrel
c2a19316a4 [Lua.MapGen] wesnoth.map.find[_in_radius] already accepted either a single location or a list of locations for their in_list and center params, respectively.
find_in_radius accepted the single location as two separate integer paramters, while find did not. This corrects that inconsistency.
2024-07-21 19:58:03 -04:00
Celtic Minstrel
17eccf1a74 [Lua.MapGen] Allow find_in_radius to take an uncompiled filter table, just like find can.
It seems VERY wrong for it to work in one function and not in the other.
2024-07-21 19:58:03 -04:00
Celtic Minstrel
f1fcaad540 [Lua.MapGen] Const-correctness for the filter match function 2024-07-21 19:58:03 -04:00
Celtic Minstrel
95bfd07286 [Lua.MapGen] Exposed previously-unused wesnoth.map.filter_tags.onborder filter since it seems useful 2024-07-21 19:58:03 -04:00
Celtic Minstrel
ab008161f1 [Lua.MapGen] Add wesnoth.map.filter_tags.formula that takes a WFL formula to match against locations 2024-07-21 19:58:03 -04:00
Celtic Minstrel
5ed7f63ede [Lua.MapGen] Formula map filters now support taking precompiled formulas instead of a formula string. 2024-07-21 19:58:03 -04:00
Toom
f22f13f850
Implement nonzero attack_weight, closes #3923 (#9096) 2024-07-21 17:51:17 -05:00