Commit graph

84085 commits

Author SHA1 Message Date
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
gfgtdf
ebaafe6d6b Fix commom OOS error #8960
Previously `synced_context::undo_blocked()` sometimes returned the worng result, leading to OOS because `synced_context::undo_blocked()` was used to determine whether we can send action to the other clients.

With this patch `synced_context::undo_blocked()` not doesn't always return true  when its called during "local choices".

I am curently not even sure whether that line is needed at all since using the rng should always set is_simultaneous_ to true.
2024-07-21 17:49:10 -05:00
Toom
dbbee82d9c validate [screen_fade] required parameters 2024-07-21 17:48:45 -05:00
Pentarctagon
124cf1ccf0
chance_to_hit tests (#9093) 2024-07-21 17:30:37 -05:00
Pentarctagon
f1a236ae24
Move command line processing before logger initialization (#9116)
Log files goes in the userdata folder so they therefore need the userdata to be initialized before that.

Fixes #9111
2024-07-21 17:28:54 -05:00
Steve Cotton
302d78edc5 Reserve the name "_bug" for tests of behavior that should change
Even tests that don't have "_bug" in the name shouldn't prevent
intentional changes to behavior, I've added a paragraph about that.

Rewrite the non-reservation of "break" and "error" for clarity.
2024-07-20 11:19:51 +02:00
Celtic Minstrel
c96196cd4d [Lua] Use game_events.add for feeding instead of add_repeating 2024-07-20 11:09:33 +02:00
Dalas121
c6e8dc5bcd
EI: minor assorted unit stat and item tweaks (#9103)
* Eastern Invasion
     * fixed Gweddry having the wrong HP values
     * fixed the king being neutral instead of lawful
     * fixed "Dark Shape" being neutral instead of chaotic
     * the king can no longer wield the plague staff
     * the king and generals can no longer recall undead veterans
2024-07-19 20:30:07 -05:00
Dalas121
71dfdab2eb
EI: changelog entry for backported changes
(in the future I'll do these as part of the main PRs)
2024-07-19 20:29:28 -05:00
Dalas121
cc07e62221
EI S12: fix Dra-Nak having inconsistent traits and portrait (#9113)
In EI S11, the player encounters an orcish warlord named Dra-Nak. If not killed in S11, he continues pursuing the player in S12, but the current S12 gives him different traits and a different portrait. This PR fixes the issue.
2024-07-19 19:25:37 -05:00
Dalas121
5881045c50
EI S17b: fix buggy dynamic recruit list macro (#9105)
EI's S17b has a gold refund mechanic, allowing enemies to build up large gold reserves in certain situations.

When gold gets high, enemies are supposed to start recruiting higher-level units so they can spend it faster. The former implementation had some inconsistent issues; this should restore the intended behavior.
2024-07-19 19:17:41 -05:00
Dalas121
76f3207c3b
EI S04c: only award achievement if all prisoners escape (#9108)
EI's S04c has an achievement for rescuing all 6 prisoners. This achievement currently triggers even if prisoners die before escaping the scenario.
2024-07-19 19:17:08 -05:00