Commit graph

84072 commits

Author SHA1 Message Date
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
Dalas121
f07b6ecbad
EI S99: prevent prisoner income if prisons are captured (#9112)
In EI's S99, you gain gold from defeating and capturing hostile drakes.  The drakes are physically moved to prison cells in the middle of the map.

Previously, the player could continue capturing drakes even if the prison cells were captured by enemies. This made it a strong strategy to abandon the center and turtle up in a corner of the map. Additionally, the prison cells stayed locked with prisoners inside.

This PR fixes this issue. This also adds 2 new strings; I'm planning to backport to 1.18.2, as this is arguably a bugfix.
2024-07-19 19:16:57 -05:00
Dalas121
fce2127c92
EI S11, S99: prevent backdoor entrance into prison cells (#9114)
EI's S11 and S99 have prison cells, one of which has an unintended backdoor entrance via an unwalkable deep water river. Flying units are involved in these scenarios, and can possibly fly into the cells through this unintended backdoor.

This PR changes the map hexes from unwalkable to impassable.
2024-07-19 19:16:13 -05:00
Charles Dang
8f26d5ede7 MP/Faction Select: fix help page handling (fixes #9102) 2024-07-18 10:02:42 -04:00
Charles Dang
e45b46107e
FS: use optional<string> to represent non-existent paths (#9107) 2024-07-18 09:58:55 -04:00
pentarctagon
4f40c9deb5 Move assert into filesystem::get_user_data_path()
As discussed previously in https://github.com/wesnoth/wesnoth/pull/9016#discussion_r1650036348
2024-07-17 17:50:03 -05:00
Oleksii
2704adf70d
LoW bigmap localization fix and folder regroup (#9101) 2024-07-17 18:48:40 -04:00
Tahsin Jahin Khalid
02f9c2186c
WC: delete no longer needed todo.txt file (#9099)
* WC: delete no longer needed todo.txt file
2024-07-17 19:29:28 +06:00
Oleksii
0f188acc9f Ukrainian maps for did,ei,low,l,sof,thot,tsg,tb 2024-07-17 08:38:22 +10:00
Oleksii
b254452c58 Update copyrights.csv 2024-07-17 08:38:22 +10:00
Oleksii
61c40732b6 uk maps for trow, nr and dw 2024-07-17 08:38:22 +10:00
Oleksii
313e83f58e l10n: Add Ukrainian Logo 2024-07-17 08:38:22 +10:00
gfgtdf
abb79ab055
wc: fix #9012 error when deserter list is empty (#9094)
we no longer show the deserter option if no deserters are avilable
2024-07-16 22:31:57 +02:00
Subhraman Sarkar
2660c0e086 new ui theme: modern (titlescreen only atm)
Design idea and concept art: Dalas
Implementation: babaissarkar

Co-authored-by: Dalas121 <33790750+Dalas121@users.noreply.github.com>
2024-07-16 13:07:57 +05:30