Compare commits

...
Sign in to create a new pull request.

1462 commits

Author SHA1 Message Date
Charles Dang
2bbcd5f814 Clean up and expand ranges compat layer 2024-12-26 22:11:34 -05:00
Charles Dang
6d97ac494e GUI2/Dispatcher: remove connect_signal_on_draw
We no longer use the GUI2 draw events. We should implement the appropriate interface provided by top_level_drawable instead. DRAW is still a valid event for now, but would probably be removed in the future.
2024-12-26 16:27:11 -05:00
gfgtdf
5b63155a23
Update changelog.md 2024-12-26 20:25:48 +01:00
gfgtdf
392b8dc9fb
Use [leader] in the c++ code (#9660)
Added code to convert all  `[side]type=` to `[side][leader]` when the `[scenario]` is read, and the rest of the engine code to only work with [leader], this should fix all possible problems with `[leader]` and also simplify the code a bit

Fixes #7985
Fixes #3742
2024-12-26 20:22:09 +01:00
Subhraman Sarkar
ec0e0992b6 help topic generator: fix typo
also make the help browser a bit wider, otherwise images overlap with text
2024-12-26 12:21:09 +05:30
Wedge009
f360e781c7 Replace non-standard spacing.
[ci skip]
2024-12-26 17:02:14 +11:00
gfgtdf
78e6bdaa29 remove variable that was always false 2024-12-26 03:31:47 +01:00
gfgtdf
4593921b67 fix error in invalid [side]ai_config= 2024-12-26 03:31:47 +01:00
doofus-01
fafa0e7b13
1.19 - Coastal Raider (new ship) (#9616)
* add new ship 'coastal raider', sprite and standing/moving animations mostly by Vilaliy Bakal

* fix raider portrait

* add WEAPON_SPECIAL_NAVAL_RAM

* Iron Raider variant

* better halo glow for fireship

* change race=transport to race=ship
2024-12-25 17:53:26 -08:00
Thewodoros
96a2ff69c9
EI S05: Reduce code duplication when Owaec's side joins (#9678)
Move the code for Owaec's side joining you into a custom event. This code doesn't contain any dialogue, which stays in the enemy leaders' die events.
2024-12-25 12:25:27 -06:00
Thewodoros
507e84e8cb
EI S04c: Fix warning message by Dacyn (#9677)
Avoid the case when Dacyn says the warning after Ravanal already noticed him.
2024-12-25 08:56:49 -06:00
Dalas121
e586f2bcf5
Dwarvish Explorer: reduce resistances from 20% to 10% (#9666)
* Dwarvish Explorer: physical resists reduced from 20% to 10%, melee damage increased from 10 to 11.
2024-12-24 11:35:02 -06:00
Pentarctagon
d9ef464b1e
add validation for icons that are too large (#9667) 2024-12-23 23:12:52 -06:00
Charles Dang
0badadaffe GUI2/Text Box Base: remove manual callback handling
Instead, register a NOTIFY_MODIFIED handler. Note I need to fix said event not firing when cutting text from the box.
2024-12-23 14:30:25 -05:00
Discontinuum
4475260e68
Nerf of Orcish Crossbowman (#9509)
* Orcish Crossbowman: melee 6-3 -> 4-3, experience to level 43 -> 57
2024-12-23 12:30:24 -06:00
Thewodoros
868cb845f0
EI S04c: Improve unit filters in scenario end dialogue (#9671)
Use the survivor trait instead of the type in case the unit has advanced a level.
Also remove unit type filter for side 8 because it's redundant.
2024-12-23 11:53:57 -06:00
Gothyoba
a74b39da25
Buff Dune Warmaster (#9534)
* Dune Warmaster: HP 59 -> 61, scimitar damage 9 -> 10
2024-12-23 08:38:10 -06:00
Charles Dang
f73e2b641b Game Board: remove non-const overload of get_visible_unit
This was unique to this class, since the base class only implemented the const version. It was only needed for the whiteboard, and on closer inspection none of of the mutable references therein actually needed to be mutable. Marked them all const and removed the offending getter from game_board.

Note that the non-const overload had the same functionality as the const overload in the base class, only implemented via `find_visible_unit`.
2024-12-22 09:45:10 -05:00
Charles Dang
001c90c1fc GUI2/Listbox: add header/footer size only if visible
Little hacky, since this supports the case of manually hiding the grids instead of simply not populating them (see #9499), but it prevents needing to change widget::get_best_size while I figure out a more comprehensive solution.
2024-12-22 08:18:36 -05:00
Nils Kneuper
11eaca1277 updated Hungarian translation 2024-12-22 00:34:36 +01:00
Nils Kneuper
c9da910fb8 updated Bengali translation 2024-12-22 00:33:14 +01:00
Subhraman Sarkar
920e155ef6 game_version_dialog: use boost::filesystem::path for path calculations 2024-12-21 17:42:07 +05:30
Nils Kneuper
36fa52fc1a updated British English translation 2024-12-21 09:37:08 +01:00
ZombieKnight
9b0430e1f7 Update message.lua 2024-12-20 20:57:48 -05:00
Thewodoros
19be417a05
EI: forbid dunefolk from taking the Plague Staff and add custom rejection messages (#9654)
Fixes #9627
2024-12-20 07:56:53 -06:00
Wedge009
6d10d919d5 Correct manual directory broken in #9664. 2024-12-20 18:26:51 +11:00
Wedge009
e8a3e3fcef View Manual: Avoid crash from indexing an empty vector. Resolves #9661.
Empty vector occurs when using System Language.
2024-12-20 08:34:21 +05:30
pentarctagon
8210f33a7b add preference to not get addon icons
also skip if DataURI is too large
2024-12-19 11:54:14 -06:00
pentarctagon
352157d593 remove inaccurate changelog entry 2024-12-19 09:31:35 -06:00
Gothyoba
10364b169b
Increase Fire Resistances of the Fire Guardian Line (#9438)
* Fire Wisps and Guardian - Fire Resistance changed from 50% to 70%
  * Fire Wraith - Fire Resistance changed from 50% to 80%
2024-12-19 09:24:41 -06:00
Charles Dang
a6954bd56e Prefs: reduce excessive indent (no content changes) 2024-12-19 00:35:18 -05:00
Charles Dang
6a18a37afe Prefs: advance preference access should not be mutable 2024-12-19 00:18:32 -05:00
Severin Glöckner
d191109bb4 German translation edits 2024-12-19 03:49:23 +01:00
Wuzzy
0c1357b594 German translation update
merges #9625
2024-12-19 02:19:20 +01:00
pentarctagon
f7dc6ebaeb 1.19.7+dev 2024-12-18 16:58:02 -06:00
pentarctagon
4a689a687d 1.19.7 2024-12-18 16:57:02 -06:00
pentarctagon
144fa9c71a pot-update and regenerate doc files 2024-12-18 16:55:39 -06:00
pentarctagon
f5ab5620e2 changelog_entries 2024-12-18 16:49:30 -06:00
gfgtdf
5e5fc1db5d remove [side] leader=
previously the leader= attribute in [side] could be used to
make the engine choose a faction by its leader, similar to how
[side]faction_from_recruit worked.

However this was not documented in the wiki, and the name clash
with the [side][leader] subtag could also cause problems
and is also a litte confusing.

So it was decided to remove it. an alternative approach to fix the
name clash would be to rename it, but i can't think of
real usecases of this feature currently.
2024-12-18 18:48:41 +01:00
Charles Dang
2be41a4f85 GUI2/Listbox: remove any_rows_shown
Instead, return the number of rows shown from filter_rows_by. We might re-add any_rows_shown in the future, but for now this covers the intended usecase.
2024-12-18 02:45:26 -05:00
Charles Dang
edb4331d56 GUI2: use more nested namespaces 2024-12-18 02:44:28 -05:00
Charles Dang
e037694945
GUI2: simplify various dialog's filter handling (#9650)
Closes #7868. This implements a farther-reaching cleanup without the regex, though I might revisit the regex method again later.
2024-12-18 02:01:05 -05:00
gfgtdf
f113b2b7a7 Fix #9651 Error in u:extract()
This logic seems inverted, this probably happened while the lua attributes were converted to use the LATTR_SETTER macros.
2024-12-16 19:10:53 -05:00
gfgtdf
e64283534f wesnothd: update current turn in init_side instead of end_turn
This matches the behavior on the client where the events that
happen after end_turn (the "turn end" wml events) happen during
the last sides turn not the next sides turn. In particular this
fixes #2563. It also fixes #3899 because the new logic
automaticially skips empty sides already in init_side and not on
end_turn.

It also changes how description is updated, since carrying that
return value arround specifying whether it was updated was becoming
annoying.

With a few code improvements from soliton.
2024-12-16 00:20:40 +01:00
gfgtdf
f2bcc997b8 add simple_wml child_or_add() 2024-12-16 00:20:40 +01:00
Bernhard Rosenkränzer
782ab2df3e Fix build with boost >= 1.87.0
Boost 1.87.0 removes some functions that have been deprecated for a few
releases, but are still used in wesnoth.
2024-12-15 16:29:11 +11:00
gfgtdf
79798b9f2b remove unused cpp file 2024-12-15 05:24:12 +01:00
gfgtdf
c1c0111d3c WC: New carryover implementation.
We now use a modified default carryover calculation,
the main advantage is it now uses the normal carryover
message on endlevel, and shows how it is calculated.
2024-12-15 05:17:57 +01:00
gfgtdf
06d1fade32 split gold_carryover into smaller functions
this way the functions can easily be reused for alternative
carryover implementations.
2024-12-15 05:17:57 +01:00
gfgtdf
f29f8fb368 move the carryover gold handling and dialog to lua
The idea is to make it easier for umc devs to implement
their own carryover / early finish bonus mechanics. Maybe
we can also make use of it in Worls Conquest.
2024-12-15 05:17:57 +01:00
pentarctagon
893b31e769 return pbl author attribute to its original usage
and use the new primary_authors attribute instead

Fixes #9547
2024-12-14 18:49:32 -06:00
gfgtdf
e8af57e3ab remove some unneeded catch { ... }
these catch were once added to put a send_data() there
now they are no longer needed.

Also calling saved_game_.clear(); is not needed there either.
2024-12-15 00:51:29 +01:00
gfgtdf
f3c48ab8ce luaapi: fix wesnoth.current.user_is_replaying 2024-12-14 23:30:16 +01:00
gfgtdf
a7d3db9cf7 Fix source_lists order 2024-12-14 23:07:10 +01:00
gfgtdf
bf4ad3bb42 WC: fix campaign abbrev
previously it was unclear what the trailing number meant,
also the order couldn't be changed in the translation.

Also the player number was shown 2 times in the savefile name,
resulting in names like 'WC1-WCII 1 -Start-Auto-Save.gz' so i
removed it from the scenario name.
2024-12-14 22:53:12 +01:00
gfgtdf
c762c01924
Add -r option to add_source_file fix #8733 (#9033) 2024-12-14 22:39:12 +01:00
gfgtdf
4fb36d5e08 luaapi: add wesnoth.current.user_is_replaying
This returns true when the user is currently replaying the scenario
This not only includes the classic 'replay safefiles' but for
example also the 'replay turn' feature (field name suggested by celmin)
2024-12-14 02:29:29 +01:00
gfgtdf
68f6c984e7 luaapi: add team.carryover_gold
Not really usuable yet since the game engine overwrites it at game end,
Part of the 'move the carryover gold handling to lua' patch
2024-12-14 02:22:11 +01:00
Nils Kneuper
70361db1bd updated Italian translation 2024-12-14 00:36:45 +01:00
Nils Kneuper
91efe14fba update Czech translation 2024-12-14 00:35:25 +01:00
Nils Kneuper
8b77417425 updated Hungarian translation 2024-12-13 13:12:16 +01:00
Charles Dang
425eca473f Win Toasts: remove fallback macro defines 2024-12-12 20:35:51 -05:00
Charles Dang
2066456654 Target Windows 10 2024-12-12 20:35:51 -05:00
Subhraman Sarkar
2debd74605 unit preview pane: use overloaded functions to set data 2024-12-12 09:47:47 -05:00
gfgtdf
2dcfe2435c deploy use of std::string_view 2024-12-12 03:12:38 +01:00
gfgtdf
e28217b213 Add utils::stod/stoi
There are drop in replacements for std::stod/stoi, the differences are:
- They are locale independent
- The take string_view arguments.
2024-12-12 03:12:29 +01:00
gfgtdf
1bd64bd8aa fix utils::unescape 2024-12-12 03:12:26 +01:00
gfgtdf
e549b03412
DM: S20: Fix waittime at scenario start
Don't animate unit advancements during a prestart event.

It woudl be better it u:advance() would automaticialyl not waste time animating advancements that can't be seen (during prestart events) but for this scenario this is already an improvement
2024-12-11 19:48:57 +01:00
Pentarctagon
02304cd86f Avoid keeping player_iterator that might get invalidated before use 2024-12-10 09:29:21 -06:00
Charles Dang
66e94c9a6b GUI2/Widget: add convenience visibility setters 2024-12-10 09:28:21 -05:00
Charles Dang
c8df594a74 GUI2: remove screen_pitch_microns variable 2024-12-10 08:33:22 -05:00
Charles Dang
a4a8506dfa GUI2/Stacked Widget: remove handling of [stack]
Been deprecated for years
2024-12-10 06:58:55 -05:00
Charles Dang
028e16d39b GUI2: move multi_page and stacked_widget init to their constructors
Makes it consistent with the listbox handling in 10b640c0f2
2024-12-10 06:54:56 -05:00
pentarctagon
ebf9a2949a Revert "GUI2/Listbox: make sorter widgets mandatory"
This reverts commit dd1eb9e964.
2024-12-09 15:28:52 -06:00
gfgtdf
06781df8f2
Update INSTALL.md for Charconv
Increases GCC requirement to 11 for Charconv support (which is part of c++17)

Technicially it also builds with older gcc versions when boost 1.85 is available but that combination seems unlikely and i didn't want to make INSTALL.md too complicated.

The upcoming clang 20 will also support charconv by itself, but again it felt silly to mention something that is not available yet.
2024-12-09 18:02:03 +01:00
Thewodoros
f7fd05b63e
EI S04c: fix gold management for Ravanal (#9637)
Give side 7 gold to recruit units only after ravanal_gets_serious event, and only if they are low on units, so not to clutter the map.
2024-12-09 07:15:58 -06:00
Charles Dang
255b1ad055 GUI2: init more members directly from builders when possible 2024-12-09 02:59:32 -05:00
Charles Dang
e208a4e776 GUI2/Grid: minor private impl cleanup 2024-12-09 02:19:44 -05:00
Charles Dang
3a74825e8d Initial work to handle chat timestamps as time_points 2024-12-09 02:18:52 -05:00
Charles Dang
6d4058d670 GUI2/Unit Recall: properly handle saving last sort order
Small regression from 530cd2b02b
2024-12-09 02:00:49 -05:00
Charles Dang
dd1eb9e964 GUI2/Listbox: make sorter widgets mandatory
Better to have a widget-not-found error than silently doing nothing here.
2024-12-09 01:59:52 -05:00
Charles Dang
f7a271dab9 GUI2/Listbox: adjustments for 7d92a8cb4a 2024-12-09 01:55:13 -05:00
Charles Dang
7d92a8cb4a GUI2: take find_widget and find ID args as string_view 2024-12-09 01:20:09 -05:00
Charles Dang
530cd2b02b GUI2/Listbox: improve sort option handling
* Re-added the ability to set a single sorter, this time by ID.
* Multi-sorter setting now uses the magic sort_N IDs.
* Cleaned up internal handling to remove reliance on header grid columns.
  Sorters will still be looked for in the header, but rely on the specified ID.
  This did (I'm pretty sure) work before, but now it's explicit.
* The order_pair typedef has been removed
* set_active_sorting_option has been removed set_active_sorter and now takes its arguments separately instead of as a pair.
* set_active_sorter will use the bound sorter header on-modified handler
  instead of calling order_by_column directly
* set_sorting_options has been renamed to set_sorters
* get_active_sorting_option has been renamed get_sorter
2024-12-08 23:04:43 -05:00
Charles Dang
10b640c0f2 GUI2/Listbox: refactor initialization process
Used work by @babaissarkar in #9630 as a base. We're finally using [instance] for something!
2024-12-08 23:04:43 -05:00
Charles Dang
bed8047ee4 GUI2/Tree View: get indentation step size from builder 2024-12-08 23:04:43 -05:00
Charles Dang
2d9cc9c89d GUI2: add a scrollbar_container builder
This unifies handling of the scrollbar modes without having to manually set them in the builders. At one point, this wasn't too common, but it's become common enough that having a separate builder is cleaner
2024-12-08 23:04:43 -05:00
gfgtdf
5801b5bcdb
use to/from_chars in attribute_value and lexical_cast (#8790)
This makes attribute_value and lexical_cast use the "new" to/from_chars api.

Its main advantages are:
- It's guaranteed to be locale independent, hopefully fixing all cases of #3945 and similar
- It fixes some cases config serialization, in particular the test
```
	cfg["x"] = "9.87654321";
	BOOST_CHECK_EQUAL(cfg["x"], 9.87654321);
```
- Previously the lexical_cast implementation used exception
  handling for invalid formats (catching std::invalid_argument)
  which made noise during debugging (and is also slower if it
  is not optimized out).
- It's faster

So far afaik the only compiler which has a complete and proper to/from_chars implementation is msvc, gccs implementation of from_chars sometimes uses strtod under the hood and clang simply hasn't implemented from_chars for floating point numbers yet at all (actually the upcomig clang 20 will have it). Luckily for us, there is now also boost::charconv that can be used. So this raises to minimum build requirement to have at least one of:

- msvc 2019 update 5
- gcc 11
- clang 14 (i have added a fallback implementation of from_chars for this case, that doesn't support all of its features, and is probably certainly not as fast as the boost version, but supports the features that we use from it)
- boost 1.85
 
Since in particular the gcc implementation isn't that good (at least it on gcc11), boost charconv is the preferred implementation that is used if available.

This also removes a strange overload for
pointers to integers in lexical_cast while changing lexical_cast to use the new api.
2024-12-08 22:28:10 +01:00
pentarctagon
2139d5b7b6 add curl to CI image 2024-12-07 18:44:55 -06:00
Martin Hrubý (hrubymar10)
b21b828f8d
Use new MCS for Xcode project 2024-12-07 17:58:52 +01:00
Nils Kneuper
759822a47f updated Hungarian translation 2024-12-07 17:57:59 +01:00
Nils Kneuper
2e02f310d2 updated Chinese (Simplified) translation 2024-12-07 17:56:49 +01:00
Yoruma
dcbe883699
Fix exception when opening MP a second time at low resolution (#9622) 2024-12-06 14:41:14 -06:00
Tóth Kornél
ad563d99e9
Map editor segmentation fault fix (#9564)
Fixed map editor crashing when creating or opening scenario after played local scenario before opening map editor. Resolves #9563. The cause of the bug was that the ai manager singleton pointer was not set to nullptr after it was destructed. Fixed this by making ai manager destructor set singleton to nullptr. Before this the ai_map_ map member has to be cleared in destructor because it might try to access the singleton when destructed.

---------

Co-authored-by: SomeName42 <>
2024-12-06 14:39:47 -06:00
Gothyoba
9a8520a192 Add a changelog entry for Dawarf Changes 2024-12-06 14:35:07 -06:00
Gothyoba
91d6bb4b45 Demote Dawarf to level 0 2024-12-06 14:35:07 -06:00
JJ Marr
2e520d03a5 Remove incorrect moves
These were added by clang-tidy's autofix, which both tried to convert
the parameters to const references and std::move them. The correct
behaviour is to convert only to a const reference.
2024-12-06 02:15:13 -05:00
Charles Dang
e0bda68b80 Revert "listbox: simplify builder"
This reverts commit c38b856a82.
2024-12-06 00:43:39 -05:00
Subhraman Sarkar
c38b856a82 listbox: simplify builder 2024-12-06 11:09:47 +05:30
Subhraman Sarkar
20242ffc84 styled widget: use std::move 2024-12-06 10:31:50 +05:30
Charles Dang
5175beb1e7
GUI2/Listbox: allow setting all sorters at once (#9629) 2024-12-05 22:45:52 -05:00
Charles Dang
c4f7523e00 GUI2/Listbox: unify registration of sorting options
Instead of two functions for translatable and non-translatable options, comparison will be determined by the return value of the sorter. Existing translatable sorting options have been adjusted to return t_string rather than string.
2024-12-04 21:46:39 -05:00
Gunter Labes
01908e9274
Reject image URI with unsupported type 2024-12-04 11:15:48 +01:00
Yoruma
5a10721637
Add a red line to the bottom of lobby chat to help distinguish old messages 2024-12-03 16:10:25 +01:00
Gunter Labes
ee84633273 Make clang-tidy calls less noisy 2024-12-03 20:35:25 +05:30
Subhraman Sarkar
482c2817f9 fix clang-tidy warnings 2024-12-03 20:35:25 +05:30
Dalas121
42ed77905b
Elvish Champion stats tweak (#9621)
Elvish Champion: HP 72 -> 70, cost 61 -> 60, accuracy bonus is now explained via a weapon special. Resolves #8706
2024-12-02 15:04:15 -06:00
Thewodoros
d3dfe36571
EI: Fix last breath events for Hahid and Grug (#9619)
When Hahid dies, Grug or Dolburras, if present, say the "eulogy". There were problems in scenarios where they first appear (S06a for Dolburras and S07b for Grug) - they say it even before joining the player's side, which makes no sense. I changed the message tags in utils/deaths.cfg to use "id" and "side" instead of "speaker", so they only say it when they are on the same side as Hahid.
Also in S07b, Hahid's herodeath macro was duplicated, so the dialogue was displayed twice.
Also I changed Grug's herodeath to "id" and "side" and re-included it into S07b, so now Gweddry says the eulogy for Grug after Grug joins, but not before.
2024-12-02 10:21:56 -06:00
JJ Marr
92e91e4c0e Match modal_dialog::register_integer to header
For whatever reason, callback_save_value had type
std::function<void(int)> in the .cpp file but
std::function<void(const int)> in the header file. This reconciles them
to both take in an integer as a parameter.
2024-12-01 23:19:53 -05:00
JJ Marr
ecd273914c NOLINT exception to const reference rules
Specifically, this function is intended to cause a runtime error when a
pointer to an incorrect type is passed in.
2024-12-01 23:19:53 -05:00
JJ Marr
7cbe381faa Enable performance-unnecessary-value-param 2024-12-01 23:19:53 -05:00
JJ Marr
6999b294d5 Use std::move wherever possible 2024-12-01 23:19:53 -05:00
JJ Marr
fe5296aefd Make every possible param a const reference
This is important for performance. If a parameter doesn't have to be
modified, it should be a constant reference to the original.
2024-12-01 23:19:53 -05:00
Charles Dang
0ed106c4e2 wesnothd: format logged-in time directly
This was the last use of lg::format_timespan, which was only ever used in server code anyway. The server probably shouldn't be formatting this anyway, but as long as it is, we don't need a dedicated function or fancy formatting.
2024-12-01 21:42:04 -05:00
JJ Marr
70c89f819d Enable warnings as errors for scons
Will this catch the outstanding issues?
2024-12-01 20:55:11 -05:00
Charles Dang
a25d28e637 Game Events: removed an unnecessary getter
Bad design to return mutable reference to static object. This method has the possibility of creating a new default entry in the by_name map, but the remove call will be a no-op in that case (as it was before), so no harm done.
2024-12-01 17:23:27 -05:00
Charles Dang
20e61d67ff server_base: remove orphaned function declarations
Left over from  e7a4869c4a
2024-12-01 13:21:57 -05:00
Nils Kneuper
8f7813c7a0 updated Hungarian translation 2024-12-01 18:59:47 +01:00
gfgtdf
ba5c1c1ac1 Fix #7478 game crash after reloading a mp game in debug mode (#8907)
previously the game would return to titlescreen here if mp_info_
but was null but
`game_config::debug && state_.classification().is_multiplayer()`
returned true which happend when a multiplayer game was reloaded
via the sp loadgame dialog.

This fixes the issue by simply removing the "always show mp staging
between scenarios in debug mode" feature, which imo never was that
useful anyways.
2024-11-30 22:49:32 +01:00
gfgtdf
c08152a0e7 Don't store duplicate current side num in savefiles
This not only removes duplicate information which can always cause bugs if it's out of sync,
this can also be used an an easy way to detect the old undo stack format
2024-11-30 22:45:32 +01:00
gfgtdf
8a91549fe8 fix possible crash in undo events 2024-11-30 22:45:32 +01:00
gfgtdf
73c14e0d2b fix possible crash in capture events
its not safe to keep a reference to the owner_side variable
since the event might remove it, which could lead to a crash
when atempting to set it
2024-11-30 22:45:32 +01:00
gfgtdf
a5dae832c8 small cleanup
thereis no need for if(s_c::undo_blocked()) { s_c::block_undo(); } since it automaticially happens at the end of every action already
2024-11-30 22:45:32 +01:00
gfgtdf
7c41d550a9 split undoing of moves into small steps
this way even when enter/exit_hex events with [on_undo] are involved, undoing happens
in reverse order of the gamestate changes during the original action
2024-11-30 22:45:32 +01:00
gfgtdf
4dc69c5267 split villagecapture into seperate undo action
this wayits possibel to undo the action exactly in the reverse order
as they are a happening on the original code, even with wml events involved
2024-11-30 22:45:32 +01:00
gfgtdf
8350f48c88 Refactor undo stack
This commit splits undo actions into multiple smaller steps. The main advantages:
- Its allows us always undo the parts of an action in the reverse order of which
  they originally happen, preventing bugs that could be caused if the parts
  interact with each other in a way where the order matters (like for example
  an [on_undo] resetting a units moves, when the event happend in a move action
  which would then also reset the units moves on undoing).
- It's easier to add (c++) undo steps for specific steps even if they are used
  from wml, like spending gold.
- [do_command] no longer confused the undo stack (in fact it's by default now undoable).
- All actions are put onto the undo stack in the same way, previously it was
  often unclear whether the undo stack is empty during a specific step  during
  the execution of an action, in particular when people tried to use
  `undo_stack->empty()` to check whether an action could still be undone.
2024-11-30 22:45:32 +01:00
gfgtdf
d8086942df small cleanup 2024-11-30 22:45:32 +01:00
Gothyoba
c5c4c7af07
Balancing Update to Dwarvish Miner (#9506)
HP 22 > 25
XP 24 > 20
2024-11-30 15:09:34 -06:00
Nils Kneuper
b2bceba9a7 updated Bengali translation 2024-11-30 14:00:30 +01:00
JJ Marr
3b8ceb00f0 Replace NULL with nullptr in the codebase 2024-11-30 13:24:45 +01:00
JJ Marr
167677d9de Enable clang-tidy for scons 2024-11-30 13:24:45 +01:00
JJ Marr
d8d92b5d28 Add clang-tidy support to cmake
Also, enables it in CI.
2024-11-30 13:24:45 +01:00
JJ Marr
e9e40b5a37 Enable compilation database for Scons
This is necessary for interfacing with external tools such as clang-tidy
2024-11-30 13:24:45 +01:00
JJ Marr
1cf3fed50f Refactor module compilation into separate library
This allows us to disable clang-tidy for this folder.
2024-11-30 13:24:45 +01:00
Nils Kneuper
47ec1d49e7 updated Italian translation 2024-11-30 01:05:35 +01:00
Nils Kneuper
fc0e7f7a08 updated British English translation 2024-11-30 01:04:00 +01:00
Charles Dang
653333a8bf Restore space after log timestamps 2024-11-28 22:14:06 -05:00
Charles Dang
4ccfca6b1d Game Display: check for teams before refreshing reports (fixes #9609)
Regression from 7fa4fe483c
2024-11-28 22:13:43 -05:00
Charles Dang
2c216eec72
Refactor utils::format_timespan to use chrono types (#9610)
This also adjusts the periods for years and months. Previously, we were using values of 30 days for a month and 12 months for year. Now, we use the chrono values of a month as 1/12 of a year and a year as 365.2425 days.
2024-11-28 22:07:52 -05:00
Thewodoros
70a76b0e21
EI: add missing last breath (HERODEATH) events for Addogin (#9611)
In S04a, the event is added within his original "last breath" event - the one which switches him to the player's side. Without this additional event, he will die silently if killed by the elves after being "captured".

In S11, it looks like the event for him was simply forgotten (HERODEATH events are added for all other heroes).
2024-11-28 16:38:00 -06:00
Thewodoros
2db282c273 Clear forgotten variable
gold_extra is not used in further scenarios, just like gold_cost.
2024-11-29 04:02:36 +11:00
Thewodoros
22a1a9d5d4 Use variables for deducting gold in EI S04b
These two variables are used everywhere else in this scenario, hardcoding the amounts here must've been a mistake.
2024-11-29 04:02:36 +11:00
Subhraman Sarkar
2477618306 rich label: support specifying text color, font and style in resolution
This allows the rich_label definitions in rich_label_default to work.
2024-11-28 23:04:05 +05:30
Subhraman Sarkar
2e0f8c453e lua_widget_attributes: use existing functions in gui/widgets/helper.cpp 2024-11-28 11:57:21 +05:30
Charles Dang
98f0d3721c wesnothd: convert stray member to seconds 2024-11-27 18:58:28 -05:00
Wedge009
b8747c37b0 Remove non-standard spacing.
[ci skip]
2024-11-27 10:35:12 +11:00
pentarctagon
7183553e23 1.19.6+dev 2024-11-26 12:17:36 -06:00
pentarctagon
99469ba31d 1.19.6 2024-11-26 12:16:03 -06:00
pentarctagon
ed94f9b02b changelog entries 2024-11-26 12:11:40 -06:00
pentarctagon
75f41e84f0 pot-update and regenerate doc files 2024-11-26 12:10:35 -06:00
Charles Dang
0f8d9a9940
wesnothd: handle server IP bans more generically (#9602)
Instead of simply returning a string, `is_ip_banned` now returns a struct with an error code, ban reason, and ban time remaining. This avoids doing time duration formatting on the server and allows the error message to be localized on the client. It also makes the ban handling interface more generic in server_base, which should hopefully allow forum bans to be handled this way as well.
2024-11-26 09:13:57 -05:00
Nils Kneuper
7bc844d4be updated Hungarian translation 2024-11-24 17:24:57 +01:00
Subhraman Sarkar
c475b0c684 add a command line option to preprocess a string 2024-11-24 16:51:12 +01:00
Subhraman Sarkar
a50f047c7c add preprocess_string method and use preprocessed loyal trait 2024-11-24 16:51:12 +01:00
doofus-01
26fd5513b6
fix ship portrait references (#9603)
fix some image references in #9484
2024-11-23 22:38:07 -08:00
doofus-01
56468a9bdc
Update changelog.md 2024-11-23 16:35:06 -08:00
doofus-01
3dff5d2eac
Ship sprites and units update (#9484)
* new ships Derelict Hulk and Fireship

* new "race" Ships - includes Transport Galleon, Pirate Galleon, Derelict Hulk, and Fireship

* Pirate Galleon chaotic

* animations for all four touched ships

* ship portraits for Derelict Hulk and Fireship

* crew portraits by LordBob for Boat, Galleon, Transport Galleon, and Pirate Galleon

* old (non-pixel art) transport galleon and pirate galleon images moved to scenery
2024-11-23 16:28:37 -08:00
Charles Dang
5a90e40e19 Note --nodelay removal in changelog, remove from manpage 2024-11-23 12:54:32 -05:00
Nils Kneuper
d2638df581 updated Arabic translation 2024-11-23 15:46:13 +01:00
Nils Kneuper
4d37947ae1 updated Chinese (Simplified) translation 2024-11-23 15:44:22 +01:00
Charles Dang
335c4943d2 Build Info: improve refresh rate report
See discussion in #9594
2024-11-22 12:43:47 -05:00
Iris Morelle
ce6c56adea Switch default Pango/Cairo render backend to Fontconfig on macOS
Fixes #8488.

This is a simple setenv trick. Ideally we would instead figure out how
to fix Oldania ADF Std to work on newer macOS, but since we know the
Fontconfig backend works for us on Windows and Linux, we may as well
stick to it and hope there will never be a situation where CoreText
would prove superior somehow.
2024-11-22 23:00:03 +05:30
Charles Dang
bb4eb0bf1b Video: fix incorrect refresh rate value being returned (fixes #9594)
Regression from b859060627
2024-11-20 15:43:54 -05:00
Charles Dang
6fb5488464 Editor: better default addon and schedule names 2024-11-20 15:22:40 -05:00
Charles Dang
78f7703639 Macro be gone (fixup c2b2664eb2) 2024-11-20 15:21:17 -05:00
Charles Dang
6fa92f9553 wesnothd: indent fixes (no functional changes) 2024-11-20 15:19:39 -05:00
Thewodoros
55eef0dbef
Fix issues with hero deaths in EI S03 (#9595)
Avoid adding duplicate "last breath" events (HERODEATH macros), and don't call [endlevel] in "die" event ( as it's already called in "last_breath").
2024-11-20 11:08:36 -06:00
Iris Morelle
ad8f94195d
Make undeclared local function static
Fixes a warning on Xcode 16.1.
2024-11-20 11:09:20 -03:00
Subhraman Sarkar
7ca616f2ae CodeQL CI: add autorevision run step 2024-11-20 14:20:32 +05:30
Charles Dang
c7f818d449 wesnothd: use steady_clock where appropriate 2024-11-20 01:03:42 -05:00
Charles Dang
79120f1e31 wesnothd: use std::chrono instead of the C time API 2024-11-20 01:03:42 -05:00
white-haired-uncle
c2b2664eb2
GUI2 LuaAPI: expand widget attr support (#9497) 2024-11-19 22:41:47 -05:00
Tóth Kornél
484116ea09
Map Editor terrain button click fix (#9560)
Fixed palette button not being clickable after scrolling in palette widget without moving the cursor. Resolves #1335. The cause of the bug was that scrolling doesnt change the highlighted state of the palette buttons and not highlighted buttons didnt process being clicked. Solved the bug by making not highlighted buttons process being clicked.
2024-11-19 15:20:30 +01:00
Severin Glöckner
5d3a84084e Changelog Update
* add last changes
* merge changelog_entries

[ci skip]
2024-11-17 22:40:14 +01:00
Severin Glöckner
e2f656f833 German translation fix
[ci skip]
2024-11-17 21:55:21 +01:00
gfgtdf
b8c912d1e7 remove outdated comment 2024-11-17 21:30:22 +01:00
gfgtdf
d668aea7d0 fix doc comments 2024-11-17 21:30:22 +01:00
gfgtdf
a5f40c353d use block_undo() over undo_stack->clear()
this also sends the action to the other clients immidiately
2024-11-17 21:30:22 +01:00
gfgtdf
653bbb8263 small cleanup 2024-11-17 21:30:22 +01:00
gfgtdf
33bc132215 fix OOS caused by sending data to soon
previously block_undo would clear the undo stack and send data even when its parameter is false

this commit also fixes a possible crash when dsu changed the gamestate during formula evauluation

also removed a is_simultanious_ since it basicialyl did the same thing as undo_blocked_
2024-11-17 21:30:22 +01:00
gfgtdf
cc2914c1c6 remove show parameter from move_unit 2024-11-17 21:30:22 +01:00
gfgtdf
24ad4cb9d2 remove show parameter from recruit_unit 2024-11-17 21:30:22 +01:00
gfgtdf
3d589f8d0d use synced_context::run for move actions
With this, finally all actions run though synced context::run,
so that we not only have a central place that happens before/after
synced actions, we also guarantee that there is no difference between
the original and the replay codepath for all actions.

This should also make upcoming changed to the undo code easier.
2024-11-17 21:30:22 +01:00
gfgtdf
d0050dac8e remove undo_stack parameter from move_unit
it was only there for the ai code to skip undo which it no longer does
2024-11-17 21:30:22 +01:00
gfgtdf
a6cd4441c9 refactor synced_context::run
- Removed the now unused 'undo' parameter
- Removed the rareley used 'show' parameter, the actions now
  check whether they should skip in replays

Replaced the error handler with the more generic 'spectator' parameter,
the idea is to use it also for the move_spectator so that the move action
can also go through synced_context::run()
2024-11-17 21:30:22 +01:00
gfgtdf
7782c50f83 simplify synced_context::run() calls by ai and whiteboard
- use_undo is not used anymore
- ignore_error_function has no effect since to_check()
already checks whether the unit exists
- show in whiteboard code was the default value.
- show is now determined inside the actions handler, this
has the advantage that the skip_ai_moves preference now
also works for networked ai sides.
-the attack code now used run_in_synced_context_if_not_already
just like the other commands
2024-11-17 21:30:22 +01:00
gfgtdf
715a65438a Remove outdated comment
id is nowdays always a local variable of SYNCED_COMMAND_HANDLER_FUNCTION(recall
and never becomes invalid here
2024-11-17 21:30:22 +01:00
gfgtdf
7810b0308e remove use_undo parameter in synced_context
The comments said undo is disabled during ai turns to speed things up,
but since all the undo code does is adding a simple object once to a vector, its impact
on performance is really nonexistent.
2024-11-17 21:30:22 +01:00
white-haired-uncle
c2361e3a82
schema: Fix color type definition and uses 2024-11-17 18:07:22 +01:00
Gunter Labes
8c8bff7ffb
Fix expected/actual mixup in warning messages 2024-11-17 17:39:09 +01:00
Gunter Labes
1e12839804
Move unit changes to changelog and try to unify the formatting 2024-11-17 17:38:42 +01:00
pentarctagon
3c45ec93e0 use expected indent 2024-11-17 10:07:24 -06:00
Dalas121
f1e74af2d3
Update change_huntsman_ranger.md
Reflect the cost change made in 858b2d2
2024-11-17 08:28:48 -06:00
Dalas121
858b2d2bfc
Huntsman: reduce cost 50 > 47
At Hejnewar's request. I merged #9582 too early, before getting his feedback on cost.
2024-11-17 08:04:51 -06:00
Subhraman Sarkar
3afa75225f cmake: fix broken ENABLE_DISPLAY_REVISION option
LOAD_REVISION is used in game_version.cpp rather than game_config.cpp
2024-11-17 11:32:54 +05:30
Dalas121
c67d447901
Change Human Ranger and Huntsman (#9582)
* Huntsman:
  - HP 57 > 53, bow 9-4(marksman) > 10-4(marksman), cost 43g > 50g
  - new ability: Swamp Lurk (invisibility in swamps)
* Ranger:
  - HP 60 > 64, bow 7-4 > 8-4, cost 43g > 50g
  - Defense: castle 60% > 50%, frozen 20% > 30%, reef 30% > 50%, sand 30% > 40%
2024-11-16 15:55:38 -06:00
Nils Kneuper
11078f3e24 updated Arabic translation 2024-11-16 12:36:26 +01:00
Subhraman Sarkar
e64765da2a markup: doc update, return empty string instead of empty tag pair
Related to #9583.
2024-11-14 22:26:10 +05:30
Subhraman Sarkar
ea6f903c04 markup: don't escape internally and update docs
Internal escaping causing markup failure when tags are nested.
See #9569 and #9572 for example. Functions in markup will no longer
escape their contents, and those should be escaped by caller if needed.
2024-11-14 10:30:36 +05:30
Thewodoros
df3f2b2653
EI S01 story: Fix outposts locations accorting to campaign map #9578
The outposts are east of River Weldyn in the campaign map. Also, in scenario 1, the castle is east of the river. The heartland of Wesnoth country is west of that river, so the eastern bank is the "far" one.
These words date back to the original campaign design by Eric S. Raymond. Back then, the campaign map had the outposts on the western bank of Weldyn.
But in aeb9ec7 the map was replaced with a newer one, with outpost on the eastern bank, which persists to this day with some minor changes (like the southern outpost was moved futher south).
2024-11-12 19:49:29 -06:00
Thewodoros
a6fd520956
EI S02: Avoid creating unit with same id twice (#9577)
In the existing code, on HARD difficulty, creating a unit with id="Hur" is done twice, first as a Troll Whelp, then as a Troll Rocklobber. As a result, the former unit is replaced with the latter one. As they are created at the same coordinates, I believe this is the intended behavior.

But according to https://wiki.wesnoth.org/SingleUnitWML , reusing the id "may produce unpredictable results in many cases". For example, (I tested it) if you create the new unit at the different coordinates, it instead appears at the former unit's coordinates.

I've added another preprocessor directive, so the unit with this id is created only once on both NORMAL and HARD.
2024-11-12 18:53:14 -06:00
pentarctagon
d2fc3f3f17 add acquaintance as well 2024-11-12 17:38:07 -06:00
pentarctagon
3c17bc83c2 Add missed preference
Fixes #9567
2024-11-12 17:38:07 -06:00
Charles Dang
c5cb0f104f Remove --no-delay option
This wasn't consistently honored and only affected unit animations.
2024-11-12 00:19:44 -05:00
Charles Dang
34c1c0f61c Remove 200ms delay in gameloop processing when window is not visible
If we need this, it should, as the comment says, be implemented as part of the draw manager. But it also seems like any optimizations on this front are better left to the OS and its compositor.
2024-11-12 00:19:44 -05:00
Charles Dang
8b14612fbe Convert remaining uses of SDL_Delay to std::this_thread::sleep_for
There's one last usecase in controller_base which I intend to remove.
2024-11-12 00:19:44 -05:00
Charles Dang
812c1e2e5e Unit/Animation Component: format ctor 2024-11-11 21:46:14 -05:00
Charles Dang
b9bcdd3b63 Convert animation code to use chrono types 2024-11-11 21:46:14 -05:00
gfgtdf
690ff375b7
fix #9561 OOS when undoing in multiplayer (#9566)
previously in `undoable_action->undo(side_) ` the undo stack was not in sync with the relpay stack because the code called `undos_.pop_back();` before that and `resources::recorder->undo_cut` after that, this could confuse the code which sends replay commands to the other clients.
2024-11-12 02:03:45 +01:00
Gunter Labes
ce54c007bd
Raise batch timeout value because of recent increase in timeouts on macos 2024-11-11 18:19:08 +01:00
newfrenchy83
9330997d10 fix malformed markup in unit_list and unit_recall
error cause to show text of color code instead of use for color level number(same fix what for 37b7a83ce0 (diff-010538c81e10d3e4eeadfb49808ab52a6fe1becc787cb247c6a854b8f4c1900aL104))
2024-11-11 21:03:10 +05:30
Subhraman Sarkar
b2af5d8488 campaign selection: also open add-ons manager when double clicked
previously, double-clicking on the More Campaigns entry opened the tutorial, instead of the Add-ons manager as expected.
2024-11-11 19:43:00 +05:30
Tahsin Jahin Khalid
05e8ac2c96
[SotBE] Enable Saurian Spearthrower for Saurians (#9571)
* SotBE: Enable Spearthrower for Saurians

* sotbe: add changelog entry

---------

Co-authored-by: Tahsin Jahin Khalid <5283677+knyghtmare@users.noreply.github.com>
2024-11-11 19:58:49 +06:00
newfrenchy83
8e57567e24 add recursion_guard in [filter_(second_)weapon] for [leadership] and [resistance] abilities.
In moving recursion_guard from matches_filter() to special_unit_matches() i has forgotten what [leadership] abilities called directly matches_filter().
2024-11-11 14:32:05 +01:00
Subhraman Sarkar
37b7a83ce0 fix malformed markup and remove another hardcoded one (#9568) 2024-11-11 08:24:51 +05:30
Nils Kneuper
ddbdf01588 updated Chinese (Simplified) translation 2024-11-09 18:34:36 +01:00
Nils Kneuper
ed37c7f807 updated Turkish translation 2024-11-09 18:33:30 +01:00
Nils Kneuper
a76f96e4ee updated Czech translation 2024-11-09 18:32:24 +01:00
Nils Kneuper
a8ecf3233b updated Bengali translation 2024-11-09 18:31:13 +01:00
Dalas121
63c161c81c
Changelog: create forestlion-rebalance.md
Changelog file for #9420
2024-11-09 07:55:49 -06:00
ForestDragon
a3f141c196
[Units] Adjust Forest Lion Stats (#9420)
hitpoints from 42 to 48
movement from 9 to 7
claws from 5x4 to 6x4, now usable on offense
bite from 15x2 to 9x2 charge, now usable in defense
arcane resistance from 20% to 10%
price from 21 to 30
2024-11-09 07:54:37 -06:00
Subhraman Sarkar
14302f6bff update changelog entries 2024-11-08 21:16:59 +05:30
Gunter Labes
b905c1aa4a
Allow accessing the old value in [set_var] formula= 2024-11-08 09:35:43 +01:00
Jonathan-Kelly
45662a2f83
Revert "SoF S7: fewer and slower enemy outriders" (#9521)
This reverts commit b3802f44ea.

Since commit 70df290 restores the Elvish Outrider to essentially its original stats, the 1.18 balance fix for this one campaign scenario is no longer useful.
2024-11-07 18:40:26 -06:00
Dalas121
9d9d2cd027
Sicarius - replace Deflect with Guard (#9532) 2024-11-07 18:26:21 -06:00
MechanicalDragon963
32b5570103
Improve Naga Guard line (#9529)
Redesigns the Naga Guard, Shield Guard, and High Guard to make their shield bash attack less redundant.

Also adds the new Unwieldy and Guard specials, and deprecates the Absorb special.
2024-11-07 16:33:23 -06:00
Charles Dang
4f97c10e35 Preferences: validate countdown time values when setting them 2024-11-07 11:10:13 -05:00
Charles Dang
37adb200e6 Display: small FPS counting fix
This is way more readable and more semantically correct. Essentially, instead of truncating the current and last timestamps to seconds and checking if we were "in" a different second, actually check the duration between the current frame and our last lap point .
2024-11-07 11:10:13 -05:00
Charles Dang
9a77b72aac Different approach to chrono::duration serialization
Since we're relying on free functions to parse and serialize time_points, it makes more sense to do likewise for durations rather than relying on a config_attribute_value member function. Leaves the assignment support for now.
2024-11-07 11:10:13 -05:00
Charles Dang
6dc65f6483 Campaignd: use chrono::system_clock instead of std::time_t
Includes adjustments to client code to likewise use chrono types. I decided to keep using time_t
(which is just an alias for long_long) for serializing time points. This avoids compatibility issues,
since we keep the same resolution (seconds since Unix epoch), and unless we're going to "properly"
store time points in config, the time_t's unitless value is a good a representation as any.
2024-11-07 11:10:13 -05:00
Charles Dang
b859060627 Add new refresh_rate pref to better handle --max-fps
The pre-processing for --max-fps was basically identical to what draw_manager::get_frame_length does.
This replaces the draw_delay preference with a new refresh_rate preference that more accurately describes
what is being set. video::current_refresh_rate will now take this preference into account, meaning the
build info report will correctly report player-set FPS limits.

The Limit FPS option in the prefs UI was also removed. When it was first introduced (cca79afe4b)
it specifically affected the map rendering code, not the rendering pipeline as a whole. With the 1.17
rendering refactor, this is no longer the case, and so its current usage as the lower bound for frametime
calculations did nothing (all it did was change the lower bound from 0 to -1 when enabled).

It might be worth adding a slider to the UI to dynamically set max fps, but that's a separate change.
2024-11-07 11:10:13 -05:00
Charles Dang
6fcf46a208 Events: remove pump_info
Only two places actually made use of the only thing it was useful for (the current tick count),
the countdown clock and the music thinker. The former was simpler to do without, and though it
was slightly useful for the latter, the music thinker really needs to be rethought.

The only thing this could be useful for is providing a stable timestamp for every process call.
That wasn't how it was designed, however. ticks() would populate its value the first time it was
called. Even if (as I considered doing) you change it to register the tick when constructing the
pump_info object, it's still easier (and easier to read) to just call steady_clock::now directly
as needed.
2024-11-07 11:10:13 -05:00
Charles Dang
12fa8f2844 Use standard chrono types consistently throughout the codebase
* Functions that return time values now return proper std::chrono::duration units (milliseconds,
  seconds, etc.). This removes the need to do manual unit conversions.
* Simple time-to-execute logging was replaced with `utils::optimer`.
* Most uses of `SDL_GetTicks()` have been replaced with `std::chrono::steady_clock`.
* Uses of events::pump_info::ticks() have been replaced with direct calls to steady_clock::now().
  This made the countdown_clock code significantly simpler. As for the music_tinker, that needs
  to be rethought wholesale.
2024-11-07 11:10:13 -05:00
Charles Dang
cd3e8d7652 Config: support time duration conversion and assignment 2024-11-07 11:10:13 -05:00
Charles Dang
7f4d2a437b Utils/Optimer: add a lap function 2024-11-07 11:10:13 -05:00
Gunter Labes
9181e4e298
Remove superfluous FIXME comment 2024-11-07 14:21:34 +01:00
MechanicalDragon963
e460d26dfc
Tweak Elvish Marshal Stats (#9512)
HP 68 -> 62
MP 5 -> 6
2024-11-06 20:50:32 -06:00
white-haired-uncle
05bf146866 GUI2 stacked_widget - add length operator 2024-11-05 21:59:24 -05:00
newfrenchy83
82cc6d979d moves alignment_str() to header and correct documentation 2024-11-04 19:09:59 -06:00
Gunter Labes
8b0909b24c Remove fallback logic from alignment_str() to work the same as alignment()
No caller was adjusted since IMO this is the correct behavior.
2024-11-04 19:09:59 -06:00
Subhraman Sarkar
c3f16b3294 reconvert file from original jpg and add metadata
removes bloat (13.7MB -> 4.3MB)
converted original jpg to webp using imagemagick, then applied cwebp -mt -m 6 -q 90 -alpha_q 100.
2024-11-04 16:51:49 +11:00
newfrenchy83
29e79c4235 Fixed an error in [filter_special] encoding
In special_id/type without the _'active' suffix only the encoding of the special in the attack is checked, and therefore the specials encoded in the [abilities] tags are de facto excluded, except that I forgot this logic in [filter_special] and I have to fix my error before updating the wikia.
2024-11-03 12:42:23 -06:00
Nils Kneuper
1aad482fe2 updated Norwegian translation 2024-11-03 18:02:44 +01:00
Nils Kneuper
e52d69cf67 updated Arabic translation 2024-11-02 12:54:35 +01:00
Subhraman Sarkar
0302dd8601 tutorial: UI improvements
uses portraits in the character selection and single click selection on pictures instead of buttons
also adds a dark background to hint messages to make them easier to read
adds arrow markers in the beginning on the units
2024-11-02 12:56:29 +05:30
Gothyoba
7fb0b8cdb3 Add Achievements to THoT 2024-10-31 12:38:00 -05:00
Wedge009
403dfbc673 Re-use translation strings from wesnoth-lib instead of duplicating them in wesnoth-editor.
Closes #9492. Bonus spelling correction.
2024-10-31 08:29:07 -04:00
Yoruma
88c6c13fdd Revert crashing code change part of #9292 2024-10-31 08:12:50 +05:30
Yoruma
0c2b035cc5 Fix with a little tricky 2024-10-31 08:12:50 +05:30
newfrenchy83
ee2bbc40cc refactor test for remove illuminates abilities. 2024-10-30 18:38:36 -05:00
newfrenchy83
7d5663b379 add a [remove_specials] tag in [effect] and [filter_special] to [has_attack/filter_weapon]
with this, it is possible to  simultaneously check specials with id and type, and/or other attributes for remove_specials effector filter_weapon
2024-10-30 18:38:36 -05:00
Thewodoros
ae5b2f0da6 Fix the attack_end event in Liberty S5
The event has to use side 3 because side 2 is idle. Also remove the dollar sign because IF_VAR doesn't work with it.
2024-10-31 10:26:23 +11:00
Subhraman Sarkar
e0e8b37880 help browser: add toggle for showing/hiding contents in 800x600 2024-10-30 13:28:58 -04:00
Gothyoba
c6853b021d
More New Titlescreen Images (#9466) 2024-10-30 11:30:28 -04:00
pentarctagon
5208905cdf fix indent 2024-10-28 13:19:42 -05:00
doofus-01
ccb079f05c
Update CI to check for XMP rather than EXIF - for PNGs only (#9435)
Addresses GIMP metadata editing limitations
2024-10-27 10:40:00 -07:00
newfrenchy83
b26f446d32 add changelog entry. 2024-10-27 09:14:45 -05:00
newfrenchy83
e905271c79 add modification specific to gender or variations
the old code don't work for replace advancement in [male/female] or [variation] tag
2024-10-27 09:14:45 -05:00
newfrenchy83
83d1bef0bc add amla advancement to [modify_unit_type]
Addresses https://github.com/wesnoth/wesnoth/issues/9309
when used, the amlas in [unit_type] are replaced by list of amlas in [modify_unit_type],i cannot done add [advancement] without erase amla already present.
2024-10-27 09:14:45 -05:00
Gothyoba
198b798e49
Make sure ELvish Race Description doesn't contradict WoF (#9505) 2024-10-27 13:57:27 +06:00
Charles Dang
61480df8eb Events: use native SDL handling for double click events
GUI2 still does its own handling with double clicks. This doesn't touch that. The default SDL handling is either 500ms (unchanged) or queried from the OS on Windows (an improvement). The click radius defaults to 32, which honestly seems like an acceptable adjustment.
2024-10-26 23:47:10 -04:00
Charles Dang
71dbaab868 Events/Pump Info: remove unused resize_dimensions member
This was set and never used. It was, at some point, I believe, but evidently got refactored out over the years.
2024-10-26 23:47:10 -04:00
Charles Dang
1ba3be778b Events: split off rate counting from pump_info::ticks
This interface was extremely confusing. pum_info is designed to set `ticks_` only once. This can lead to a situation (exemplified by the music code) where if ticks() is called multiple times in a row, the subsequent times with a counter, that counter would never be incremented since the condition that tests them short circuits on the is-ticks-not-set check.

Also, giving ticks() multiple side effects was very confusing.
2024-10-26 23:47:10 -04:00
SomeName42
44bb36d411 Sound source full_range and fade_range are now allowed to be 0. When fade_range=0 division by zero prevented. 2024-10-26 17:13:18 -04:00
Wedge009
b5e500cfda Correct string concatenation. 2024-10-26 11:11:53 -04:00
Wedge009
3baf3fefe8 Update mark-up as per PR feedback. 2024-10-26 11:11:53 -04:00
Wedge009
c26d45d56e Remove reference to obsolete and Windows-specific Notepad.
[ci skip]
2024-10-26 11:11:53 -04:00
Wedge009
fb2045120b Avoid including mark-up in Help translated text. 2024-10-26 11:11:53 -04:00
Wedge009
e01fbb6b02 Correct one more non-typographic apostrophe...
[ci skip]
2024-10-26 11:11:53 -04:00
Wedge009
b3ed22d697 Editor Help: text corrections.
[ci skip]
2024-10-26 11:11:53 -04:00
Subhraman Sarkar
dc78046d0f rich label: support text_font_size resolution key
also, mouse handler will only be registered if the rich_label is link aware and has a registered link handler.
2024-10-26 20:11:37 +05:30
Nils Kneuper
0954c2445e updated Hungarian translation 2024-10-26 14:21:10 +02:00
Nils Kneuper
7f9879fc08 updated British English translation 2024-10-26 14:20:07 +02:00
Nils Kneuper
deea9ad009 updated Arabic translation 2024-10-26 13:50:40 +02:00
Charles Dang
b4d70c4224 Bump vcpkg baseline 2024-10-25 17:01:27 -04:00
MechanicalDragon963
70df290584
Tweak some Elvish units stats (#9440)
* Elvish Scout: XP 42 -> 32;
* Elvish Rider: XP 75 -> 60; HP 49 -> 46; bow damage 11 -> 9; cost 28 -> 27;
* Elvish Outrider: MP 11 -> 10; HP 60 -> 57; bow damage 11 -> 9; sword damage 8 -> 7; cost 58 -> 50;
* Elvish Avenger: HP 59 -> 55; cost 60 -> 55.
2024-10-25 15:08:48 -05:00
Charles Dang
dfa4d7dd35 Remove chars_equals_insensitive and chars_less_insensitive
These aren't used anymore as of #9332 (save one place, which has been inlined here), and they're not good to rely on, since they don't handle utf8 properly.
2024-10-25 14:53:17 -04:00
Charles Dang
ebf825668d Add utils::erase to complement erase_if
Both can be replaced with their standard library counterparts once we use C++20 by default.
2024-10-25 13:20:59 -04:00
Charles Dang
cb4d8a8dff Deploy utils::erase_if 2024-10-25 04:03:23 -04:00
Charles Dang
84c414c58b Make use of sdl::get_mouse_location() when possible 2024-10-25 02:41:59 -04:00
Charles Dang
0e8edd12e4 Remove display::get_location_x|y 2024-10-25 02:41:59 -04:00
Charles Dang
9f806362ae Clean up display::hexes_under_rect 2024-10-25 02:41:59 -04:00
Charles Dang
ec7679d07f Rename rect::pos() to origin() 2024-10-25 02:41:59 -04:00
Charles Dang
5ab73a51fd Display: use point math for viewport position 2024-10-25 02:41:59 -04:00
Wedge009
d338c90381 Save game: text correction
[ci skip]
2024-10-24 22:03:44 -04:00
Subhraman Sarkar
c284a080e3 campaign selection: opening add-ons manager entry 2024-10-22 19:59:55 -04:00
white-haired-uncle
e6d5100924 multi_page::remove_page - account for index when limiting number of pages to remove 2024-10-21 18:57:41 -04:00
pentarctagon
a34e4a345a remove empty single space 2024-10-21 12:15:06 -05:00
pentarctagon
fd426b5b9b 1.19.5+dev 2024-10-21 12:13:11 -05:00
pentarctagon
383ba03664 1.19.5 2024-10-21 12:10:10 -05:00
pentarctagon
7047c8f581 changelog_entries 2024-10-21 12:02:37 -05:00
pentarctagon
019da2f54c pot-update and regenerate doc files 2024-10-21 11:36:51 -05:00
Gothyoba
d7c9716265 Move EI Music to Core 2024-10-20 14:50:46 -05:00
SomeName42
a5e17f770d The cause of the crash was that the active_menu_ variable was set to UNIT_FACING after the unit facing setting is finished. When clicking the menu it was looking for a unit because of the value of the active_menu_ variable and on line 670 the assert failed because it could not find one. Setting active_menu_ to MAP after the unit facing is set fixes this. 2024-10-20 14:48:31 -05:00
Gunter Labes
4e1666c7a1
autorevision: Revert nonsensical handling of untracked files 2024-10-20 21:18:48 +02:00
newfrenchy83
f7a4041f54
update codeblock libraries 2024-10-20 21:16:40 +02:00
Charles Dang
01efec92fa Display: don't return const map_locations 2024-10-20 01:55:16 -04:00
Charles Dang
c5891ef7fe Display: clean up exclusive draw stuff 2024-10-20 01:54:37 -04:00
Charles Dang
6d40872de0
Display: remove display_context wrapper functions (#9481)
This removes `get_teams()`, `get_units()`, and `get_map()` from the display class. These only served as one of the many, many ways to access this data held by the display_context, and that shouldn't be the first-class responsibility of display. Instead, we either access them through the display_context pointer that display holds (whose getter has been renamed to `context()`) or through other more convenient paths (such as play_controller). The editor_display function `map()` has now taken up the mantle of `get_map()`, mostly because both `display::get_map()` and `editor_display::map()` are used, and the former outnumbered the latter.
2024-10-19 21:38:18 -04:00
Subhraman Sarkar
f2bbedb9bb update markup in time of day help topic generator 2024-10-19 20:32:20 +05:30
Nils Kneuper
940c9abe80 updated Chinese (Simplified) translation 2024-10-19 13:43:36 +02:00
Charles Dang
99f5cfacfb GUI2/Game Stats: take team reference instead of team index 2024-10-18 14:20:07 -04:00
Charles Dang
fc514ccefb Game Display: clean up unused/unnecessary functions
Removed:
- debug_highlight et al. Unused, and we have the main "display coordinates" debug flag in the base class
- current_team_name. Only used in one place, clearer to just call team_name directly.
- get_terrain_on. Unimplemented
2024-10-18 14:19:37 -04:00
Charles Dang
a80831fb9f Format a few more ctor list (no content changes) 2024-10-18 13:12:47 -04:00
Charles Dang
672b33f227 Actions/Undo: use nested namespace declarations 2024-10-18 13:11:35 -04:00
Charles Dang
5e4728d69e Remove make_unit_ptr
Only used in one place anymore which already included unit.hpp anyway, so there's no benefit here.
2024-10-18 12:51:01 -04:00
newfrenchy83
995d67cf77 fix fallaback to unit alignment for filter and formulas. 2024-10-18 12:06:09 -04:00
newfrenchy83
174be0f8c4 Change the alignment code in attack to return an optional value and avoid falling back to neutral alignment when unit alignment is not available. 2024-10-18 12:06:09 -04:00
Ivan A. Melnikov
a1cadb54e5 campaignd: Use completion token overload
... to fix compile issues with boost 1.86.

Commit 9c665ae3c4 does the same
for wesnothd, but campaignd still fails to compile with
overload resolution failure.

References  #9284
2024-10-18 11:41:34 +02:00
Charles Dang
371ddd7716 GUI2/Rich Label: removed set but unused variable 2024-10-18 01:32:26 -04:00
Charles Dang
10594faa83 CI/CodeQL: target ubuntu 24.04 explicitly
I have no idea what's going on with the transition from ubuntu-latest from 22.04 to 24.04. It switched to 24.04, and now it looks like it's back to 22.04...

See https://github.com/actions/runner-images/issues/10636
2024-10-18 01:32:26 -04:00
Charles Dang
858268c19a CI: bump macOS runner to macos-13, since 12 is deprecated
See https://github.com/actions/runner-images/issues/10721
2024-10-18 01:32:26 -04:00
Subhraman Sarkar
af155b0cea about dialog: add entry for game manual 2024-10-18 00:41:49 -04:00
Descacharrado
52e132648d
Highlight reachable hexes instead of darkening unreachable hexes (#9292) 2024-10-17 23:23:53 -04:00
Charles Dang
38a6508cf4 Clean up a few more cases of raw pointer management 2024-10-17 23:20:50 -04:00
Charles Dang
491c236113 Config: deploy all_children_view en-mass 2024-10-16 09:36:59 -04:00
Steve Cotton
f120a00537 Fix location_palette's override of supports_swap
Rename location_palette::can_swap() to the correct name so that it
overrides as intended, thus making the UI disable the "swap fg and bg
items" button.

The class structure doesn't match the responsibilities here, as part
of UX isn't part of the palette, rather it's part of the tool that
decides whether there are fg and bg items - alternatively, the tool
decides whether right-click is "place bg item", "delete items", or
"show unit tool options". However, this change seems to be enough to
make the UX correct.

The "virtual" is redundant, but add it for consistency with the other
code in these classes.
2024-10-16 09:36:47 -04:00
Charles Dang
c33bb1fca3 Editor/Palette: remove unused cfg param from ctor 2024-10-16 02:41:22 -04:00
Charles Dang
c507e60b73 Editor/Palette: marked more functions override 2024-10-16 01:48:01 -04:00
Charles Dang
29191627fa
Rect: add padded_by, point_at, and subrect (#9465) 2024-10-15 23:42:16 -04:00
Pentarctagon
42d349a65d
swarm tests (#9454) 2024-10-15 17:31:01 -05:00
newfrenchy83
1c4d2f449f
Replace the recursion computation method with the less CPU-intensive config comparison method
When I use an ability id=A and include [filter][filter_adjacent]ability_id_active=A, the more units with the adjacent ability I add to it, the slower the game becomes, and at the third unit the game freezes, whereas with the direct comparison of the configs the game only slows down significantly after the 5th unit added.
2024-10-15 20:13:01 +02:00
Subhraman Sarkar
63d6fbf89d about dialog: fix typo 2024-10-15 20:07:36 +05:30
Subhraman Sarkar
cff803d2ef rich label fixes
1. don't add links to the global list during size calculation
2. reset draw cursor to x=0 after a text block
2024-10-15 20:07:36 +05:30
newfrenchy83
7665db46af remove 'experimental_' of filter_ability/specials tags
now what 1.18 separate of master branch it is time of aiming for that. "experimental_ preffix is depracated now.
2024-10-14 16:35:56 -05:00
Charles Dang
a96ce07e35 GUI2: remove standalone window build functions
The only place that used these was the lua show_dialog implementation. We can just construct the window object directly instead. Since this skips out on the finalize_build step (which in the case of modal/modeless_dialog was being called by those respective ctors), I've removed that function and merged it into the window ctor. No need to do it separately.

Builds on work in af81bba53b and 247e5ff055
2024-10-14 01:44:52 -04:00
Charles Dang
0eb8dc4540 CI/CodeQL: ubuntu-latest now runs 24.04 2024-10-14 01:23:02 -04:00
Charles Dang
44e21859b2 Editor/Palette: mark get_help_string const override
Note that location_palette::get_help_string is not virtual as it does not inherit from editor_palette (where the pure virtual get_help_string is defined) but rather common_palette.
2024-10-14 00:00:29 -04:00
Charles Dang
5a8123669d t_string: define move ctors and assignment operators 2024-10-13 22:59:10 -04:00
Charles Dang
beac3e2c8d Editor/Item: use VGETTEXT for help string 2024-10-13 22:59:10 -04:00
Charles Dang
7c042e41b2 GUI2: make use of utils::bullet_list
Might be able to use this in more places but these were the obvious ones.
2024-10-13 22:59:10 -04:00
Charles Dang
dfa8db1f72 Help: these shouldn't be t_strings 2024-10-13 22:59:10 -04:00
newfrenchy83
b03caa9205
Create in [filter_ability] an attribute 'active' to replace _active suffix in [filter_ability_active] (#9442)
Resolves https://github.com/wesnoth/wesnoth/issues/7926

[filter_ability] and [filter_ability_active] have been merged into a single filter equipped with the 'active' attribute which when the value is 'true' checks the units affected by the sought ability and when the value is 'false' or unset will check the units carrying the ability even if they are not affected by it.

Because of the attribute strategy, I'm afraid that the developer will be mistaken about its function and that's why I'm not at all keen on it but I want to get out of this impasse.
2024-10-13 16:37:31 -05:00
Gunter Labes
dbcd6527d2
Remove unused SDL_net framework 2024-10-12 22:42:38 +02:00
Tóth Kornél
76f20a6149
Better action WML error handling 2024-10-12 22:23:52 +02:00
Charles Dang
28414a933d Actions/Undo: use make_unique over new 2024-10-12 14:42:07 -04:00
Nils Kneuper
f79e8b444c updated Czech translation 2024-10-12 11:08:33 +02:00
Nils Kneuper
584248d8df updated Chinese (Simplified) translation 2024-10-12 11:07:15 +02:00
Gunter Labes
1689f5ed17
Add entry for theme type
Also reordered the types to match src/addon/validation.hpp.
2024-10-11 17:08:29 +02:00
Subhraman Sarkar
0a602e1c7c addon: reorder types and remove comment and remove "UI " from strings 2024-10-11 20:21:04 +05:30
Subhraman Sarkar
94b075d720 addons: remove commented out constants related to unused addon type 2024-10-11 18:37:15 +05:30
Charles Dang
8b86256e4a Format some ctor lists (no content changes) 2024-10-10 23:05:49 -04:00
Charles Dang
c5069a6036 Map Location: specialize steam operator for direction enum 2024-10-10 22:57:23 -04:00
Charles Dang
c815e1d23a Map Location: reimplement rotate_right as rotate_direction
Since rotate_right_around_center rotates a location, this makes it clear we're getting a rotated direction instead. Also made it constexpr
2024-10-10 22:57:23 -04:00
Charles Dang
f04e19934f Map Location: rename default_dirs and get_opposite_dir
all_directions better reflects the purpose of the former. Also made it return a value,
since the only places that used it immediately assigned it to a local variable.
2024-10-10 22:57:23 -04:00
Charles Dang
f4fda31707 Map Location: convert direction to a scoped enum 2024-10-10 22:57:23 -04:00
Subhraman Sarkar
08e514bc4b fixes broken tab order
The first SDL_KEY_DOWN handler is being called twice, while the second one is being called once.
The tab order handling is done by the first handler, which caused the focus to move *twice*, resulting in the erratic behavior when tab was pressed.
Moving the tab handling to the second one stops this and now focus moves only once when Tab is pressed.
2024-10-10 21:50:13 -04:00
Subhraman Sarkar
df167bdb43 add support for UI Theme addon type
With custom gui2 theme support in #9057, it is now possible to create addons that supply UI Themes or Skins.
This adds support so such addons are properly recognized and validated.
2024-10-10 21:49:38 -04:00
Subhraman Sarkar
1ca69e1eca move markup parser to markup.cpp/hpp 2024-10-10 01:31:14 -04:00
Subhraman Sarkar
c2757a1d35 markup refactor: replace hardcoded markup strings
Examples:
formatter() << "<b>" << "Hello" << "</b>" becomes just markup::bold("Hello")
formatter() << font::span_color(color) << text << "</span>" becomes formatter() << markup::span_color(color, text)
also adds markup.cpp/markup.hpp to XCode and CodeBlocks source files and removes text_formatting.cpp/hpp from projectfiles.
2024-10-10 01:31:14 -04:00
white-haired-uncle
d2e7fbbeb8
GUI2 LuaAPI: add clear_items() (#9418) 2024-10-09 01:37:03 -04:00
Charles Dang
56cc3aee0f
Config: remove implicit conversion to int and bool (#9444)
Resolves #9009, closes #9384. Besides the issues that came from having both int and bool conversions (even with bool marked explicit), it doesn't make sense to use int for all numeric assignments. I didn't test whether it would be an issue in practice, but it seems better to let callers be explicit about what type they want for numeric values than risking overflow or wrapping for very large values.
2024-10-09 01:36:10 -04:00
Tóth Kornél
f13d4fe2a4
Teleport path finding improvement (resolves #9434)
* Removed duplicate map_location hasher, removed unused teleport_id variable, dst_node reference is used at other possible locations, teleport destination heuristic distance now calculated before path finding loop only once, teleport source heuristic distance now stored in nodes, only calculated once and reused.

---------

Co-authored-by: SomeName42 <>
2024-10-08 17:17:02 -04:00
Gothyoba
36146c5c6c Properly capitalize Young Ogre description 2024-10-08 09:27:05 +11:00
ForestDragon
9f64e355f9
[Units][Jumpcat] Rebalance Stats (#9432)
Change Jumpcat from level 1 to level 2
Increase HP from 32 to 40.
Reduce MP from 9 to 7.
Reduce arcane resist from 20 to 10.
Increase cost from 15 to 26
Replace claws' parry with backstab, but reduce damage from 6-3 to 5-3
Remove accuracy from tail, but increase damage from 11-2 to 13-2
2024-10-07 14:27:45 -05:00
Gunter Labes
b1eb871df7
Schema: Add missing location filter attribute 2024-10-07 14:05:16 +02:00
doofus-01
422425f772
Update changelog.md 2024-10-06 18:00:41 -07:00
doofus-01
78c8ed24fb
1.19 Better mountains/elevation interactions (#9400)
* address bluffs-mountains transitions

* revise visual indicator of flood-filled elevation regions in editor

* small border versions of dry and basic mountain

* fix some frozen/elevated transitions

* address mini-map concerns in #8924
2024-10-06 17:51:54 -07:00
Tóth Kornél
9ca1c53b22
Fix in-game team names not reflecting game setup changes
Resolves #9407.
2024-10-06 21:57:34 +02:00
Yoruma
0e13a7e30f
Treat negative number of strikes as 0 instead of the unmodified amount
Fixes #9366.
2024-10-06 20:43:59 +02:00
doofus-01
a9637de7e7
various orc animations (#9289)
* touch-up to orcish warrior combat anims

* some pillager animations

* fix direwolf-rider shadow

* alternate orc warlord attack anim

* orc warlord victory anim
2024-10-05 18:25:06 -07:00
Wedge009
98aba787c4 Completed the update started in #9057. 2024-10-06 09:13:10 +11:00
Wedge009
558650bd14 Typography update for source code (in addition to .cfg data files previously reviewed). 2024-10-06 09:13:10 +11:00
Wedge009
5ec94b5904 Adding requested po hint.
[ci skip]
2024-10-06 09:13:10 +11:00
Wedge009
ca8a0aede8 Typography update. Closes #8000.
[ci skip]
2024-10-06 09:13:10 +11:00
Charles Dang
32e1bdb2e6 Help/Editor: shorten very long topic title 2024-10-05 15:19:52 -04:00
Charles Dang
ad736266c1 GUI2/Widget: add const overload of get_parent_grid 2024-10-05 15:19:20 -04:00
Charles Dang
2931816979 GUI2/Tree View Node: make use of emplace_back returning a reference 2024-10-05 15:18:48 -04:00
Charles Dang
9dc4a94533 Pango Text: avoid max short constant 2024-10-05 15:17:10 -04:00
Charles Dang
0fa0019127 Hide Load Turn button in MP (resolves #9308, closes #9428) 2024-10-05 15:12:30 -04:00
Nils Kneuper
d84669c8a8 updated Japanese translation 2024-10-05 15:07:31 +02:00
Nils Kneuper
58bc7ba4af updated Bengali translation 2024-10-05 15:06:48 +02:00
Subhraman Sarkar
ea3698665f rich label: fix wrong text splitting for pixel scale > 1 2024-10-05 15:57:06 +05:30
Charles Dang
736e45a197 Remove all occurrences of box=yes in editor help markup
Was non-functional anyway
2024-10-05 00:57:26 -04:00
Charles Dang
8079807146 Fixed broken table markup in Editor Palette topic 2024-10-05 00:55:23 -04:00
Charles Dang
2dd27fcf8e Help: fix unit type pages not showing up due to overscaling 2024-10-04 20:26:58 -04:00
Charles Dang
eccce783a9 GUI2/Help Browser: layout improvements 2024-10-04 20:26:23 -04:00
Charles Dang
57bd39d4a5
GUI2/Rich Label: minor cleanup (#9426) 2024-10-04 19:53:28 -04:00
OrekOrek
d9bb46ce37
Units are defined without [base_unit] tag (#9413)
Dark Horse, White Horse, Sand Scamperer, and Sand Scuttler are now defined without [base_unit] tag.
2024-10-04 17:30:19 -05:00
Gothyoba
1597fd0248 Typo fixes in EI _main.cfg 2024-10-04 08:57:54 -04:00
Gothyoba
fa3d421a85 Remove unused lua in THoT 2024-10-04 15:59:29 +10:00
Charles Dang
b1105e2c2f Config: add range-based access over child tags
This is meant as a lightweight replacement for all_children_range in cases where the iterator doesn't need to be stored (most cases). It has several advantages:

First, it avoids the custom iterator classes, making the code easier to read. It also means it should be composable with STL ranges in C++20. Further, you no longer get a mutable reference on a const config. Finally, it means intellisense can properly display the key/cfg types in a structured binding. When unpacking `config::any_child`, for some reason it shows up as a key/value copy instead of reference...
2024-10-03 23:40:41 -04:00
Charles Dang
61ac2e3f3f Config: fix value ctor not compiling with const config references 2024-10-03 23:40:41 -04:00
Charles Dang
187f10ea84 Config: added assignment to string&& 2024-10-03 23:40:41 -04:00
Dalas121
e7509c5dba
EI S14 "Drowned Plains" - rework scenario objective (#9411)
Change the EI S14 objective from "kill enemy leaders" to "gather gold". Reduce turn limit from 75 to 25.
2024-10-03 22:26:08 -05:00
Tóth Kornél
08c666156b
Action wml unit better error (#9402)
* Better error message for ActionWML [unit]

---------

Co-authored-by: SomeName42 <>
Co-authored-by: Gunter Labes <soliton@wesnoth.org>
2024-10-03 13:59:00 -05:00
Celtic Minstrel
4062f579e3
Fix #9360 2024-10-02 09:05:24 -04:00
Dalas121
2bec13a825
EI: update Dacyn arcane resistance to be consistent with the arcane rework (#9412)
* Twilight Mage: set arcane resist to 20%
* Fallen Mage: set arcane resist to -20%
2024-10-02 07:43:39 -05:00
Subhraman Sarkar
8267bc3d16 rich label: use columns instead of col_idx for last col width calculation 2024-10-02 10:41:19 +05:30
Gothyoba
1008296863 Change UtBS date from 300 to 1000 AF
This makes a lot more sense given how forgotten everything before the fall is by the time of UtBS. 300 AF is small enough for a few elves to remember the times before. 1000 AF is more sensible in my opinion.
2024-10-01 19:17:44 -04:00
Pentarctagon
ede10ca10c
slows tests (#9401) 2024-10-01 17:54:36 -05:00
Subhraman Sarkar
d2f6b171c0 help: fix misalignment in Unknown Unit page 2024-10-01 21:37:40 +05:30
Subhraman Sarkar
5e50ab2bf1 rich label: remove leftover debug_print 2024-10-01 12:54:47 +05:30
Subhraman Sarkar
a7420b80ea various rich label bugfixes 2024-10-01 12:39:34 +05:30
ForestDragon
d0688865ff
[Units][Skeletal Dragon] Adjust stats to be closer to 1.18 (#9403)
Skeletal Dragon saw very major buffs in #8541, which causes some concern about rebalancing and UMC. This reduces their stats closer to 1.18, though still moderately stronger.
2024-09-30 13:10:52 -05:00
Gothyoba
25718875f0 Fix a comment typo in THoT S6 2024-09-30 13:36:12 -04:00
Charles Dang
ea1d915c26 Display: remove scroll_to_tiles overload taking iterators
Was only used in two places, one of which was as the implementation of the version that took a vector. All the same arguments were accepted by both. Also use list initialization for the other overloads.
2024-09-30 02:39:31 -04:00
Charles Dang
bc971b45c9 Display: simplify get_middle_location 2024-09-30 02:36:06 -04:00
Charles Dang
17361198fe Display: use rect instead of SDL_Rect consistently 2024-09-30 02:34:48 -04:00
Charles Dang
07df161c96 Display: simplify tile_fully_on_screen
outside_area checks that the point is within the given rect reduced by hex_size(). Since that's the size of a location rect, the adjustment meant that a hex can't protrude outside the map area. This simplifies the logic using rect math instead of point math.
2024-09-30 02:32:15 -04:00
pentarctagon
d4e7f5bc43 remove unsigned_matches_if_present 2024-09-29 23:19:39 -05:00
pentarctagon
d278ae9c5f poison ability tests 2024-09-29 22:15:47 -05:00
Gunter Labes
9c665ae3c4
Use completion token overload to fix compile issues with boost 1.86
Keep behavior of previous (now deprecated) overload by rethrowing exceptions.

Fixes #9284.
2024-09-29 19:30:56 +02:00
Subhraman Sarkar
961a6a5802 fix problematic find_widget usage and slightly rewrite the logic (#9388) 2024-09-28 12:43:34 -04:00
newfrenchy83
68a1d1139f add documentation for explain why presence of cfg attribute isnecessary in some case. 2024-09-27 22:24:03 -05:00
newfrenchy83
cea9b82863 filter attribute integrates the tag_name check to verify that the attribute sought can be used there.
reuse partially 1493faeaee but don't remove check cfg. Thanks to @Pentarctagon

if for example the ability filter searches for the value of 'active_on' in an ability 'leadership' then the false value will be returned because active_on is not an attribute usable in [leadership]

on the other hand if the ability is of type 'dummy' its encoding remaining at the discretion of the UMC developer, the checking can be done normally
2024-09-27 22:24:03 -05:00
newfrenchy83
66103e4d4e reorganize attribute of [experimental_ability_filter] and add documentation.
resolve https://github.com/wesnoth/wesnoth/issues/7992 issue
2024-09-27 22:24:03 -05:00
Nils Kneuper
4870ff66bd updated Chinese (Simplified) translation 2024-09-28 00:58:36 +02:00
pentarctagon
d20128530a fix clang warning for signed unsigned comparison 2024-09-27 13:20:08 -05:00
Charles Dang
1d5d73b75a Language: remove excessive logging 2024-09-27 12:35:24 -04:00
Charles Dang
67335a514d Unit: don't return const values 2024-09-27 12:34:19 -04:00
Charles Dang
a832ed8b2e Continue putting display::get_location_rect to good use 2024-09-27 12:23:02 -04:00
Steve Cotton
3e464cb856 The NOT_DANGLING specifier should be before the const attribute
Fixes a warning with GCC-14.
2024-09-27 10:38:14 -04:00
pentarctagon
82c7b4c7eb use the correct editor dir location
fixes issue brought up on the forums: https://forums.wesnoth.org/viewtopic.php?t=58725
2024-09-27 08:41:54 -05:00
Charles Dang
1d9f57a668 Config: more structured bindings for attribute_range 2024-09-27 03:22:35 -04:00
Charles Dang
95c9f0c720
Config: use structured bindings with all_children_range (#9387) 2024-09-27 02:49:57 -04:00
Subhraman Sarkar
5913cfdf55 remove unnecessary std::ref(window) 2024-09-27 06:04:57 +05:30
Subhraman Sarkar
f5906d6224 remove find_widget.hpp 2024-09-27 06:04:57 +05:30
Subhraman Sarkar
298065e1bd remove window param from pre/post_show 2024-09-27 06:04:57 +05:30
Subhraman Sarkar
c7d9c0f5b0 find widget signature changes 2024-09-27 06:04:57 +05:30
Severin Glöckner
43e1d183e5 fix in German translation
[ci skip]
2024-09-26 02:28:04 +02:00
newfrenchy83
291e4bb0e5 update codeblock projectfiles 2024-09-24 14:39:39 +02:00
Soliton
2f8d471e80
Remove any_tag for a more useful schema validation 2024-09-24 08:58:11 +02:00
Subhraman Sarkar
32c528501f help browser: remove unnecessary lines
cleans up some print statements and comments out code
2024-09-24 12:23:03 +05:30
spixi
0e326894cb
Add missing [then] from 6f15150 2024-09-24 08:35:30 +02:00
Charles Dang
1261d88b15
Removed a bunch of unused GUI1 stuff (#9375)
Don't need these now that the GUI2 help browser is merged.
2024-09-23 23:54:47 -04:00
Celtic Minstrel
53cb294b4e Use unicode_cast instead of wstring_convert 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
ca7fad97c6 rich label: increase padding 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
1436f4f69b help topic generator: complete movement costs table 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
cfe4924b5e canvas: remove unnecessary variables and attr["name"] -> name 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
ee82b0ec10 rich label: refactor and framework for width shrinking 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
22677e57c7 wmlindent change 2024-09-23 19:49:44 -04:00
Celtic Minstrel
58ef02b74a Missed removing a col=2 from a table 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
aa3006c883 miscellaneous fixes 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
6ec5af83df update help pages and generators 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
db5ea45ffb improve inline image support and autocount table columns
tables columns are automatically counted and col key is removed
2024-09-23 19:49:44 -04:00
Subhraman Sarkar
a1dbcdc9f5 inline image text support
some extra y space is still getting added somewhere
2024-09-23 19:49:44 -04:00
Subhraman Sarkar
f611188cd4 help_impl.cpp cleanup 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
069a0c659d rich_label: move attributes to ctor 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
dc68d261ca improve nested formatting tag support 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
449689a37c more refactoring and rudimentary nested formatting tags 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
9e891fbd78 refactor: remove some global variables and simplify add_image 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
9c46869585 remove "jump" and table-specific "br" behavior 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
7fdf4848db updated help pages to use nested table tags 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
f1bc261c62 nested table tag improvements and global var removal 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
6a1de922bd nested table tag (preliminary)
new syntax:
<table><row><col>text</col>...</row><row>...</row>...</table>
2024-09-23 19:49:44 -04:00
Subhraman Sarkar
3c4dd9628b typo fix 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
beaba772cc tree view: stop scrollbar from jumping to top during layout 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
2adab6593a improve link calculation with non-zero padding 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
e1c87a24a8 rich_label: allow width key to be a wfl formula 2024-09-23 19:49:44 -04:00
Celtic Minstrel
570d358110 pango_text: apply scaling to size attribute runs 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
0b4611abb4 Fix scrollbar bug when not initialized with text, add link click sound 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
ae8d107c65 add default font size to canvas 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
5ec7bee190 enforce max text width and remove wrong <br/> 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
8ab6d2458a help browser: fix weird spacing and alignment issue in treeview
thanks to Vultraz for helping with the fix
2024-09-23 19:49:44 -04:00
Subhraman Sarkar
470c3da79c update editor help pages to new markup 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
518e733dd2 minor fixes 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
b46a04bc1f update markup in terrain editor pages 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
bbb728c927 fix whitespace 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
e6c36b914e update help markup in terrains page 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
5f32302c00 text renderer: update documentation of add_attribute methods 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
76780d1fb0 update help markup in faction descriptions 2024-09-23 19:49:44 -04:00
Celtic Minstrel
586fbec882 Update GUI2 schema to match existing implementation of text attributes 2024-09-23 19:49:44 -04:00
Celtic Minstrel
6eed9522e4 Rich label: Add fallback handling for unknown character entities 2024-09-23 19:49:44 -04:00
Celtic Minstrel
65124f30d7 Help markup: Add a unit test for unknown character entities 2024-09-23 19:49:44 -04:00
Celtic Minstrel
ecd93adb8e Fix indentation 2024-09-23 19:49:44 -04:00
Celtic Minstrel
5f47ea6643 Help markup: add more unit tests and fix a small parser issue 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
63497a9d27 add method xy_to_index and use it to calculate wrap position 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
6d670f11c6 rich_label: use new get_line method 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
8bca642854 refactor attribute system and rename set_highlight_area 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
5958ca209e reformat the ToD page and bugfixes
Although not perfect, this makes the page usable. Using the previous version leads to multiple complex bugs at this point.
also stops a y calculation bug in table.
2024-09-23 19:49:44 -04:00
Subhraman Sarkar
b109bda9d4 correctly add paragraph break height in [text] tag 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
e4bffc04ce improve manual linebreak functionality outside table
also reformats some broken pages with manual breaks
2024-09-23 19:49:44 -04:00
Subhraman Sarkar
ce9d3bdc38 insert paragraph breaks correctly 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
b1fc4701aa rich label: fix broken tables and reorganize code 2024-09-23 19:49:44 -04:00
Celtic Minstrel
62c03ad779 Help markup parser: Avoid UB and unused param when checking closing tag 2024-09-23 19:49:44 -04:00
Celtic Minstrel
2e3c401f45 Help markup parser: Fix some issues with auto-closed tags 2024-09-23 19:49:44 -04:00
Celtic Minstrel
d910171b3d Rewrite the help markup parser.
It is now roughly a superset of Pango and supports the following new features
* XML character entities, including decimal and hex entities, common named entities (apos, quot, lt, gt, amp), and even unrecognized named entities
* Nesting tags within each other (new-style only)
* Attributes without a value
2024-09-23 19:49:44 -04:00
Subhraman Sarkar
14e6d1c5fe rich label bugfixes 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
72f1f0007c new definitions for label and new font size macros 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
21906c9bf4 help text adjustments to new markup (partial) 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
fe9de2f638 convert help_topic_generator to new markup (partial) 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
78ca6f50a9 help browser changes
1. back/forward button functionality
2. some ui adjustments
3. use rich_label
2024-09-23 19:49:44 -04:00
Subhraman Sarkar
f318ac0d11 various rich_label bugfixes 2024-09-23 19:49:44 -04:00
Charles Dang
03e11a62e1 Removed GUI1 Help interface code
Not needed anymore since we're moving to GUI2 for this dialog.
2024-09-23 19:49:44 -04:00
Charles Dang
e6c0064755 Help: removed code to show old GUI1 help browser
Attempting to launch it crashes the game (probably to do with a null video surface),
and since it's being replaced there's no point in restoring it to functionality.

The implementation details (help_menu, etc) have been left for now. Will remove soon.

This also means the GUI2 help browser is shown by default now.
2024-09-23 19:49:44 -04:00
Charles Dang
ee82387c3d Some build fixups to reflect changes since the help commits were originally made 2024-09-23 19:49:44 -04:00
Charles Dang
1b20d04d07 Help Browser: removed help topic padding 2024-09-23 19:49:44 -04:00
Charles Dang
b3babea922 Help Browser: fixup topic title layout 2024-09-23 19:49:44 -04:00
Celtic Minstrel
0480131fd6 Help Browser: Support arbitrary initial topic
Hidden topics still untested.
2024-09-23 19:49:44 -04:00
Celtic Minstrel
5996cba135 Help Browser: Don't double-list a section's root topic 2024-09-23 19:49:44 -04:00
Celtic Minstrel
ada7b50403 Help Browser: Show topic title 2024-09-23 19:49:44 -04:00
Celtic Minstrel
bbf6df2ddf Help Browser: Fix back button being visible when dialog opens 2024-09-23 19:49:44 -04:00
Charles Dang
6144b5e778 Help Browser: properly implement toggling by clicking the book icons 2024-09-23 19:49:44 -04:00
Celtic Minstrel
f96aa94e03 Fix GUI1 help topics not showing 2024-09-23 19:49:44 -04:00
Celtic Minstrel
5fffe8539f Help Browser: Implement history 2024-09-23 19:49:44 -04:00
Charles Dang
f52bb4f098 Moved new help entry point to a common location 2024-09-23 19:49:44 -04:00
Charles Dang
28dd0f8a68 Help Browser: implemented viewing of sub-sections/topics 2024-09-23 19:49:44 -04:00
Celtic Minstrel
bf4f02bdcf Help Viewer: Parse help markup to Pango markup... mostly.
The help parser now outputs a config rather than a vector of strings of
which some should be taken literally and others parsed as WML.
2024-09-23 19:49:44 -04:00
Charles Dang
b6079891a8 Help Browser: improved layout stability and added next/back buttons (non-functional, of course) 2024-09-23 19:49:44 -04:00
Celtic Minstrel
3aa6993a32 Help: That parameter isn't really needed 2024-09-23 19:49:44 -04:00
Celtic Minstrel
63ad2f4875 Help Viewer: Show topics with generated text 2024-09-23 19:49:44 -04:00
Celtic Minstrel
38bfb1838a Help Browser: Actually show the correct topics with the correct icons
This also fixes the lag when opening help and makes the topic text appear.
(The topic text is not parsed at the moment, though.)
2024-09-23 19:49:44 -04:00
pentarctagon
815e3fe90b add clang-tidy 2024-09-23 17:44:02 -05:00
Pentarctagon
bd8322a40b
add code documentation for the tokenizer (#9354)
Also clean up/simplify the code a bit.
2024-09-23 13:29:43 -05:00
newfrenchy83
feef53d4ab
Add an 'alignment' attribute to attacks
This attribute, when set to a valid value of lawful|neutral|chaotic|liminal, will assign to the weapon a different alignment than the unit alignment used by default. This alignment is then used when attacking with this weapon.

The attribute is not accessible from lua so far since the fallback to unit alignment does not work.
2024-09-23 17:11:46 +02:00
Charles Dang
363241faf9 GUI2/Tab Container: set members from builder 2024-09-23 10:02:32 -04:00
Charles Dang
12d4a11959 Halo: simplify effect::set_location 2024-09-23 10:01:47 -04:00
Charles Dang
09e7ed97e8 Further deploy display::get_location_rect 2024-09-23 09:55:53 -04:00
Charles Dang
85309bd93c
Display: simplify add_overlay interface (#9371)
Instead of passing all the arguments for an overlay to display::add_overlay, just take an rvalue-reference to an existing overlay object.

The overlay ctor was adjusted. It no longer takes a halo::handle argument, and the display class sets that manually.
2024-09-23 01:47:42 -04:00
Nils Kneuper
8a35469a05 updated Italian translation 2024-09-22 20:10:16 +02:00
spixi
6f15150d99
DW S9: Improve event handling of undead and bats on the players' side
Add dialog for the cases of a bat or undead entering Caladon's house
that does not lead to victory to prevent the scenario from being too easy.
2024-09-22 18:36:57 +02:00
Jonathan-Kelly
a8d68165ec
UtBS: Cut duplicate stun weapon special remnants
Cut extra icon and lua code for 'stun' weapon special.
An identical copy was already moved to core by #7323 and stun in UtBS was removed long ago anyway.
2024-09-21 18:42:19 +02:00
Charles Dang
fe7d94a2f2 Don't manually specify default predicate for config::remove_children 2024-09-21 11:51:28 -04:00
Charles Dang
0664724c99 Editor/Context: don't copy config in lambda... 2024-09-21 11:47:36 -04:00
pentarctagon
615855ebb5 fixup indentation 2024-09-21 10:38:24 -05:00
Nils Kneuper
6836af62a6 updated British English translation 2024-09-21 00:05:23 +02:00
Nils Kneuper
d5d1820286 updated Finnish translation 2024-09-21 00:04:28 +02:00
Nils Kneuper
c7baa6025c updated Turkish translation 2024-09-21 00:03:27 +02:00
Charles Dang
7380885226 Display: add get_location_rect 2024-09-19 15:03:22 -04:00
Gothyoba
7bd657e2a5 Increased text size for UMC Author note in terrain elevation help page 2024-09-19 11:15:02 -04:00
Subhraman Sarkar
b6dead682b clipboard: remove redundant methods 2024-09-18 23:01:46 -04:00
Subhraman Sarkar
355ed849ee scroll_text: make components look more integrated 2024-09-18 23:01:46 -04:00
Subhraman Sarkar
54535fca3b scroll_text: markup and link awareness support
support for copying and partial editing only.
this does not make multiline_text a rich text editor.
2024-09-18 23:01:46 -04:00
Subhraman Sarkar
6023eb338c chatbox: use scroll_text so text can be copied 2024-09-18 23:01:46 -04:00
Subhraman Sarkar
a682adb264 text_renderer: markup support in insert_text and some refactoring 2024-09-18 23:01:46 -04:00
Charles Dang
1011c0f58a GUI2/Tab Container: clean up unnecessary grid 2024-09-18 20:13:32 -04:00
Charles Dang
3b07a7c76e MP/Method Selection: new design 2024-09-18 19:42:45 -04:00
Charles Dang
05f4e21951 Display: clean up the FPS counter implementation
* Makes it more type-safe by using chrono types more directly.
* Fixes a few design issues, such as the current time point being taken multiple times when updating the data.
* Fixes min and max FPS times being swapped
* Improved display
2024-09-18 18:15:22 -04:00
Charles Dang
fc1409e2d1 MP/Staging, Join Game: improve sidebar layout 2024-09-18 16:09:07 -04:00
Charles Dang
02cbdc83aa GUI2/Tree View Node: doc typo fixes 2024-09-18 16:08:13 -04:00
Charles Dang
1803cb6d54 Config: fold over one-liner packs 2024-09-18 15:42:21 -04:00
Charles Dang
4d086b6db4 Config: attempt to reenable append_children optimization 2024-09-18 15:42:21 -04:00
Charles Dang
a52c5e133a Game Lua Kernel: simplify a horrendous loop
This can't be done in a simple loop over all_children_range since splice_children modifies
the source config. This adds a new getter method for a view over all tag names.
2024-09-18 15:42:21 -04:00
Charles Dang
39729290df GUI2: optimize create_widget_builder
No need for all this config searching... there's only one tag!
2024-09-18 15:42:21 -04:00
Charles Dang
5f31a5b2fd Game Lua Kernel: simplify dummy AI stage cleanup 2024-09-18 15:42:21 -04:00
Charles Dang
97d61649f0 Game Events/Handler: initialize all members 2024-09-18 15:42:21 -04:00
pentarctagon
ea8cdf9282 1.19.4+dev 2024-09-17 21:22:35 -05:00
pentarctagon
ff9c4461ae 1.19.4 2024-09-17 21:21:55 -05:00
pentarctagon
1ba012f05c pot-update and regenerate doc files 2024-09-17 21:20:42 -05:00
pentarctagon
4c8dc3d8f3 changelog_entries 2024-09-17 21:18:23 -05:00
Celtic Minstrel
14df301b7f Wrap all LATTR_[GS]ETTER macros in anonymous namespaces
Without this, seemingly random link errors occur when either file is modified.
2024-09-16 23:20:50 -04:00
Jonathan-Kelly
c4610a0283 Tests of events in [abilities] and [specials] tags 2024-09-16 21:07:38 -04:00
Jonathan-Kelly
bddbf060a5 Support events in [abilities] and [specials] tags 2024-09-16 21:07:38 -04:00
Gunter Labes
fb42d4b5ac
Don't redirect --usercache-path 2024-09-16 22:56:13 +02:00
Gunter Labes
47aac28db1
Correct error message 2024-09-16 22:56:13 +02:00
Gunter Labes
41f37021bd
Fix formatting issues 2024-09-16 22:56:13 +02:00
Gothyoba
4cb3b8fd82 Use proper apostrophe to spell Shek’kahan 2024-09-17 06:51:40 +10:00
Celtic Minstrel
711b77b7e2 Lua API: Add __dir metamethod to wesnoth.terrain_types 2024-09-15 15:27:39 -04:00
Celtic Minstrel
cb1853b4bc Lua API: Add __dir metamethod to side objects 2024-09-15 15:27:39 -04:00
Celtic Minstrel
c7ad093ac5 Lua API: Avoid trying to iterate a userdata in location_set.of_pairs
Fixes #9345
2024-09-15 15:27:39 -04:00
Celtic Minstrel
78360a582e Lua API: Add __dir metamethod to wesnoth.unit_types, wesnoth.unit_types.TYPE, wesnoth.unit_types.TYPE.variations 2024-09-15 15:27:39 -04:00
Celtic Minstrel
b977496dcb Lua API: Add a mechanism for userdata to declare that they are "table-like" for the purpose of the __dir metamethod
This can serve as a hint that you can dig down into them.

Use the mechanism for wesnoth.colors, wesnoth.game_config, and wesnoth.current.
2024-09-15 15:27:39 -04:00
Celtic Minstrel
a690d780cb Lua API: Add __dir metamethod to wesnoth.game_events
The purpose of this is to show all potential hooks in the output, not just the hooks that are currently assigned.

This alse adds an __index metamethod that returns no-op versions of each callback, so that the __dir output correctly shows them as functions.
2024-09-15 15:27:39 -04:00
Celtic Minstrel
6f0567df8f Lua API: Add __dir metamethod for wesnoth.game_config 2024-09-15 15:27:39 -04:00
Celtic Minstrel
03924aac1d Lua API: Remove deprecated wesnoth.game_config attributes 2024-09-15 15:27:39 -04:00
Celtic Minstrel
1079d2541d Lua API: Exclude campaign, era, and mp_settings from scenario __dir as appropriate 2024-09-15 15:27:39 -04:00
Celtic Minstrel
5bbca1a1c9 Lua API: Exclude color ranges with numeric names from the __dir output
In general they are not supposed to have numeric names, but several with numeric names exist for backwards compatibility.
2024-09-15 15:27:39 -04:00
Celtic Minstrel
d7eba7b950 Lua API: Add __dir metafunction to schedule objects
This covers both wesnoth.current.schedule and the objects returned by wesnoth.map.get_area()

Also, the wesnoth.schedule module is no longer treated like the schedule metatable, since none of the functions in the module take a schedule as the first argument. This may be reverted in the future.

The attribute registration system has also been extended to permit registry tables to conditionally add certain keys.
2024-09-15 15:27:39 -04:00
Celtic Minstrel
facf4eefda Lua API: Add __dir metamethod to wesnoth.scenario 2024-09-15 15:27:39 -04:00
Celtic Minstrel
dd5dbf96c8 Lua API: Add __dir metamethod to wesnoth.current 2024-09-15 15:27:39 -04:00
Celtic Minstrel
fcd66c25a3 Lua API: Add __dir metamethod to wesnoth.interface.game_display 2024-09-15 15:27:39 -04:00
Celtic Minstrel
c32ae8146e Lua API: Add __dir metamethod to unit variables and unit statuses 2024-09-15 15:27:39 -04:00
Celtic Minstrel
d4278fa1be Lua API: Add __dir metamethod to units metatable
This implements a new system for registering attributes, adapted from the system for widget attributes.
2024-09-15 15:27:39 -04:00
Celtic Minstrel
ab022c09ae Lua API: Add unit:rebuild
Fixes #9314
2024-09-15 15:27:39 -04:00
Celtic Minstrel
6d8a17aa8d Lua API: Add mathx.lerp_index and wesnoth.game_config.palettes 2024-09-15 15:27:39 -04:00
Celtic Minstrel
752f251a93 WFL: Add lerp_index and get_palette functions
The latter exposes access to the [color_palette] tags in game_config, as well as the colour scales.
2024-09-15 15:27:39 -04:00
Celtic Minstrel
fc86cb0b93 WFL: Add replace_all, starts_with, and ends_with string functions.
The latter two are also added to the Lua stringx module.
2024-09-15 15:27:39 -04:00
Celtic Minstrel
1b63da9974 Lua API: Named tuples no longer all have the same __metatable
Now the __metatable contains the list of member names.

This means that wesnoth.type won't treat named tuples with different members as the same thing – not evne if they're the same length. Which is probably a good thing!
2024-09-15 15:27:39 -04:00
Celtic Minstrel
2a26a68025 Some updates to Lua map location operations
* Rename the vector operations to hex_vector (to emphasize that they are NOT standard vector ops) and document them as official API
* Add new get_hexes_at_radius, which returns an unfilled ring (as opposed to get_hexes_in_radius which returns a filled circle)
* Expose the new cubic coordinate conversions
2024-09-15 15:27:39 -04:00
Celtic Minstrel
6547d224e0 Remove map_location::get_in_basis_N_NE
It was ONLY used in one place, to calculate rotate_right_around_center, and was likely not a very efficient way of calculating that anyway. I've included a different implementation of rotate_right_around_center that uses cubic coordinates.
2024-09-15 15:27:39 -04:00
Celtic Minstrel
81e612b75b Fix copy-paste error 2024-09-15 15:27:39 -04:00
Celtic Minstrel
ca52118ff0 Lua/WFL: Expose healthy and fearless attributes 2024-09-15 15:27:39 -04:00
Charles Dang
0af60e6fcc Display: use split_view when parsing overlay teams
We have references to existing strings here. No need to make copies with `split`.
2024-09-15 12:23:02 -04:00
Charles Dang
ccdc8b17f4 Fixup 3af690331a
Its not Lua.
2024-09-15 12:22:45 -04:00
Gunter Labes
654a199d5f
Use proper apostrophe 2024-09-15 13:13:29 +02:00
Charles Dang
3af690331a Lua API: remove deprecated unit.side and terrain.owner 2024-09-15 01:43:11 -04:00
Charles Dang
78676a27ad Use structured bindings for config attribute ranges in most places 2024-09-15 00:16:51 -04:00
Charles Dang
857799da37 Config: remove <ctime> and <iterator> includes 2024-09-15 00:16:51 -04:00
Charles Dang
6df2653c61 Config: use structured bindings 2024-09-15 00:16:51 -04:00
Charles Dang
a9e6af20d3 Config: avoid second lookup when adding child nodes 2024-09-15 00:16:51 -04:00
Charles Dang
7332e124eb Config: remove string and const char* overloads for operator[]
Since these just construct a string_view from their arguments, we can just let the implicit conversion happen.
2024-09-15 00:16:51 -04:00
Charles Dang
c34a18da47 Config: fix a couple functions not taking string_view args 2024-09-15 00:16:51 -04:00
gfgtdf
ff9ccabbee
Fix #9190 error in Lua mapgen 2024-09-15 03:24:05 +02:00
Oleksii
094918c5ac
LoW: some fixes for S10, S22 (#9128)
* fixes for S10, S22
* fixes for #7137 #8359 #8360
* fixes for #7137 #8359 #8360
* fixes for #7137 #8359 #8360
2024-09-14 15:00:02 -05:00
ZombieKnight
4f7ae435dd
Make status orb work with custom max/min_range (#9255)
This code sets orb color to can-still-make-an-action if unit has no moves left,
and has a visible enemy within max and min range of a weapon.  This also affects
if the unit is selectable with 'N' (units that can move or attack).

Currently, it doesn't affect the mainline much, as no unit has a weapon
max/min_range different from 1, most notice-able, it marks units with no attack
as incapable of action, after having no moves left.

The purpose of this is part of getting real-ranged attacks into the mainline.
2024-09-14 19:07:54 +02:00
Gunter Labes
ed354c1d41
Remove pointless closure 2024-09-14 18:22:32 +02:00
Nils Kneuper
ee7d026daf updated Bengali translation 2024-09-14 12:02:16 +02:00
Nils Kneuper
64cc8af1d7 updated Czech translation 2024-09-14 00:47:59 +02:00
Nils Kneuper
934385ed08 updated Ukrainian translation 2024-09-14 00:46:58 +02:00
Nils Kneuper
6f09098adc updated Italian translation 2024-09-14 00:45:53 +02:00
Nils Kneuper
bcc1c68359 updated Chinese (Simplified) translation 2024-09-14 00:44:55 +02:00
Gunter Labes
c53cb1d6fb
Add missing tags to game config schema 2024-09-13 21:59:04 +02:00
Gunter Labes
41729833c8
Include the unknown condition in the error message 2024-09-13 21:50:17 +02:00
Gunter Labes
0681b41323
Update wesnothd synopsis 2024-09-13 21:43:28 +02:00
Steve Cotton
7f8e3344cf Add a second unit test for TEST_FORCE_CHANCE_TO_HIT
It should work even when the macro appears in the same event as the
attack; this tests that.

The new one uses the COMMON_KEEP macro, but I've left the existing
one unchanged, except for the renaming.
2024-09-13 19:15:56 +02:00
Subhraman Sarkar
14732806c9 Preferences: move the Apply button and disable it unless needed
this also makes it obvious that the Apply button is used only for UI theme selection, and is not a global Apply button
2024-09-11 15:07:49 -04:00
Wedge009
b316ee518b
Extend case-insensitive filtering beyond ASCII characters (#9332)
This updates filtering for:
* Game Load dialogue
* MP lobby
* In-game label and unit search
* Add-ons client (now used consistently)
2024-09-11 14:42:45 -04:00
Gunter Labes
ad85d62f7d
Remove useless comment 2024-09-11 11:58:55 +02:00
white-haired-uncle
730c5d3ffa
GUI2/LuaAPI: add len operator to container widgets (#9335) 2024-09-10 22:25:06 -04:00
Charles Dang
2d765118ed Clean up use of chrono types in log code 2024-09-10 21:09:27 -04:00
pentarctagon
d32a363ae8 plague tests 2024-09-10 18:14:50 -05:00
newfrenchy83
aec9948c6d Remove unit recursion of special_unit_matches()
Like unit recursion depth is to 3 and attack recursion 4, what count begin if and only if ability_(id/type) active called is more appropriate.
2024-09-10 18:14:39 -05:00
Toom
4ef1e78a38 Clarify unit type description label
Unit description is not yet implemented. Once it is, I expect menu item is changed back to unit description, while the opened dialog has link to navigate to unit type description.
2024-09-10 18:14:13 -05:00
newfrenchy83
33976efcfc add 'core' folder in folder list of boost folder used in include 2024-09-10 16:15:37 +02:00
Subhraman Sarkar
47642719bf Update the help page entry for the Item tool to reflect that removal is now possible 2024-09-10 06:14:34 +05:30
Gunter Labes
91e6daad23
Fix image file name 2024-09-09 18:18:17 +02:00
Gunter Labes
45558f52ee
Use correct wesnoth option 2024-09-09 16:22:01 +02:00
Charles Dang
e814a48f40 GUI2/File Dialog: clean up definition 2024-09-09 09:09:22 -04:00
Gunter Labes
7c0e406d48
Only run WML tests once and upload WML test data 2024-09-08 22:51:47 +02:00
Charles Dang
dfd9429e0d Simplify prefs::get_system_username 2024-09-08 15:14:00 -04:00
Gunter Labes
4991005765
WC: Explain that you can also add data via resources 2024-09-08 19:54:42 +02:00
pentarctagon
40ef4dbbf4 Revert "Bump min Boost version to 1.82 (#9317)"
This reverts commit 7c60174ad1.
2024-09-08 10:25:45 -05:00
pentarctagon
08d3f3be88 Revert "Add utils::span wrapper (#9318)"
This reverts commit 686eb30d41.
2024-09-08 10:25:36 -05:00
newfrenchy83
5c9065eb7e change calculation rules so that add and sub are always used independently
when two special weapons use multiply and divide with the same id, both operations are used, isn't that so why should it be different with 'add' and 'sub' where it's the larger value that is used (if asub=value_sub and add=value_add are used and value_sub>value_add then value_sub is used). This logic is counter-intuitive. that multiplication/division is applied to (base_value +- add/sub) is understandable but not this discrimination. For me add and sub should still be usable; even if it means changing the rules, but I think we will gain clarity in the end.
2024-09-08 14:16:28 +02:00
Charles Dang
686eb30d41
Add utils::span wrapper (#9318) 2024-09-08 02:38:24 -04:00
Charles Dang
7c60174ad1
Bump min Boost version to 1.82 (#9317) 2024-09-08 00:58:32 -04:00
pentarctagon
9e756f9fc5 petrifies tests 2024-09-07 19:53:08 -05:00
Gunter Labes
81229241bb
Fall back to master data dir (for dev versions for example) 2024-09-07 21:10:27 +02:00
Steve Cotton
547de5fd93 Test calculations of abilities with add and sub
Fix a typo in the add_sub_separated test, because it was testing
exactly the same code as add_sub_cumulative.

Add two new tests and clarify documentation, because in these tests
the order of the abilities determines whether the add or sub value is
used, it isn't that sub always overrides add.
2024-09-07 21:02:39 +02:00
newfrenchy83
c5351fb998
Fix recursion ability count version (#9296)
I use the same method what in master for weapon special recursion.
2024-09-07 16:45:26 +02:00
Nils Kneuper
20df59154d updated Arabic translation 2024-09-07 14:46:28 +02:00
Nils Kneuper
f61883c454 updated Chinese (Simplified) translation 2024-09-07 14:45:34 +02:00
newfrenchy83
02c599e59a fix submerge item issue
fix https://github.com/wesnoth/wesnoth/issues/9305 issue.

et_suv was not include in if loop condition and submerge calculation made a multiply by zero.
2024-09-07 01:04:43 -04:00
Charles Dang
704ab36e24 Unit: clean up hp/xp color getters 2024-09-06 23:08:40 -04:00
pentarctagon
2c840acc68 try this baseline 2024-09-06 12:15:21 -05:00
pentarctagon
c8fbbadc27 fixes VS build issues apparently 2024-09-06 09:13:05 -05:00
Subhraman Sarkar
adef779ed9 unit type editor: various ui improvements and bugfixes
1. race/alignment/attack damage type/attack range show corresponding icons
2. attack damage type/range now use comboboxes for custom dmg types/ranges
3. quit confirmation added to cancel button so that user doesn't accidentally lose their data
2024-09-06 09:02:05 +05:30
Subhraman Sarkar
a25d10bbed editor: show "Map Saved" and "Scenario Saved" messages as floating label
gui2 messages grab mouse focus (modal dialog), so the user needs to click on it first before doing anything else
2024-09-06 09:02:05 +05:30
Subhraman Sarkar
fe9aeb6548 editor controller: show unit menu when addon selected and simplify code
1. When addon is selected using Add-ons > Select active Add-on, the Unit menu will get activated so that the unit type editor can be used
2. Simplify initialize_addon_if_empty, returns success value as bool
2024-09-06 09:02:05 +05:30
Subhraman Sarkar
3269d703b2 file dialog: improve checking and adjust strings
1. selecting an item from the file list will cause validation to run
2. strings adjusted so they are correctly picked up by gettext
2024-09-06 09:02:05 +05:30
Subhraman Sarkar
346c7c38b3 file dialog: add user bookmarks to correct category (fixes #9298) 2024-09-06 09:02:05 +05:30
Subhraman Sarkar
7065ed9fde item tool: add right-click to remove functionality 2024-09-06 09:02:05 +05:30
newfrenchy83
979289b579 fix tag_name check deficiencies
The tag_name check is deficient for two reasons:
1.when apply_to=both is used, in the case of [damage_type] [filter_opponent][filter_weapon]type= will check the modified type for application to the owner and the original type for application to the opponent, hence a risk of infinite recursion, especially if [filter_self][filter_weapon]type= is used in the same weapon.

2. in the case of apply_to=attacker/defender, the check for [filter_attacker/defender] must take into account both the value of the variable is_attacker but also the application AFFECT_SELF/OTHER, otherwise in the case apply_to=defender with [filter_defender][filter_weapon]type=, and[filter_attacker][filter_weapon]type= otherwise we end up in the same configuration as for apply_to=both

Finally tag_name is renamed check_if_recursion to mean that this variable is used to ensure that a recursion cannot be set up even if 743b146efc prevents it from causing a crash but with an error log
2024-09-05 18:35:35 -05:00
Charles Dang
d6f922f990 Remove a redundant getter 2024-09-05 15:44:06 -04:00
Charles Dang
2d01fddd26 Clean up unit ellipse rendering code 2024-09-05 15:42:54 -04:00
Charles Dang
a46c3c0051 Image Check: exclude deleted files 2024-09-05 12:38:46 -04:00
Subhraman Sarkar
9c732d41f1
use the already hardcoded list in unit_alignments (#8731) 2024-09-05 16:50:56 +05:30
Ethan-Nowa
eff8301cac
NR05a: Vary dialogue to better suit the speaker (#8830)
I changed some of the lines in NR The Pursuit to fit better with the different characters. Tallin, Abhai, Krash, etc.
I did not do it for every dialogue.
Addresses issues #8319 and #8772

More PR review feedback addressed by Wedge.

---------

Co-authored-by: Wedge009 <wedge009@wedge009.net>
2024-09-04 10:35:35 +02:00
Charles Dang
354418188e Add rect::shifted_by
Companion of rect::shift for const objects
2024-09-04 01:30:08 -04:00
Charles Dang
dd1f60b753 More animation functions that shouldn't return const objects... 2024-09-04 01:29:30 -04:00
Toom
57f4ca20aa Apply suggestions from code review
Co-authored-by: Gunter Labes <soliton@wesnoth.org>
2024-09-03 13:37:34 -04:00
Toom
b559549501 Update callable_objects.cpp 2024-09-03 13:37:34 -04:00
Toom
06350c9ad8 Update units.lua 2024-09-03 13:37:34 -04:00
Toom
08b3ccb9b5 Update attack_type.cpp 2024-09-03 13:37:34 -04:00
Toom
6ff07f563b Update attack_type.hpp 2024-09-03 13:37:34 -04:00
Toom
2a4aa334ff add max_range and min_range to Lua weapon object, re #9169 2024-09-03 13:37:34 -04:00
Charles Dang
a5f7804277
Mass cleanup of index-based teams list access (#9290)
Mostly converting index-based loops to for loops. Includes a couple other non-team loops that were in the files I was editing.
2024-09-03 13:31:05 -04:00
Steve Cotton
de342bb29c Fix typos in test of recursion 2024-09-03 18:39:22 +02:00
Charles Dang
e437e205cb Fixup de776a4065 2024-09-03 09:01:56 -04:00
gfgtdf
b8c6edc53c
Fix indices in widget.add_item_of_type()/add_item()/remove_items_at() (#8516)
- widget:add_item_of_type() now uses lua 1-based indicies and throws lua errors on wrong indicies. (previously used c++ 0-based indexing, and could lead to assertions when wrong indicies were used, )
- widget:add_item() now has a optional location pos parameter as claimed in the wiki
- the pos and count paraemters in widget:remove_items_at() are now optional and default to removing the last element

With this is matches the behavior of the standart lua functions table.insert and table.remove which is imo what lua writers expect.
2024-09-03 14:17:57 +02:00
Wedge009
0618eadf3e Replace tab with spaces 2024-09-03 17:02:12 +10:00
Wedge009
9b51a62a2e Remove contentious last sentence as per PR review. 2024-09-03 17:02:12 +10:00
palmenf
25e77a13e9 Added an explanation of vision to the in-game help 2024-09-03 17:02:12 +10:00
Charles Dang
651779007a Surface: add area getter 2024-09-02 18:47:14 -04:00
Charles Dang
de776a4065 Rect: add center point getter 2024-09-02 18:46:16 -04:00
Gothyoba
3bcec77482 AToTB: Use month names intead of Roman Numerals 2024-09-03 07:09:11 +10:00
Charles Dang
cd21c4f26b Unit/Frame: made submerge handling more readable 2024-09-02 15:05:18 -04:00
Charles Dang
cbd7f0d309 Unit/Frame: removed unused grayscale handling for grayscale in render_unit_image
We always passed false here. The param was pulled over when I moved the old display::render_image function here and made it render_unit_image.
2024-09-02 14:47:00 -04:00
Charles Dang
3de0a624f3 Unit/Frame: reduced indentation (no functional changes) 2024-09-02 14:43:11 -04:00
Charles Dang
647f7949cb Prefer get_location over get_location_[x|y] when possible 2024-09-02 13:44:31 -04:00
Charles Dang
d37679a7c9 Fix early crash if no teams are defined
gui_->viewing_team() in refresh_objectives results in invalid index access if there are no teams here.
2024-09-02 12:37:41 -04:00
Charles Dang
93cfddaa27 Display: rename team index functions/members for clarity 2024-09-02 12:37:41 -04:00
Charles Dang
25de2962ae Editor/Context Manager: take a team reference for edit_side_dialog 2024-09-02 12:37:41 -04:00
Charles Dang
fbc7a27cdd Add display::viewing_team_is_playing
Common enough check that this is useful in pursuit of removing direct index usage.
2024-09-02 12:37:41 -04:00
Charles Dang
500e937ac9 Display: use new team getters internally
currentTeam_ is what viewing_team_index returns
2024-09-02 12:37:41 -04:00
Charles Dang
725f4b3db7 Unit/Drawer: don't keep team indices 2024-09-02 12:37:41 -04:00
Charles Dang
f1be5e4c83 Clean up scattered cases of viewing_team_index + 1 2024-09-02 12:37:41 -04:00
Charles Dang
ac9f0674d7 Display: refactor out [playing|viewing]_side
Now defined in terms of [playing|viewing]_team().side(). Much clearer. No more damn +1 math.
2024-09-02 12:37:41 -04:00
Charles Dang
4c6580250a Clean up more unnecessary uses of display::viewing_side 2024-09-02 12:37:41 -04:00
Charles Dang
0940b7451b Display: add back [viewing|playing]_team as actual team reference getters
Cleaned up redundant getters in other classes that served the same purpose.
2024-09-02 12:37:41 -04:00
Charles Dang
58472054fb Display: rename [viewing|playing]_team to [viewing|playing]_index 2024-09-02 12:37:41 -04:00
Charles Dang
7fa4fe483c Remove display::team_valid
It's already checked when it's set
2024-09-02 12:37:41 -04:00
Tahsin Jahin Khalid
1e1db849fd names: remove inappropriate saurian name 2024-09-02 12:31:57 -04:00
Subhraman Sarkar
2985574c87 remove inproper and inconsistent names
1. remove obviously English and English sounding female names from Dunefolk female names list
2. remove 'bakri' from male name list (means 'goat', could be offensive)
3. remove one potentially offensive name from saurian name list
4. remove 'Dalal' from dunefolk female names (can be used as slang)
2024-09-02 21:12:58 +05:30
pentarctagon
96420da3d5 heal_on_hit tests - results are identical to drains aside from default value 2024-09-01 19:40:14 -05:00
Dalas121
dc6b802d74
Changelog: log corpse/soulless arcane resist change.
Changelog entry for #9224
2024-09-01 18:40:07 -05:00
Dalas121
8d90a2b6f5
Reduce Corpse/Soulless arcane vulnerablility from -40% to -20% (#9282)
Resolves #9224
2024-09-01 18:25:34 -05:00
Gunter Labes
655491c159
Keep CI noise down by ignoring insignificant failures 2024-09-01 20:49:56 +02:00
Elvish_Hunter
61379bb5bc Fix wmlindent warnings 2024-09-01 01:14:40 +02:00
Charles Dang
03cf5e64ce Revert "Game Display: don't use resources::tod_manager"
This reverts commit c21b049d52.
2024-08-31 17:15:06 -04:00
Elvish_Hunter
742f400612 Silence several wmllint warnings 2024-08-31 23:07:09 +02:00
Charles Dang
98296875fd WB/Arrow: nothing inherits from this class... 2024-08-31 15:33:38 -04:00
Charles Dang
e7b3f59731 Display: clean up whiteboard arrow rendering
The arrow class shouldn't be in charge of adding to the drawing buffer. Also it meant that in a case of multiple arrows padding through one hex, multiple buffer entries would be added. Now it will use one per hex.
2024-08-31 15:29:41 -04:00
Charles Dang
4884561db7 Display: don't TOD color fg debug aid 2024-08-31 15:26:48 -04:00
Charles Dang
ae119c1d8a Display: make fog/shroud drawing buffer registration more readable 2024-08-31 15:26:20 -04:00
Charles Dang
c21b049d52 Game Display: don't use resources::tod_manager 2024-08-31 15:24:21 -04:00
Charles Dang
96489728ab Play Controller: removed orphaned function declaration 2024-08-31 15:23:17 -04:00
Charles Dang
97abecb56c
CI: Remove macOS and Windows debug job, add dedicated C++20 job
Also makes the windows build run on windows-latest and VS 2022
2024-08-31 11:56:48 -04:00
pentarctagon
f22fb410a3 firststrike tests 2024-08-31 10:14:36 -05:00
Tahsin Jahin Khalid
41f87afaf7
SotBE S7: UX improvements (#9279)
- add auxiliary camp keep and camp
- make scorpions avoid villages

Co-authored-by: Tahsin Jahin Khalid <5283677+knyghtmare@users.noreply.github.com>
2024-08-31 15:23:55 +06:00
Charles Dang
65ef3123e6 Make frame_parsed_parameters::parameters return a non-const object 2024-08-31 05:08:18 -04:00
Charles Dang
91300d4d36 Use designated initialization for frame_parameters 2024-08-31 05:08:18 -04:00
Charles Dang
d71d046005 IFP/XBRZ: don't default to max scale for invalid input
This now just clamps the input to the valid range.
2024-08-31 05:08:18 -04:00
Charles Dang
b11627c340 Clean up more unnecessary default ctors 2024-08-31 05:08:18 -04:00
Charles Dang
5c84ffc7df Display: leave get_time_of_day unimplemented in the base class 2024-08-31 05:08:18 -04:00
Charles Dang
434f5275ac Image/Locator: empty strings should produce void locators
No reason to try and load files with empty names.
2024-08-31 05:08:18 -04:00
Charles Dang
38cdb2a00c Game Config Manager: properly delete copy ctor and assignment operator 2024-08-31 05:08:18 -04:00
Charles Dang
2ca1307318 Game Display: properly delete copy ctor and assignment operator 2024-08-31 05:08:18 -04:00
Charles Dang
28555f362f Game Display: avoid gameboard global ptr for get_visible_unit
This function is implemented identically, though const, in display_context (the base class of game_board). We don't need the non-const game_board function here.
2024-08-31 05:08:18 -04:00
Charles Dang
0fbf068824 Display: don't register flag drawing op for non-villages 2024-08-29 23:47:44 -04:00
Charles Dang
b9e9d9029c Display: clean up flag init
`side_colors` in `init_flags` was unused. It used to get passed to `image::set_team_colors`, but that was removed. Also, both calls to `init_flags_for_side_internal` were identical, so it makes more sense just to remove the private function. And it means less messy index handling of teams().
2024-08-29 23:11:15 -04:00
Charles Dang
8efac78de8 Floating Label: hide other contexts' labels when creating a new one (resolves #8845)
Very hacky, but it fixes the issue in question while we look at refactoring this mess...
2024-08-29 19:26:29 -04:00
Charles Dang
2e6fb0e356 Floating Label: remove surface arg from ctor 2024-08-29 19:25:26 -04:00
Charles Dang
4472867992 Fix HUD buttons drawing too early (fixes #8648)
Fixup for f79b38a1af.
2024-08-29 18:24:11 -04:00
Charles Dang
26b467e390 Fix HW submerge regression for items (fixes #9014) 2024-08-29 17:59:57 -04:00
Gunter Labes
0378ed6c65
Use more meaningful prompt text
This also allows to distinguish the formula prompt from the command prompt.
2024-08-29 21:04:37 +02:00
Charles Dang
314af165d4 Display: split the overlay rendering into its own function and tidy
Addresses the last implicit-this lambda capture issue with C++20 and makes the function easier to read.
2024-08-29 14:41:17 -04:00
Charles Dang
99d43d8790 Fix C++20 deprecated lambda capture usage 2024-08-29 14:41:17 -04:00
Tahsin Jahin Khalid
29123810fb
Sotbe/S5: some refinements (#9270)
- give side 1 starting villages near the orc base
- move Kapou'e to his keep at start

Co-authored-by: Tahsin Jahin Khalid <5283677+knyghtmare@users.noreply.github.com>
2024-08-28 22:55:10 +06:00
Tahsin Jahin Khalid
d10ae768b5
SotBE S6: replace bad advice at turn 2 (#9269) 2024-08-28 22:54:24 +06:00
Tahsin Jahin Khalid
3f4ceb7d1c
[SOTBE] S3: make allied AI smarter (#9239)
* SOTBE-S3: make allied AI smarter

- they wont attack from poor defense anymore
- will only attack from hills where they have better defense

* SOTBE-S3: fix bad code in side AI

---------

Co-authored-by: Tahsin Jahin Khalid <5283677+knyghtmare@users.noreply.github.com>
2024-08-28 22:53:34 +06:00
Gunter Labes
67ec133cca
Only grant necessary permissions 2024-08-27 23:27:37 +02:00
Gunter Labes
52518d741b
Fix copyright check and run on pushes to master as well 2024-08-27 21:47:33 +02:00
white-haired-uncle
60bbdc25c5
lua api: add optional data type support (#9263) 2024-08-27 20:36:53 +02:00
Gothyoba
c9819eb85d
Turn Dwarvish Miners into a Level 0 unit (#9158) 2024-08-27 23:23:43 +06:00
Charles Dang
3238026ad8 Remove HAVE_CXX20 macro
We use per-feature standard macros now
2024-08-27 02:11:41 -04:00
newfrenchy83
67a491bb9b add test for apply_to=both and apply_to=attacker/defender when both type of self and opponent weapon are filtered.
if filtering type of damage in [damage_type] for both self and opponent when apply_to=both, it will create a recursion issue.

Idem for apply_to=attacker/defender when applied to opponent of owner of special.
2024-08-26 16:42:30 -05:00
Charles Dang
9a39eac26a Update to Lua 5.4.7 2024-08-26 16:18:41 -04:00
Charles Dang
837e50a3e2 Spritesheet Generator: use ranges (conditionally) 2024-08-26 00:05:11 -04:00
doofus-01
033012219e
Add Exif tags to images (#9254)
Artist & copyright Exif tags track the copyright info in images, replacing what used to be tracked with "copyrights.csv".
2024-08-25 20:18:16 -07:00
pentarctagon
815739f1c2 drains tests 2024-08-25 20:46:15 -05:00
doofus-01
c1fd40c7a0
Update image_metadata.yml
undo 48ee897b00
2024-08-25 18:13:38 -07:00
doofus-01
bd4c83f955
Corrections to image metadata check CI (#9256)
* don't just compare webp

* fix license check
2024-08-25 17:41:08 -07:00
doofus-01
f684c20dac
remove CI check of copyrights.csv for images (#9246)
* remove CI check of images against copyrights.csv

* remove image file entries from copyrights.csv
2024-08-25 06:36:27 -07:00
Subhraman Sarkar
5251ca1593 miscellaneous documentation updates
1. config.cpp: replace angle quotes with typographic single quotes
2. config.hpp: typo fix
3. widget_definition.cpp, window_builder.cpp: show id for window/widget
4. wml_exception: implement missing tag message, use typographic single quotes in missing key/tag messages
2024-08-25 01:56:22 -04:00
Subhraman Sarkar
60640dc8bd Add lua function gui.switch_theme() to allow add-ons to switch themes in the middle of a scenario 2024-08-25 01:56:22 -04:00
Subhraman Sarkar
59911072aa support loading gui2 themes from add-ons
Requires a `gui-theme.cfg` file in Add-on root with a `[gui]` tag.
(Add-ons without all buttons in title_screen may get flagged as defunct.)
2024-08-25 01:56:22 -04:00
gfgtdf
37a0828428 fix map_locker in lua kernel
it previously didn't work as expected because that the variable wasn't given a name, so it locks the map and then immediately unlocks it again.
2024-08-24 23:48:11 -04:00
Dalas121
9ae2978fcd
Death Squire optional advancement macro and damage nerf (#9207)
* Death Squire optional advancement and damage nerf

The existing {ENABLE_DEATH_KNIGHT} macro allows Revenants to advance to Death Knights. The newly core-ed Death Squire also advances to Death Knight, but has no {ENABLE_DEATH_SQUIRE} macro.

I suggest adding a new {ENABLE_DEATH_SQUIRE} macro, while keeping the old {ENABLE_DEATH_KNIGHT} for backwards compatibility.

I also propose reducing the Death Squire's attack from 8x4 to 9x3, to make the Revenant a more competitive advancement.

Who's the current maintainer of SotA? Should {ENABLE_DEATH_SQUIRE} be used there, or should we continue using {ENABLE_DEATH_KNIGHT}?

Hejnewar, if you approve, what cost should the Death Squire be after this change?

* Reduce Death Squire damage from 8x4 to 9x3

* Update Skele_Death_Squire.cfg
2024-08-24 19:04:17 -05:00
Sergei Trofimovich
1fb93b68d1 filesystem.hpp: include missing <cstdint>
Without the change build fails on upcoming `gcc-15` as:

    In file included from src/desktop/paths.cpp:20:
    src/filesystem.hpp:232:13: error: 'uint8_t' was not declared in this scope
      232 | std::vector<uint8_t> read_file_binary(const std::string& fname);
          |             ^~~~~~~
2024-08-24 17:34:08 -04:00
doofus-01
78a4c5c494
Image metadata CI check (#9222)
add image exif metadata check workflow to CI (checks PR images only)
2024-08-24 04:07:31 -07:00
Nils Kneuper
01806d090f updated Japanese translation 2024-08-24 11:47:06 +02:00
sprunk
44f54bb57a Fix #9241, Liberty S1 dialogue item tweak
Extends damage and not the number of hits, so use "heavier rocks" instead of "more rocks".
2024-08-24 18:55:29 +10:00
Gunter Labes
6293a503e0
Merge pull request #9133 2024-08-24 06:41:03 +02:00
Nils Kneuper
d4b2d151ce updated copyrights for Turkish image update 2024-08-23 15:00:00 +02:00
Nils Kneuper
e1c14ac2a7 applied "update_copyrights" script 2024-08-23 14:50:50 +02:00
Nils Kneuper
aef0d3d87d updated Turkish translation 2024-08-23 14:48:01 +02:00
Nils Kneuper
38aef96b64 updated Chinese (Simplified) translation 2024-08-23 14:30:06 +02:00
Nils Kneuper
0fa48e2088 updated British English translation 2024-08-23 14:29:06 +02:00
Nils Kneuper
41896cabf9 updated Bengali translation 2024-08-23 14:27:53 +02:00
Iris Morelle
1ae764bd35
Merge pull request #9173 2024-08-22 17:00:32 -04:00
Gunter Labes
0c278d38aa Make command line option errors consistently return 2 as documented
Also print the error before the dialog so you don't first have to dismiss it to see the message on stderr as well.
2024-08-22 18:33:12 +02:00
Celtic Minstrel
cff5630f88 Lua API: Explicitly set default deleter for string-constructed formulas
Fixes #9237
2024-08-22 01:46:59 -04:00
Gunter Labes
9b70484b4f
Fix an indent inconsistency and add missing final newlines 2024-08-21 21:48:04 +02:00
Charles Dang
e08fcd1061 Don't clone surface too early 2024-08-21 13:16:55 -04:00
Charles Dang
365fe71e2c Only need read access for in_mask_surface 2024-08-21 13:16:55 -04:00
Charles Dang
a6e931af11 Reduce cache lookups in is_empty_hex 2024-08-21 13:16:55 -04:00
Charles Dang
e22c376d01 Fix possible regression from 457ed4bb43
I don't know if modifying this value in cache would cause issues, but better safe than sorry.
2024-08-21 13:16:55 -04:00
Charles Dang
bafe62948c Don't use exception bounds checking for image caches 2024-08-21 13:16:55 -04:00
gfgtdf
c15df9d3f5 fix #9225 events with negative priority getting erroneously deleted
previously is_map_[id] would point to the wrong event, so that when an event was later deleted by id the wrong event would be deleted.
2024-08-21 02:08:47 +02:00
Celtic Minstrel
4927e71ed1 Fix crash if string_to_color is passed an empty string 2024-08-20 13:42:26 -04:00
Celtic Minstrel
e338869b01 Down with wmlindent!!!
Why on earth does it want to indent line continuations by another level!?
2024-08-20 13:41:46 -04:00
Celtic Minstrel
387499532c Encyclopedia: Fix inconsistent indentation and break up the lists in every topic 2024-08-20 09:06:43 -04:00
Wedge009
cb144c5739 Encyclopedia clean up following #9188.
[ci skip]
2024-08-20 21:39:33 +10:00
Gunter Labes
d46dbef39b
Warn about external paths 2024-08-20 09:14:47 +02:00
Gunter Labes
5da4160d87
Correct confusing handling of ./ paths
Warn about unresolvable paths instead of returning a bogus path or nothing.
2024-08-20 09:14:47 +02:00
Wedge009
a88d7ef1f8 Cats: Remove non-standard spacing and replace straight quotes.
[ci skip]
2024-08-20 16:53:34 +10:00
Charles Dang
56d05b166b Make more use of std::clamp in surface utils 2024-08-19 15:48:22 -04:00
Charles Dang
f6ae75f9ed Remove sdl::fill_surface_rect 2024-08-19 15:45:33 -04:00
Charles Dang
4722c01c55 Remove an assert 2024-08-19 13:06:52 -04:00
Gunter Labes
150a738b39 Simplify game_config::path determination 2024-08-19 16:15:49 +02:00
Gunter Labes
8c581eee90
Avoid rewriting the same file multiple times
Also process some more extensions that current source files use.
2024-08-19 08:55:08 +02:00
Gunter Labes
0bb7395804
Make sure stdout encoding is UTF-8 2024-08-19 08:51:05 +02:00
Gunter Labes
3c45a5b0e7
Update and correct game config schema
Fix schema tags where "name" is a comma separated list which is not actually supported.
2024-08-19 08:25:55 +02:00
pentarctagon
04fe19bf6c 1.19.3+dev 2024-08-18 23:24:17 -05:00
pentarctagon
e865a5fd61 1.19.2 2024-08-18 23:22:05 -05:00
pentarctagon
92173108f1 pot-update and regenerate doc files 2024-08-18 23:20:19 -05:00
pentarctagon
bbeb3ab699 changelog_entries 2024-08-18 23:10:15 -05:00
Steve Cotton
bd8a5fa038 Add tests for [store_locations] with an SUF
Prompted by a discussion over [filter_weapon][not]
when a unit has no usable weapon.
2024-08-19 00:17:37 +02:00
Steve Cotton
4afdc92f13 New ability recursion tests using a four cycle
Using four abilities instead of two means the C++ checking_tag
mechanism needs to handle multiple values, or needs to be supported
by recursion counting.

The branching test lets one level of recursion finish, and then tries
to go deeper. This tests for bugs where a recursion detection tool in
the engine gets its count reset when exiting one level of recursion.
2024-08-19 00:07:41 +02:00
newfrenchy83
f272d9022e Add tests for recursive weapon filters 2024-08-19 00:07:41 +02:00
Steve Cotton
743b146efc Fix weapon special filters can lead to infinite recursion
This adds a recursion counter which runs on a per-weapon basis; if the
recursion limit is reached then the last level of recursion is assumed
to have returned false. A warning is printed (with error severity).

At the user-visible layer, that gives the following logic:

* Abilities that depend on another ability being active will be
  inactive.
* Pairs of abilities, where X depends on Y being inactive and Y
  depends on X being inactive, will end up with them both inactive.

The limit is defined by ATTACK_RECURSION_LIMIT in attack_type.cpp.
The minimum for passing all the unit tests is 2, but I've left some
headroom by setting it to 4.

With the recursion limit set to 1, the following tests fail, which
seems reasonable because they're checking that the special is on
a particular type of weapon.
* event_test_filter_attack_specials
* event_test_filter_attack_opponent_weapon_condition
* event_test_filter_attack_student_weapon_condition

Output from the four_cycle_recursion_branching test:
```
error unit: Recursion limit reached for weapon 'melee_attack' while checking filter 'special_type_active = parry'
error unit: Recursion limit reached for weapon 'melee_attack' while checking filter 'special_type_active = poison'
error unit: Recursion limit reached for weapon 'melee_attack' while checking filter 'special_type_active = damage'
```

There's deduplication to prevent the logfiles getting spammed during
AI turns. As implemented, the two tests mentioned below print 3
messages each; these tests are added in separate commits because the
tests are shared between PRs while we discuss the right mechanism for
guarding against recursion.

With no rate limit:
* four_cycle_recursion_branching prints 1280 logs
* event_test_filter_attack_student_weapon_condition prints 320

With a rate limit via a flag that's reset in recursion_guard's destructor:
* four_cycle_recursion_branching prints 80 logs
* event_test_filter_attack_student_weapon_condition prints 160

Resetting the flag in specials_context_t's destructor gets better numbers,
but splits the logic across .cpp files. I think the trade-off isn't worth it:
* four_cycle_recursion_branching prints 40 logs
* event_test_filter_attack_student_weapon_condition prints 132

Co-authored-by: newfrenchy83 <eric.belleux@gmail.com>
2024-08-19 00:07:41 +02:00
Toom
cac16cbdf1
add tooltip to [unit_vision] (#9191)
closes #7636
re #6021
re #5575
2024-08-18 17:00:06 -05:00
Gunter Labes
e0a424d675
Remove unused struct 2024-08-18 20:34:34 +02:00
Charles Dang
c8a477383d Fixup 791eed42cf 2024-08-18 14:25:38 -04:00
Charles Dang
21254d5172 Game Config: don't copy palette vector (it's big) 2024-08-18 13:56:49 -04:00
Charles Dang
9c1c442f31 Color Range: fix possible uint8_t overflow 2024-08-18 13:56:17 -04:00
Gothyoba
71e0d142d6 Remove reference to Aspenger’s Syndrome in HttT S20b comment
The change to Alzheimer’s Disease was suggested by CelticMinstrel some time ago in #7545
2024-08-18 12:47:19 -04:00
Gunter Labes
55f6c69f68
Use non-reference type to explicitely show the copy
This appeases -Wrange-loop-bind-reference as in every other all_children_range use in a range-for loop.
2024-08-18 16:49:53 +02:00
Eric Gallager
4915f3be86 wmlscope: fix format of magic comment in documentation
It's not just `prune`, but rather `wmlscope: prune`
2024-08-18 10:56:50 +02:00
Charles Dang
3dc19a9808 Mark texture state getters const 2024-08-18 00:54:54 -04:00
Charles Dang
9d35d56b8b Fix spurious errors when no minimap to draw
It is possible (oddly enough) to completely disable any minimap drawing. So this isn't an error condition.
2024-08-18 00:54:19 -04:00
Charles Dang
f9e2700991 Fix clip rect regression from 283e52222a 2024-08-17 22:29:39 -04:00
pentarctagon
32063bfc7c add disable ability tests 2024-08-17 21:13:10 -05:00
Charles Dang
89f99f70ca Fix broken ~CS()
Originally messed up in 029136b19a
2024-08-17 21:33:30 -04:00
Charles Dang
f65fdb3270 Remove assertions about SDL_ALPHA_TRANSPARENT 2024-08-17 21:20:35 -04:00
Charles Dang
169c87a8a5 Remove get_pixel and put_pixel 2024-08-17 21:19:15 -04:00
Charles Dang
abbb9707b9 IPF: mark virtual functions override 2024-08-17 21:18:40 -04:00
Charles Dang
457ed4bb43
Conduct surface manipulation in-place when possible (#9218) 2024-08-17 20:22:44 -04:00
Charles Dang
fb1232e4ea Fixup 5170615e03 2024-08-17 16:16:34 -04:00
Charles Dang
6d258e20de Remove surface::operator< 2024-08-16 00:25:06 -04:00
Charles Dang
ce740656fd Remove image::locator::file_exists in favor of image::exists
Identical codepaths except the latter involves the cache.
2024-08-16 00:24:27 -04:00
Charles Dang
3dad5f4e62 Unit/Animation: make frame_parameters a proper aggregate 2024-08-15 21:31:26 -04:00
Charles Dang
824df30778 Unit/Animation: aggregate cleanup 2024-08-15 21:30:47 -04:00
Charles Dang
d33b4554ef Added AGGREGATE_EMPLACE compat macro 2024-08-15 21:27:10 -04:00
Charles Dang
5170615e03 Don't clone surface when getting non-transparent rect 2024-08-15 21:26:24 -04:00
Charles Dang
cdec7adecf Get max xbrz scale size from lib
Bumps the max to 6
2024-08-15 19:36:20 -04:00
Charles Dang
d7a9421d26 Remove unused scale_surface_nn
XBRZ version of NN scaling, which we have already with scale_surface_sharp.
2024-08-15 19:34:16 -04:00
Charles Dang
8bf49639ea Fix build on VS 17.11 2024-08-15 19:30:23 -04:00
newfrenchy83
8f20c12e3d fix incomplete add [disable] abilityto abilities used like weapon special 2024-08-14 19:39:35 -05:00
pentarctagon
0cf9490409 handle preferences case change
Fixes #9199
2024-08-14 19:33:54 -05:00
Charles Dang
c5e0b3eefb GUI2/Drawing: don't assert on empty [draw] 2024-08-14 14:03:37 -04:00
Charles Dang
4058f866d6
Remove UNUSED (#9210) 2024-08-14 13:55:58 -04:00
Subhraman Sarkar
6980ad04d6 gamestate inspector: use uneditable scroll_text instead of scroll_label
allows text to be selected and copied
2024-08-14 12:03:39 +05:30
Subhraman Sarkar
18a08fbbef muliline text: improve slowdown and line calculation algorithm 2024-08-14 12:03:39 +05:30
Subhraman Sarkar
cf5cc8ec3f text renderer: remove caching and get_byte_offset, add get_cursor_pos_from_index 2024-08-14 12:03:39 +05:30
Charles Dang
b874b8c6d4
Update xBRZ to v1.8 (#9208)
* Update xBRZ to v1.8 (resolves #8307)

This replaces our implementation with stock xBRZ sans any of our custom code. Made these changes from plain source:
- Renaming .h -> .hpp
- Conditionally use [[likely]]
- Added a trailing newline
- Comment out unused parameters
- Disable `-Wunused-function` warning on macOS
2024-08-14 01:13:37 -04:00
Charles Dang
dac8f6f5e0 Mark draw RAII getters [[nodiscard]] 2024-08-13 21:56:46 -04:00
Celtic Minstrel
8baf95601d [LuaDoc] Mark filesystem.asset_type as an enumerator 2024-08-13 08:54:04 -04:00
Celtic Minstrel
d2983f849b [Lua] Read campaign ID from scenario settings instead of mp_settings. 2024-08-13 08:54:04 -04:00
Celtic Minstrel
233237be1e [Lua] Add some TODO notes on things to come back to later. 2024-08-13 08:54:04 -04:00
Celtic Minstrel
a277073e36 [Lua] Remove some internal implementation functions from the external ai_helper interface.
There are no callers in mainline. The functions are not meant to be called directly at all – for each, there are wrapper functions that are intended to be called instead, which are still exposed.
2024-08-13 08:54:04 -04:00
Celtic Minstrel
faaeaadaa1 [Lua] Avoid missing field warning by reversing the order of the check 2024-08-13 08:54:04 -04:00
Celtic Minstrel
9e79a627c3 [Lua] Fix some accidental global warnings 2024-08-13 08:54:04 -04:00
Celtic Minstrel
dd24051c17 [Lua] Mark location_set.values as private 2024-08-13 08:54:04 -04:00
Celtic Minstrel
b6da8a705f [Lua] Avoid variable reuse as a different type 2024-08-13 08:54:04 -04:00
Celtic Minstrel
542581916f [Lua] Suppress some diagnostics and also recommend suppressing certain diagnostics globally 2024-08-13 08:54:04 -04:00
Charles Dang
7891a9f06f Animated: remove unnecessary default value ctor 2024-08-12 23:59:59 -04:00
Charles Dang
9ef2e4043f GUI2: simplify the implementation of decode_font_style 2024-08-12 23:59:17 -04:00
Charles Dang
6625aa42d2 Simplify WML filter checks with in_ranges (closes #9083)
We don't want the main change from that PR, but we do want the cleanup.
2024-08-12 23:58:47 -04:00
Charles Dang
cce8c7a410 GUI2/Preferences: fix anim frequency slider being incorrectly initially set (fixes #8612) 2024-08-12 00:50:35 -04:00
Charles Dang
2e8dd8f5fc GUI2/Tree View Node: fix broken manual folding (fixes #8689, fixes #9146) 2024-08-12 00:35:28 -04:00
Charles Dang
91f26a1624 Revert "Attempt to address overly enthusiastic minimap rendering"
This reverts commit 6fff6de906.
2024-08-11 22:46:57 -04:00
Charles Dang
283e52222a Restore old clip rect when reverting render target (fixes #7087, fixes #8607)
This specifically manifested with the new minimap rendering code. Since we were creating a new temp texture onto which to draw the minimap before drawing it to the window texture, the formerly set clip rect was incorrect when the old viewport was restored:

For a minimap texture of 738 x 912:
Clip before changing target: `[0,0|330,200]`
Clip after changing target: `[0,0|738,912]` (covers whole of new target)
Clip after old target is restored: `[476,55|330,200]`

It's unclear where the extra x,y values came from, but I suspect it's some issue with SDL's internal viewport handling.
2024-08-11 22:45:34 -04:00
Elvish_Hunter
401b969704
Changelog entry for PR #9189 2024-08-12 00:32:36 +02:00
Elvish_Hunter
1f9c5af164
Add sprite for the Cold Dagger item to UtBS (#9189)
* Add sprite for cold dagger item

* UtBS 04: use cold dagger sprite

* Update copyrights.csv for the cold dagger sprite
2024-08-12 00:28:54 +02:00
Charles Dang
30977f588a Fixup 71f9ee6ae7 2024-08-11 17:11:45 -04:00
Charles Dang
44db56d767 MP/Staging, Join Game: fixed some alignment and formatting issues 2024-08-11 17:00:21 -04:00
Charles Dang
71f9ee6ae7 Remove image::locator::value
This builds on the work in cca82c4c3a. There, I delegated the ctors to the `value` strict via a forwarding ctor, but it honestly seems better to just remove the value struct entirely and just have class members. There isn't anything that relies on `value` as a distinct type anymore anyway.

The change in minimap.cpp is to deal with build errors that suddenly emerged with this change.
2024-08-11 16:24:59 -04:00
newfrenchy83
6ebca64acc add [disable] abilityto abilities used like weapon special 2024-08-11 13:29:34 -05:00
Gunter Labes
f11fbee7fe
Fix filter attribute name 2024-08-11 15:21:00 +02:00
Toom
31658e2587
Set unit hitpoints to 0 during [kill] (#9164) 2024-08-10 09:20:12 -05:00
Nils Kneuper
e9a6761484 updated Czech translation 2024-08-10 15:11:40 +02:00
Nils Kneuper
02f8b8c2ea updated French translation 2024-08-10 15:10:27 +02:00
Gunter Labes
6bc7a80b5d
Properly implement DO_NOT_MODIFY_CACHE
This fixes node_to_string() by making sure the node is really not modified.
2024-08-10 10:36:55 +02:00
Gothyoba
0aa93bf94c
Revised Encyclopedia (#9188)
This is a series of mostly minor changes to the encyclopedia:

- The Wesnoth Calendar has been renamed to Wesnothian Calendar.
- The calendar page now explains YW, BW, and AF. As far as I’m aware, these are not explained in-game despite their use.
- The unused file drakes.txt has been removed.
- The Great Ocean section now mentions the drakish name World Ocean and some drakish mythology from drakes.txt. 
- The Great River page has had a section on the Ford of Abez added. This is partly copied from the wiki (section copied appears to have been added by Esr, 8 October 2008)
- Morogor has had Mount Krogor been added as a notable land feature in the encyclopedia, taken from drakes.txt.
- The Green Isle section has been greatly expanded to include details on settlements and terrain. I thought it would be useful to have this, as the Green Isle is the original home of the Wesnothians and a major part of the setting of TRoW.
- Added a short sentence on the Old Continent being the original homeland of orcs and humans.
- Westin has been added to the Wesnoth page.
- The Isle of Alduin has been added to the Wesnoth page.
- A section on the Green Swamp has been added to the Wesnoth page. This is copied from the wiki. (section copied appears to have been added by Octalot, 21 September 2021)
- The section on notable cities for the Southwestern Elves has been removed due to the lack of known cities in the region.
- The Northlands description has been modified.
- The local orcish names for the Heart Mountains are now mentioned on the page for the Heart Mountains.
- Tirigaz and Jotha now have short one-sentence descriptions.
- The Desert of Death has been added to the far north section.
- Various land features from the far north have had short descriptions added.
- A section on the Far South has been added. It does not expand much on current lore except for some mentions of monsters. It only includes the Mountains of Peril, Sandy Wastes, and the Black Forest (moved from Southwestern Elven Lands and slightly modified) and is intenced to be very vague to allow UMC creators to imagine details of the Far South.
2024-08-09 12:26:47 -05:00
Charles Dang
6fff6de906 Attempt to address overly enthusiastic minimap rendering
See #8607 and #7087
2024-08-09 11:40:27 -04:00
Sergey Popov
c10c47ebb1
wesnothd: avoid a race condition when logging on
Ensure that there is no coroutine yield between confirmation of login
and update of player_connections_. Otherwise another login under same
name could succeed if it happened before handle_player() which resulted
in an assert later.
2024-08-09 11:50:08 +02:00
Subhraman Sarkar
8863cd1bcd
MP: correctly register Start Game button's shortcut with hotkey system (#9181)
Correctly register the Start Game button's shortcut with hotkey system
2024-08-09 08:56:08 +05:30
Gothyoba
c761174331 New Titlescreen images 2024-08-08 21:37:42 -05:00
Charles Dang
884fdbeb95 Attempt to work around more accursed macOS build issues 2024-08-08 19:07:30 -04:00
Charles Dang
f8ca3ccd36 Update CodeBlocks and XCode projectfiles 2024-08-08 17:26:35 -04:00
Charles Dang
367c6c8aa3 Fix spritesheet generator 2024-08-08 17:26:35 -04:00
Charles Dang
c9ed3711b4 Make get_non_transparent_portion return a rect again
Reverts part of 37a45c32ce and moves the actual surface handling to the relevant IPF, which was also simplified
2024-08-08 17:26:35 -04:00
Charles Dang
518e0d2050
Added spritsheet generator (#6665)
This takes a folder with images and writes an assembled spritesheet to disk along with a config file.
2024-08-08 11:29:08 -04:00
Charles Dang
d762bea734 Split drawing_layer into its own file, make scoped enum 2024-08-08 02:14:22 -04:00
pentarctagon
8bebc86b6a damage_type tests 2024-08-07 21:32:46 -05:00
pentarctagon
9821e2037b macroify some preferences code 2024-08-07 21:31:11 -05:00
Drew Tate
da426144a6
Handling empty team in :droid (#9165) 2024-08-07 09:19:21 +02:00
Charles Dang
a3aca1c0be Small misc image-related cleanups 2024-08-07 00:14:03 -04:00
Charles Dang
613f72e188
Decouple image cache management from locator, and simplify (#9179)
Makes all the cache management functions local to the cache class. There's no reason
to publicly expose it through locator given that the actual cache objects which that
API needs to function are local to this translation unit anyway.

This also cleans up the cache implementation in order to take advantage of the switch
from a vector to map awhile back. `copy_from_cache` was removed in favor of bounds-
checked access.
2024-08-06 21:42:15 -04:00
Iris Morelle
8a54d10fe8
Merge pull request #8861 2024-08-06 21:14:47 -04:00
Wedge009
12606e2fc5 SotA S2: Avoid destroying unit potentially already occupying target hex. (Closes #9150) 2024-08-07 09:00:04 +10:00
Celtic Minstrel
959c616f05 add_source_file: Fix failure to add Boost unit tests to Xcode 2024-08-06 09:51:54 -04:00
Oleksii
5cf648bb2b Add Akademie Alte font 2024-08-06 21:44:59 +10:00
Oleksii
90b1a64fc9 Create PonomarUnicode.ttf 2024-08-06 21:44:59 +10:00
Oleksii
2ca67e72d8 Add Cyrillic fancy font 2024-08-06 21:44:59 +10:00
Gunter Labes
e1378188d3
Remove remnant of the SDL_ttf wrapper API 2024-08-06 08:48:56 +02:00
Gunter Labes
b92f352c66 Disable WML tests for debug builds
Not that useful to run them with debug as well as release binaries and it takes a lot of time.
2024-08-05 23:08:45 -04:00
Gunter Labes
0fbe71cca8
Simplify pot generation
Use a standard sed invocation and avoid rewriting the file.
2024-08-05 21:49:23 +02:00
Iris Morelle
de2d2e2bd6
hotkey: Identify Alt as "opt" on macOS
Fixes #9172.
2024-08-05 13:58:04 -04:00
doofus-01
8700338c75
Moving image data to the image (#9023)
Add two maintenance scripts, to help transition from external copyright tracking to putting all info in the file metadata.
- One script to read read copyrights.csv and write data to Exif tags.
- One script to read the image Exif tags, and write to a CSV
2024-08-04 18:40:45 -07:00
Gothyoba
4c3692bb78 THoT S6 Music Tweak 2024-08-04 17:57:35 -05:00
doofus-01
c4acf3ae27
Update changelog.md 2024-08-04 15:10:05 -07:00
doofus-01
552eed3f2e
(1.19) Cat units (#9040)
* Add Jumpcat, Forest Lion, and zombie cat

* update copyrights.csv
2024-08-04 15:07:15 -07:00
Gunter Labes
2b965290f6 Call Export appropriately instead of using locals() 2024-08-04 13:13:05 +03:00
Severin Glöckner
00c081cb4b Schema: support other mp_ keys too
In addition to the mp_village_gold used in mainline,
there exist as well:
- mp_fog
- mp_shroud
- mp_village_support
2024-08-03 11:29:02 -05:00
Tahsin Jahin Khalid
d467632398
[objectives.lua] improve clarity of error message (#8780) 2024-08-03 11:24:41 -05:00
Tahsin Jahin Khalid
657ed9419f Units/Skeletal-Dragon: cost 297 -> 288 2024-08-03 11:13:00 -05:00
Tahsin Jahin Khalid
fa361eba0e Skeletal Dragon: updated stats
- Resistance: Set to -20% Fire, -20% arcane
- HP: 171
- cost: 297
- fangs: 17-4
- claws: 24-3
2024-08-03 11:13:00 -05:00
Tahsin Jahin Khalid
84f99d9212 skele_dragon: remove ancient comment
This comment existed when the unit was still in EI campaign. It's been moved to core ages ago and yet, the comment, now no longer relevant outside of EI still persisted...
2024-08-03 11:13:00 -05:00
Oleksii
e768b6ce4c
THoT: Create heroes if they don't exist (#9130)
* fix for #5520
2024-08-03 10:44:57 -05:00
newfrenchy83
24859f861a move filter_abilitie/specials code in abilities.cpp
The code was moved to abilities.cpp so that it can be called from the units or attack_type functions, the attack_type function state necessary for the tags [filter_special_active] and [remove_specials] which I plan to implement when the code for filter_ability] is validated in its final form.
2024-08-03 10:43:31 -05:00
Toom
788cedc99a Update copyrights: use consistent output format 2024-08-03 10:24:20 -05:00
Gothyoba
53e0abe4b4 Update link to https in fortunes 2024-08-03 10:23:13 -05:00
Celtic Minstrel
21ac600c16 Fix unit tostring conversion causing a crash if the unit is invalid 2024-08-02 09:38:02 -04:00
Charles Dang
c8a47c0bca color_t: accept leading # for hex string input 2024-08-02 07:51:22 -04:00
Charles Dang
c48121ce05 color_t: take arguments as string_view 2024-08-02 07:47:52 -04:00
Iris Morelle
70231f14ab
Add changelog entry for the editor tool help toggle 2024-08-01 13:20:45 -04:00
Iris Morelle
c8af866e5b
Update copyrights.csv 2024-08-01 13:17:05 -04:00
Iris Morelle
3a8c7303e7
editor: Implement a Show Tool Information toggle option
This allows permanently hiding the obnoxious help text tooltip that
constantly dances between the top and bottom of the screen depending
on what you're doing in the editor.

Icons provided by babaissarkar.
2024-08-01 13:17:05 -04:00
Charles Dang
4a016139ed CL Opts: remove now-unnecessary final_log_redirect_to_file member 2024-08-01 13:12:16 -04:00
Charles Dang
80fbc3bab0 Fix Windows console not showing initial startup output 2024-08-01 00:50:14 -04:00
Charles Dang
7a665d0959 Config Attribute Value: let compiler handle default special functions (rule of 5) 2024-08-01 00:05:54 -04:00
Charles Dang
0a9d351fe2 Replace filesystem::ends_with with boost::algorithm::ends_with
The former had nothing to do with fs functionality at all.
2024-08-01 00:03:13 -04:00
Charles Dang
2f85001897 GUI2/Group: marked get_active_member_value const 2024-07-31 22:55:04 -04:00
Charles Dang
159998b80c MP: fix ambiguous case of config attribute used as bool
It's honestly not entirely clear what the right behavior is here. The way it is, to_bool is implicitly being invoked, which, given that this is supposed to hold an int, would always return false. And checking the int value doesn't seem to make sense either, since that would only exclude turns=0 (which would be a dumb value, but I'm not sure that's what this is for. So I figured a 'has attribute' check is best.
2024-07-31 22:47:01 -04:00
Charles Dang
18b9bf7c23 AI/Manager: clean up a few constness things 2024-07-31 22:38:23 -04:00
Charles Dang
f3c569a10d AI/Manager: clean up unnecessary uses of this-> 2024-07-31 22:19:28 -04:00
Charles Dang
40a071fbc5 AI/Manager: clean up a nasty case of string concat 2024-07-31 22:11:06 -04:00
Charles Dang
3b1eb6580f Use standard feature check macros instead of the global HAVE_CXX20 flag 2024-07-31 14:45:05 -04:00
Charles Dang
b295364979 Attempt to fix utils::reversed_range 2024-07-31 14:45:04 -04:00
Charles Dang
e0507c1156 Test use of std::string::ends_with 2024-07-31 14:45:03 -04:00
Gunter Labes
8a67ee5101
Demote some messages to debug level 2024-07-31 08:56:31 +02:00
Gunter Labes
7355ee2eb7
Remove trailing whitespace 2024-07-31 08:51:46 +02:00
Charles Dang
fa905a6165 Added some heterogeneous comparison config tests 2024-07-30 22:48:40 -04:00
Charles Dang
e36b675ec4 New config_attribute_value::operator== implementation 2024-07-30 22:48:40 -04:00
Charles Dang
1ba0168eb3 Removed serialization test that relies on deleted ostream operators
These were removed in C++20. See https://en.cppreference.com/w/cpp/io/basic_ostream/operator_ltlt2
and https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1423r3.html#option7
2024-07-30 21:03:43 -04:00
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
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
Subhraman Sarkar
99d66cc893 use drop cap for the tip of the day message
additionally, now only one of game_title and game_title_background is needed. An error will happen only if both of them are absent.
2024-07-16 13:07:57 +05:30
Subhraman Sarkar
a973fd4ab3 allow multiple backgrounds
Game_title_background can be a comma separted list of backgrounds.
if multiple backgrounds are present, one of them will be chosen at random when the UI reloaded.
2024-07-16 13:07:57 +05:30
Subhraman Sarkar
43f0e05d57 preferences dialog: expose option for switching gui2 themes 2024-07-16 13:07:57 +05:30
Subhraman Sarkar
636378f0f8
update bengali locale info (#9100)
without this Bengali will be sorted at the end of the language selection list
2024-07-15 22:58:15 +06:00
Wedge009
11506811ff Update copyrights: Write CSV as UTF-8 2024-07-15 15:05:27 +02:00
Gunter Labes
fe09128ee5
WC: documentation update 2024-07-15 11:57:34 +02:00
Gunter Labes
1f58cf1197
Simplify user data dir determination
Behavior should be generally as in 1.18 except for interpreting relative paths
normally instead of under $HOME. The latter was warned about for quite a few
versions now.

Also make sure normalize_path does not cause the path to become empty.
2024-07-14 14:46:39 +02:00
Charles Dang
95e81a48a6 Attack Prediction: clean up some unique_ptr usage
According to cppreference, this use of make_unique for array types value-initializes
the array, which here is equivalent to zero-initialization.
2024-07-13 16:32:09 -04:00
Charles Dang
43a574ac62 Replace a few more cases of INT_MAX 2024-07-13 16:29:11 -04:00
Wedge009
e49addc585 Update copyrights: Always use slashes for the file path
Avoid discarding the entire copyrights.csv when running the update on Windows, and force slashes in file path strings if adding new files.

* Also rename hash object to avoid collision with built-in hash function.
* Clarified file object is representing a file path string as opposed to an actual open file object.
2024-07-13 16:29:38 +02:00
Nils Kneuper
c0541dce06 updated Finnish translation 2024-07-13 11:31:53 +02:00
Nils Kneuper
448ab75188 updated Chinese (Simplified) translation 2024-07-13 11:30:37 +02:00
Nils Kneuper
d5958da34c updated Bengali translation 2024-07-13 11:29:40 +02:00
doofus-01
5fff9c5c3f
EI: Cleanup of urbanjungle terrain type
Cleans up the help browser and fixes #8497 (and makes the icon no longer pink).
2024-07-12 14:58:15 +02:00
Charles Dang
156630d314 Use std::numeric_limits instead of C macros 2024-07-12 02:49:27 -04:00
Steve Cotton
bcd97b209a updated German translation
Thanks to Wuzzy for all of these.
2024-07-11 22:27:07 +02:00
Gunter Labes
e7acc0e3b9 Perform multiplication in result type for types larger than int
Makes the code do what is commonly expected and avoids needless overflow since
otherwise the multiplication is done as int.
2024-07-11 20:57:57 +02:00
Subhraman Sarkar
e7c09868b7 fix whitespace 2024-07-11 20:46:27 +02:00
Subhraman Sarkar
7ba098a182 mention gui test dialog in manpage 2024-07-11 20:46:27 +02:00
Subhraman Sarkar
7b5b92a0e5 remove non-ASCII quotation 2024-07-11 20:46:27 +02:00
Subhraman Sarkar
10c498c993 update manpage 2024-07-11 20:46:27 +02:00
Subhraman Sarkar
9e87bdd67d fix whitespace 2024-07-11 20:46:27 +02:00
Subhraman Sarkar
815a4379e6 update documentation and move condition to top
thanks to stevecotton for the documentation message for no-log-sanitize
2024-07-11 20:46:27 +02:00
Subhraman Sarkar
8166ab25ab add a command line option for disabling log sanitization (#8505) 2024-07-11 20:46:27 +02:00
Gunter Labes
5461f226e7
Allow manual trigger 2024-07-11 18:04:37 +02:00
Gothyoba
102e1b4629
[Units] update Wyvern Rider description (#9020) 2024-07-10 12:55:44 +06:00
Gunter Labes
d7da385586
WC: Remove bogus comment 2024-07-09 15:26:09 +02:00
Wedge009
aebfcf72a1 EI: Minor changes to item wording. Resolves #9070. 2024-07-09 12:37:49 +10:00
Charles Dang
21cbe43a00 Clean up macOS CI job config 2024-07-08 22:02:32 -04:00
Charles Dang
5a77ff92c6 Revert "color_t: make macOS happy"
This reverts commit 19022f1181.
2024-07-08 22:02:32 -04:00
Charles Dang
c2decdfb58 Remove macOS compat path for std::variant and std::any 2024-07-08 22:02:32 -04:00
Charles Dang
8792655e26 Bump macOS deployment target to 10.13 2024-07-08 22:02:32 -04:00
Wedge009
f793be4fa5 EI S10: Clarify Dacyn's self-sacrifice. Resolves #9066.
[ci skip]
2024-07-09 12:01:23 +10:00
pentarctagon
888fbf13e5 changelog_entries 2024-07-08 17:42:20 -05:00
pentarctagon
f0991ec9c1 remove use of the config directory
the credentials and lan config files will now use the userdata folder
2024-07-08 17:42:20 -05:00
pentarctagon
a6a27ef947 get_prefs_file -> get_synced_prefs_file 2024-07-08 17:42:20 -05:00
pentarctagon
3f3c7628e8 default editor dir cleanup 2024-07-08 17:42:20 -05:00
pentarctagon
ffcd19916b do this right 2024-07-08 17:42:20 -05:00
pentarctagon
bf512a5e1a handle unknown preferences. 2024-07-08 17:42:20 -05:00
pentarctagon
e9f13b1958 Implement reading/writing the synced and unsynced preferences
Reading the preferences will now:
* read the default preferences (if defined) and add them into the preferences config
* read the unsynced preferences and add them on top of any default preferences
* read the synced preferences and add them on top of the default and unsynced preferences.

Writing the preferences works basically the same way, just that it writes out preferences to either the synced or unsynced preferences file depending on the preference. This is determined by the std::arrays added to preferences.hpp and is checked at compile time via the static_assert these these arrays and the prefs_list are all constexpr - forgetting to add a new preference or remove an existing preference to these arrays will cause a compile error.

This also means that unknown preferences will not be written back out, so the removal of any existing "password" and "password_is_wrapped" preferences no longer needs to be explicitly done. Additionally, the clear() and erase() methods are removed:
* clear() is not desireable in the first place and it's not actually applicable to anything currently using it since they're just single attributes at the root of the config object anyway
* erase() is a one liner method that's not needed anymore since all handling now has access to the preferences_ config object
2024-07-08 17:42:20 -05:00
pentarctagon
54ab301343 Move the MP alerts preferences to prefs_list 2024-07-08 17:42:20 -05:00
pentarctagon
80fe9ba84d Move data that should be synced between computers to a common dir
Fixes #8059
2024-07-08 17:42:20 -05:00
ZombieKnight
56afa893bb
WFL: Use correct argument for the second location in rotate_loc_around (#9077) 2024-07-08 08:32:12 -04:00
Gothyoba
7b54d42d4b Updated link to android version in README
The app has been removed from the play store
2024-07-07 22:12:32 +05:30
Toom
35e405dde5 Pick Advance: remove irrelevant objects, closes #5707 2024-07-07 13:56:24 +02:00
Toom
1f0ffe0058 Pick Advance: merge moveto event into turn_refresh, closes #8954 2024-07-07 13:56:24 +02:00
Nils Kneuper
b0e9ac1947 updated British English translation 2024-07-06 10:00:17 +02:00
Nils Kneuper
c0a9d90d18 updated Czech translation 2024-07-06 09:58:09 +02:00
Nils Kneuper
eb23047ad8 updated French translation 2024-07-06 09:56:43 +02:00
Wedge009
c67d130507 SoF: Align masked dwarf portrait to the right, consistent with S9. Resolves #9008. 2024-07-06 11:44:32 +10:00
Steve Cotton
b0c8b69942 Ignore GCC-14 and Clang false positives about dangling pointers
For GCC-13, cfb28fbfb5 (in master)
added -Wno-dangling-reference, and that commit explains why the
false positive is triggered by calling find_widget. For GCC-14
there's an attribute so we can flag this specific function as ok.

Clang complains about unknown attributes in the gnu:: namespace,
so has to have the #if, and the #if means we need the #ifdef.

There are still warnings in src/actions/attack.cpp, but that area is
being worked on for an infinite recursion bug, and those warnings log
in a single batch instead of being spread across multiple .cpp files.

(cherry picked from commit e42f83a8d2,
with an improvement to the documentation after cherry-picking)
2024-07-05 23:19:01 +02:00
Steve Cotton
5e8df616d9 Fix warnings about a template id in a constructor
It's redundant, and GCC-14 warns that this isn't allowed in C++20.

(cherry picked from commit d5b726df6e)
2024-07-05 23:19:01 +02:00
Steve Cotton
1c9e3f220c Fix dangling reference warnings about refs to iterators
These are causing warnings with GCC-14.

An iterator can often be a struct containing a single pointer, so
creating a reference to such a small struct doesn't make sense.

The structure returned by child_range is likely to be exactly two
pointers, so it's not a burden to keep it even though back() has
already finished accessing the child_iterator.

(cherry picked from commit 087fa65dc5)
2024-07-05 23:19:01 +02:00
Charles Dang
791eed42cf Optimize color_range reference palette generation
For this specific codepath on game launch, it reduces it's execution time from ~18ms to ~1ms.
2024-07-05 16:19:02 -04:00
Subhraman Sarkar
4c1b1ebe20 reduce hardcoded extensions in python files, only instance at wmltool3.py 2024-07-05 09:05:26 +05:30
Subhraman Sarkar
078c618f3a reduce hardcoded extensions in cpp files, only instance at filesystem.cpp 2024-07-05 09:05:26 +05:30
Steve Cotton
c930a7e476 Delete the wmltools3.Translation class
Appears to be unused, and is still Python2 code. To be Python3, these
lines need to change:

- f = file(fn)
+ f = open(fn, encoding="utf-8")

- gettext = f.read().decode("utf8")
+ gettext = f.read()

Even knowing how to make it work, it still doesn't seem useful to keep.

wmlunits uses html_output.Translation, but that's not this class. It's
a wrapper around Python's standard gettext library, in html_output.py.
2024-07-04 16:37:39 +02:00
Steve Cotton
de48a16034 Remove unused dawn.png image, update copyrights.csv
dawn.png was leftover from the Time of Day being shown with an overlay
image; 074e157400 removed dusk.png and
night.png. The image itself should be a transparent blue hexagon, but
the alpha channel was corrupted, and so it appeared completely
transparent.

In copyrights.csv, make the capitalisation of Kitty's name consistent,
and attribute the orb-disengaged.png image.
2024-07-04 14:56:23 +02:00
Subhraman Sarkar
9496dd4edf add po hint 2024-07-04 02:31:47 +02:00
Subhraman Sarkar
b6e8142780 use correct font for tick character (#9055) 2024-07-04 02:31:47 +02:00
pentarctagon
1c19eb0da0 mention cmake flag 2024-07-03 09:16:23 -05:00
pentarctagon
2991c38955 change back to dot 2024-07-03 08:47:13 -05:00
Severin Glöckner
bf3cf83dfd German translation update 2024-07-03 12:38:29 +02:00
Pentarctagon
6812eac403
show a message when nothing exists to migrate (#9025) 2024-07-02 18:14:06 -05:00
pentarctagon
f1b90e91a9 fixup 2024-07-02 17:49:07 -05:00
Steve Cotton
91f59a794b wmltools3: fix regexp compatibility with Python 3.12 2024-07-02 19:42:13 +02:00
Steve Cotton
17c202d3fb GUI2/Game Load: Apply filter when changing directory
When the user types something into the filter box and then changes to
a different version, apply the filter immediately instead of showing
the full list of files.

The drop-down to switch between directories is hidden unless savegames
from other versions are detected. The button will appear at the
bottom-left in master, and at the top of the dialog in 1.18.
2024-07-02 16:02:26 +02:00
pentarctagon
b77b983319 address feedback. 2024-07-01 13:51:40 -05:00
pentarctagon
171423bb8a remove scons' use of removed relative prefs dir functionality 2024-07-01 13:51:40 -05:00
pentarctagon
c6a4d1d4da deduplicate binary paths list 2024-07-01 13:51:40 -05:00
pentarctagon
cc3a02bd32 Fix finding the current exe name on macOS 2024-07-01 13:51:40 -05:00
pentarctagon
d911a86a8f ensure the userdata is initialized before trying to use the preferences 2024-07-01 13:51:40 -05:00
pentarctagon
7895b843fa Prevent program hang when compiled with relative path PREFERENCES_DIR
Fixes #2000
Fixes #9007
2024-07-01 13:51:40 -05:00
Toom
081866af7b
Add unit_hits, unit_misses events
Added new events "unit hits/misses" to simplify creating events that use attacker+defender hits/misses (issue #7782)
2024-06-30 12:02:55 +02:00
loonycyborg
55b6010f77
appstream manifest: merge <provides> tags to placate flathub's linter 2024-06-29 22:08:32 +03:00
Subhraman Sarkar
103b80ff01
Editor enhancements (#8903)
Map/Scenario Editor

* Rename Load Map to Load Map/Scenario (since it can load both), Edit Scenario to Edit Scenario Settings, Save Map to just Save.
* Rearrange menu order
* Add icon for the preferences menu item (used the preexisting settings.png icon)
* Open folder correctly at Add-on's scenario directory instead of editor/scenarios. (#8910)
* Show Save Scenario As only for Scenarios
* Use the settings.png icon for Preferences menu item
* Add functionality to "Loyal" checkbox (Unit tool -> Place unit -> Right click menu) (#8445)
* Show warning when maps are saved in scenarios folder or vice versa (#8911)
* Unit List moved to Units menu from File menu to reduce some pressure from the latter.
* Status Table menu item disabled since it does nothing. (Should be reenabled once the functionality has been added.)
* Improve reload functionality in Editor (F5). Reload happens directly from memory and no temp files are needed. Also, the undo/redo stacks will be preserved. (#9024)

Time Schedule Editor

* Browse buttons now set wesnoth style paths instead of just pasting the absolute path returned by the file dialog
* Change text boxes from inactive to uneditable.
* Code generation improvements
* Add copyright notice to tod_new_schedule
* Confirmation messages
* Preview buttons for image and sound files and new icons for the preview button (2 sets : preview image and preview sound)

Unit Type Editor
 * Confirmation messages
 * New icons for the preview button (2 sets : preview image and preview sound)

Add-on menu
 * Two new menu entries for (1) opening the Add-on selection dialog, (2) opening the folder corresponding to the Add-on
The open add-on folder option shows a GUI2 file dialog at the add-on's folder which can be used to open any file. If it is a loadable map/scenario it will be opened in the editor, otherwise the OS's default application for that file will be opened.

File Dialog
 * Redesigned with new icons
 * New Open External button that opens selected file/folder in the platform's default application (independently of what pressing Open would do). This could be used to quickly open a folder or preview the file before actually selecting it.
 * Extension checking and filename validation. (See #8911)
2024-06-29 21:56:54 +05:30
Nils Kneuper
28a6a2a8b1 updated Chinese (Simplified) translation 2024-06-29 14:44:17 +02:00
Nils Kneuper
18af036313 updated French translation 2024-06-29 14:42:55 +02:00
Nils Kneuper
bcd370c149 updated Bengali translation 2024-06-29 14:28:43 +02:00
Nils Kneuper
d232827762 updated British English translation 2024-06-29 14:27:00 +02:00
gfgtdf
88113a738d
Handle require_modification as the client expects
Since 05d1e4b9ba, the client interprets require_modification="" as
defaulting to "yes". However, wesnothd was still defaulting it to
"no", causing an error message when trying to join games.

Fixes #8805 "Add-on version check prevents joining game".
2024-06-27 10:25:23 +02:00
Charles Dang
a1fe293b88 color_t: flip hex check logic for readability
Improves 6f32635788
2024-06-27 00:28:18 -04:00
Charles Dang
b505f8f744 Replace stray uses of std::make_optional
C++17 CTAD makes it unnecessary.
2024-06-27 00:27:15 -04:00
pentarctagon
291be986f6 Revert "GUI2/Addon Manager: make addon id more prominent, debug-only"
This reverts commit 78620c7d61.
2024-06-25 19:18:42 -05:00
pentarctagon
dc8637b08b Revert "GUI2/Addon Manager: hide addon id label earlier"
This reverts commit d1bf5dd778.
2024-06-25 19:18:35 -05:00
Gothyoba
16c4a57556
Tutorial: AToTB is a "novice" campaign 2024-06-25 18:42:32 +02:00
Steve Cotton
87b6371523 AToTB: Warn in the description how hard the challenging difficulty is 2024-06-25 14:03:26 +02:00
Charles Dang
19022f1181 color_t: make macOS happy 2024-06-24 20:00:39 -04:00
Charles Dang
1d5d964bb3 Expose color_t errors in palette ops 2024-06-24 20:00:39 -04:00
Charles Dang
675d963016 color_t: use utils::from_chars 2024-06-24 20:00:39 -04:00
Charles Dang
6f32635788 color_t: validate hex string input (resolves #9030) 2024-06-24 20:00:39 -04:00
Nils Kneuper
e67a91caf2 updated French translation 2024-06-22 23:07:25 +02:00
Nils Kneuper
fb71eac1b8 updated Ukrainian translation 2024-06-22 23:05:47 +02:00
newfrenchy83
77d023690a Generalize the use of max_value and add the min_value attribute
In the case of [leadership], the fact that the values of each ability can be added when cumulative=yes can justify the addition of limit values not to be exceeded, but this can also apply to heals and [regenerates] with the use of 'add' or 'multiply'.

As for [resistance], it already uses max_value, but if cumulative=yes, then all max_values can add up which could be problematic.
2024-06-19 09:18:54 -05:00
Charles Dang
d1bf5dd778 GUI2/Addon Manager: hide addon id label earlier
Should fix a find_widget failure on small resolutions when it's "hidden"
in the details layer of the widget stack.
2024-06-19 00:33:33 -04:00
newfrenchy83
42c72ce1f9 Fix damage_type types show in unit attack window
If [damage_type]apply_to= is applied to a unit that does not have the range attack equivalent to that of the user this type will still be shown, which should not be.
2024-06-18 22:39:57 +02:00
pentarctagon
1712b357c2 1.19.1+dev 2024-06-17 10:50:57 -05:00
pentarctagon
6189964a77 1.19.1 2024-06-17 10:49:01 -05:00
pentarctagon
d63e06d87a pot-update and regenerate doc files 2024-06-17 10:33:41 -05:00
pentarctagon
5e62283646 changelog_entries 2024-06-17 10:24:27 -05:00
Subhraman Sarkar
0a4b2d3202 use correct method to attach the signal
the signal is "on_left_click", so logically the correct method is connect_signal_mouse_left_click.
2024-06-17 08:48:13 -04:00
pentarctagon
552cfbca32 add a bit of extra logging 2024-06-16 23:19:02 -05:00
pentarctagon
7ac6a78893 Explicitly specify the type when returning pref values
Otherwise bool preferences at least seem to always just return false.
2024-06-16 21:43:45 -05:00
Gunter Labes
6d6bb8dc0c
Update generator calls since the method was removed in 2413e2f 2024-06-16 21:51:16 +02:00
Gunter Labes
11465fec86
Update added/removed header files in Xcode project
Header files added/removd in commits: c4c292fa3b, 43f5644e36, 3279973960, c5b1fa9dfd, d954d307bc, 01f28b12ae, 63d14217c9, 6d77fdc48c, 0e85fac29c, 0b646dec8a and 6c5a8e923d
2024-06-16 20:36:45 +02:00
Gunter Labes
bce74092ba Remove extra parens to avoid compiler warning 2024-06-16 19:53:04 +02:00
doofus-01
ae8556a4c6
dragoon/cavalier animations
* melee anim for Dragoon

* wounded bob for dragoon

* cavalier melee anim

* update copyrights
2024-06-16 08:07:07 -07:00
Pentarctagon
a2993884cd
Add berserk weapon special abilities tests (#8973)
Changes:
* CHECK_STRIKES macro now takes a comma-delimited list of strike counts for when units have a different number of strikes for different weapons, and updates the existing usage in the attacks tests
* Fixed a typo in the attacks_zero test
* Adds tests for berserk as a weapon special ability.

Berserk's handling differs from attacks as a weapon special ability:
* A value less than 1 is treated as effectively infinite rounds of combat (undocumented)
* The cumulative attribute is handled differently - in some cases it sums the values instead of using the highest single value whereas for attacks it always uses the highest single value

Also now exclude data/tests/ from scons pot-update since it was hitting the argument limit for number of arguments to a script.
2024-06-15 20:20:54 -05:00
Nils Kneuper
1ef24e461f updated Chinese (Simplified) translation 2024-06-15 12:49:04 +02:00
Nils Kneuper
e78e5e9ad8 updated French translation 2024-06-15 12:48:04 +02:00
Subhraman Sarkar
441b2bbfaa
network_download_file: replace spaces with tabs (#8999) 2024-06-14 09:05:12 -04:00
Gunter Labes
944ed026a2 Use same default id in [remove_unit_overlay] as [unit_overlay] 2024-06-13 18:02:05 +02:00
Gunter Labes
28a8959854 Fix "span" regex
This disallows matching "0-11-2" and "1," for example. It also avoids an exponential backtracking issue which could make this regex very slow.
2024-06-12 19:52:50 +02:00
loonycyborg
a7483313d9 Change id tag in appstream manifest to what is expected
Flathub linter complains about mismatched id in flatpak manifest and
appstream. Based on appstream docs it seems that reverse-DNS name is
expected without .desktop extension so appstream should be changed.
Extra <provides> and <replaces> tags added as per
https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines/#renaming-id-tag
2024-06-12 04:21:22 +03:00
Dalas121
59ccd7ce8a
EI S10: add message about Owaec being able to recruit (#8987)
Owaec has a crown but little other indicator that he's a leader, and this scenario requires him to be used to recruit. Make it more obvious to the player.
2024-06-10 10:30:36 -05:00
Dalas121
6bd7832c61
EI items: add [filter_second] to Sentinel Shield and set delay=0 (#8984)
Delay=0 fixes an annoying animation issue, as the default is delay=500.
2024-06-09 21:10:53 -05:00
Dalas121
e1fa71cf16
EI S13: fix gaoler rebuild breaking "free prisoner" events (#8980)
Formerly, EI S13 uses various Deathblades' max-moves status instead of [filter_second] for some reason. This breaks when deathblades get rebuild, which in the bug report was caused by the sentinel shield. Use [filter_second] instead.
2024-06-09 21:10:26 -05:00
Dalas121
8efcb80685
EI S11: drop equippable items when imprisoned (#8982)
This is thematic, and also prevents cheese with shield+dacyn and baneblade+gate
2024-06-09 21:09:58 -05:00
Dalas121
43d6d87939
EI S10, S11, S12: Dacyn difficulty tweaks (#8976)
Resolves #8969

In EI S10, Dacyn picks up a cursed amulet and his HP drops to 1. In EI S11, Dacyn remains on very low HP, and is surrounded by orcs. There's a convenient ford hex he can hide on and be protected, but several players did not notice this hex and complained about difficulty.

In S10, this commit also drops his XP to 0. 1) showing that the amulet interferes with his MoL-ing, and 2) preventing the player from deliberately AMLA-ing Dacyn in the next scenario (partially a difficulty issue, but mostly it's bad to punish blind playthroughs / reward foreknowledge).

In S11, this commit adds a gold pile on Easy/Normal hinting towards the hex, while on Easy Dacyn's HP is fully restored. Hard is unaffected.

In S12, this commit restores Dacyn's HP on Easy (since it would be odd if he had full HP S11 but low HP S12).
2024-06-09 21:09:17 -05:00
Dalas121
6da672b6e1
EI S09: fix Grug telling Gweddry he can recruit the wild ogres after having already done so (#8981) 2024-06-09 21:08:51 -05:00
Pentarctagon
971073055e
Refactor the preferences into a proper singleton. (#8930)
The current preferences handling is a mess:
* it's essentially a global config object that anything can modify in any way the caller wants, which is managed across multiple source files which have their own oddities and interdependencies.
* the general preferences has its own bit of SDL event handling and while I get the idea behind `events::sdl_handler` there's no reason to have SDL events handled in the preferences instead of just calling the relevant preferences setter for each event when it happens.
* the general preferences is where most of the preferences are handled and has its `base_manager` struct, which is part of the `manager` struct in the game preferences, which is then implicitly initialized as part of game_launcher's constructor.
* the editor preferences are the only preferences in a sub-namespace `preferences::editor` while all other preferences are just in the `preferences` namespace.
* the display, editor, and lobby preferences are all dependent on including the game preferences, the credentials are dependent on including the general preferences (but not the game preferences), the game preferences are dependent on including the general preferences, and the advanced preferences are entirely their own thing which is dependent on none of the other preference functionality and manages its own singleton.
* nothing checks whether the preferences file has actually been loaded before allowing values to be read from or written to the preferences config - if you attempt to get a value too early in wesnoth's initialization it will silently just give you whatever the default value for that preference happens to be.

With this there is instead a single access point (with exceptions handled via friend functions/classes), all predefined preferences are accessed via their own setter/getter, and all mainline preferences are defined in a single file (preference_list.hpp) so it's easily findable what preferences exist and where they're used. Having the list of all mainline preferences listed out also allows the lua preferences API to provide that full list rather than just the list of the preferences that have been set so far. Also it now checks for whether the location of the preferences file is known before attempting to load the preferences file and asserts if someone attempts to use the preferences too early.
2024-06-09 11:34:09 -05:00
Dalas121
81a1ef260d
EI S10: reduce difficulty on Easy/Normal (#8956)
https://www.reddit.com/r/wesnoth/comments/1d6a3e7/eastern_invasion_is_much_better_but_still_bad/

EI's S10 is overly hard on Normal, and especially on Easy (which is intended to be a very accessible difficulty). This PR increases the available gold and adds several villages, which aid in both defense and upkeep. This PR also drastically reduces the number of orcs on lower difficulties.

We also move Owaec to his keep to help imply his ability to recruit, and remove the related just-added [note] string to avoid violating 1.18.1 string freeze.
2024-06-09 10:29:45 -05:00
Nils Kneuper
17ff25de5c updated Ukrainian translation 2024-06-09 09:16:51 +02:00
Steve Cotton
9cc0b15fbc Add a unit test for a weapon-special activating mid-attack
A weapon with poison, which does extra damage to poisoned opponents.
This tests that the weapon-special's filter is checked on each strike,
instead of being tested once and then cached during the battle.

(cherry picked from commit 55aa8b44cf)
2024-06-08 22:08:28 +02:00
Severin Glöckner
c2fbb745f7 terrain2wiki tool: link to images on stable 1.18 branch 2024-06-08 21:18:03 +02:00
Severin Glöckner
136f96e428 German translation update 2024-06-08 21:13:19 +02:00
Severin Glöckner
564c96a7e9 terrain2wiki tool: python 3.12 compatibility 2024-06-08 20:56:21 +02:00
Nils Kneuper
066419efba updated Chinese (Simplified) translation 2024-06-08 15:42:38 +02:00
Nils Kneuper
052452bf3b updated Japanese translation 2024-06-08 15:41:37 +02:00
Nils Kneuper
39dcc41750 updated French translation 2024-06-08 15:40:42 +02:00
Nils Kneuper
28a772ae8f updated Czech translation 2024-06-08 15:39:46 +02:00
Nils Kneuper
334b748990 updated Bengali translation 2024-06-08 15:38:28 +02:00
Subhraman Sarkar
c12bb8ef69
replace deprecated CURLOPT_PROTOCOLS with CURLOPT_PROTOCOLS_STR (#8958)
* replace deprecated CURLOPT_PROTOCOLS with CURLOPT_PROTOCOLS_STR
* use conditional compilation for curl 7.85.0
2024-06-08 14:15:06 +05:30
newfrenchy83
1809af8cdf
Modify 'apply_to' in an ability filter to do an inclusion check for resistance abilities
Instead of needing to contain the exact string from the ability, 'apply_to' in the filter is now taken as a comma-separated list, where all elements need to be present in the ability.
For example if we filter for apply_to=fire,arcane given an ability [resistance]apply_to=arcane, fire, cold, it will match.
For an ability [resistance]apply_to=arcane, impact, cold, this will not match because 'fire' is missing.
2024-06-07 18:08:43 +02:00
newfrenchy83
2c13a67fa6 Fix sidebar always showing text for [damage_type]alternative_type=
When any of the images is missing, a text description is shown as a fallback.
The bug being fixed is that the search for the secondary PNGs used the basename
with neither the directory nor the ".png".

The existence of the files controls a single conditional block, but was using
three bools with two dedicated to single files and one shared between all the
alternate files. This changes it to a single bool shared between all files for
clarity.
2024-06-07 17:02:33 +02:00
Subhraman Sarkar
43f5644e36
Rich Text Label widget for Help Browser GUI2 port (#8655)
A rich text label widget that can show text marked up with help markup.
Also includes the GUI Test Window, accessible in the title screen after launching wesnoth using --clock option. It can be used as dialog template/example or as a place to test GUI2 code.
2024-06-06 16:33:37 +05:30
newfrenchy83
9dd2d5d94b
Use type_adv_tree in some filters to support addons adding advancements to existing unit types (#8895) 2024-06-05 11:49:33 +02:00
Dalas121
ebbe03dc6c
EI: use fancy script for "Part II" "Part III" storytext (#8941)
In add-on form, EI used images to display "Part II" and "Part III". For translation reasons this got replaced with ugly title_text when the add-on went mainline.

This PR once again makes the "Part II" "Part III" storytext more fancy, while maintaining translatability.
2024-06-04 20:03:40 -05:00
Dalas121
f442e09e05
EI S10: specify that Owaec can recruit (#8950)
https://www.reddit.com/r/wesnoth/comments/1d6a3e7/eastern_invasion_is_much_better_but_still_bad/?rdt=58522

Owaec has a leader icon, but it's not made explicit that he can recruit units. In most scenarios that doesn't matter, but in S10 he becomes isolated from Gweddry and must recruit to survive.

Note that there's already a '[show_objectives][/show_objectives]' when 'orcs_attacking' is set.
2024-06-04 20:01:36 -05:00
Gunter Labes
f2d22d6364
Fix indentation 2024-06-04 23:15:49 +02:00
newfrenchy83
84c62456a3 Fix sidebar's display of attacks with damage_type specials
When a [damage_type] affected an attack, the old code assumed that it would have an alternative_type.
If that assumption failed, it would add ("type_" + an empty string), causing "UNTLB type_" to be shown
in the sidebar.

UNTLB is itself a shorthand for "untranslatable", see language.cpp for an explanation.
2024-06-03 17:15:18 +02:00
Gunter Labes
f4e8635723 Implement table sorting without tablesorter.js
This allows getting rid of a bunch of dependencies for minimal own code.
2024-06-03 17:08:33 +02:00
Steve Cotton
d7542c5ec4 Fix the whitespace error 2024-06-02 15:15:22 +02:00
Dalas121
28f93b4b8d
EI: use "bonus objective" instead of "optional objective" (#8947)
"optional" may imply that the scenario will be completed once this objective is finished, which is not accurate for these scenarios.
2024-06-01 17:57:19 -05:00
Dalas121
e293e9874d
EI S06b: clarify bonus objectives
https://forums.wesnoth.org/viewtopic.php?p=690528#p690528

Old verbiage suggested that the scenario would be won as soon as you moved any unit next to Yannic, and didn't give any indication that he'd need to be protected.
2024-06-01 17:49:46 -05:00
Nils Kneuper
a2851f5ca6 updated British English translation 2024-06-01 14:38:36 +02:00
Nils Kneuper
fea253ef0b updated Bengali translation 2024-06-01 14:37:16 +02:00
Nils Kneuper
efa1da31d9 updated French translation 2024-06-01 14:36:27 +02:00
Nils Kneuper
198423debb updated Chinese (Simplified) translation 2024-06-01 14:35:21 +02:00
Severin Glöckner
049706efda Add [part]text_alignment= to schema 2024-05-31 19:07:13 -04:00
pentarctagon
1629258d9b fix for targeting macos 10.12
note that this will no longer be possible once macos-12 is removed from CI eventually
2024-05-31 11:33:07 -05:00
Wedge009
858df2d491 SoF S6: Apply @doofus-01's proposal to remove reference to finding Alanin when he is already present among the dwarves.
Resolves #8311.

[ci skip]
2024-05-30 22:37:49 -05:00
Wedge009
d3624f4df4 HttT tip: Change Delfador's quote date to the start of HttT, as requested by @Konrad22.
There's no particular reason why Delfador should say this during HttT, but perhaps it will make the connection to the campaign clearer.

Closes #8365.

[ci skip]
2024-05-30 22:37:32 -05:00
gfgtdf
5ef08cee71 remove deprecated controller=<number>
This was deprecated back in 1.13.1
2024-05-27 21:13:09 +02:00
Subhraman Sarkar
5d06a8f463 putting into test textdomain so schema CI check can suceed 2024-05-27 19:41:31 +05:30
Wedge009
e3aeab3f27 Game version dialogue: Don't mark links for translation.
[ci skip]
2024-05-26 21:27:34 -04:00
Charles Dang
78620c7d61 GUI2/Addon Manager: make addon id more prominent, debug-only
It wasn't visible enough for people for whom it was useful, and too visible for people for whom it was not.
2024-05-26 18:18:11 -04:00
pentarctagon
279c7daa33 1.19.0+dev 2024-05-26 15:16:01 -05:00
pentarctagon
d39e42b672 1.19.0 2024-05-26 15:13:59 -05:00
pentarctagon
397779f9dd pot-update and regenerate doc files 2024-05-26 15:10:25 -05:00
pentarctagon
b3247d3dfc changelog_entries 2024-05-26 15:06:55 -05:00
pentarctagon
2a243de31d ignore generated about.wiki 2024-05-26 15:01:24 -05:00
pentarctagon
94e216fb90 ignore generated macro-reference.html 2024-05-26 14:59:42 -05:00
Steve Cotton
7217f90039 Update changelog
Add entries for Git commits that are visible to players or UMC authors,
but which don't already have a file in the changelog_entries directory.
2024-05-26 14:52:39 -05:00
Jonathan-Kelly
e47a012623 Mudcrawlers better in swamp, worse in buildings
Resolves #8823
2024-05-26 12:17:25 -05:00
Jonathan-Kelly
c45d94e0f7
WoF S8: clarify objective notes (#8906) 2024-05-26 08:25:15 -04:00
newfrenchy83
9fc5887ae9 'value' attribute in [experimental_filter_ability(_active)] can have 'default' value 2024-05-26 13:48:45 +02:00
Nils Kneuper
6fe64d5cd7 updated Ukrainian translation 2024-05-26 11:44:28 +02:00
Nils Kneuper
013bad1093 updated French translation 2024-05-26 11:43:43 +02:00
white-haired-uncle
4b9c92a87f
set buttons inactive when irrelevant (#8920) 2024-05-26 03:31:28 -04:00
Subhraman Sarkar
bd36e29ffa
add changelog entries (#8922) 2024-05-26 11:29:37 +05:30
Subhraman Sarkar
da7e57422e
make sure bullets in about dialog use a font that has those character (#8921) 2024-05-26 11:29:07 +05:30
Steve Cotton
c2072f201d gui/language_selection: Rephrase text about becoming a translator
The link with details about individual compaigns is useful to players,
even if they aren't looking to become translators. So move it upwards.

The text about first-time players seemed confusing to me, as the choice
is already limited to languages that the player can read. Reworded it,
but after discussion in the PR, neither version was better than just
removing it.
2024-05-26 04:09:34 +02:00
Charles Dang
6c885c5db4 GUI2/Story Screen: only use area between images for Skip text 2024-05-25 02:45:42 -04:00
Charles Dang
7f814b1e7e GUI2/Game Load: don't flip the unknown unit image 2024-05-25 02:44:47 -04:00
Charles Dang
310919b464 Fixup b548e7348d 2024-05-25 02:44:26 -04:00
Charles Dang
fe71878bfc LoW S1: fixed typo in image path 2024-05-25 01:20:27 -04:00
Charles Dang
ebc3953e8b GUI2/Unit Create: increased list padding 2024-05-25 01:14:28 -04:00
Charles Dang
b548e7348d GUI2/Preferences: increased padding in hotkeys list 2024-05-25 01:14:15 -04:00
Charles Dang
91287d0fbf GUI2/Preferences: bumped max height slightly 2024-05-25 01:13:48 -04:00
Charles Dang
5e3a86f7ab GUI2/Game Load: refined design for the umpteenth time 2024-05-25 00:57:27 -04:00
Charles Dang
7e2a99dc20 GUI2/Listbox: enabled view-only mode
Currently for the vertical listbox only, since it does have some quirks. Removes the assert in the "show" policy checking if the callback is null. It won't be for the listbox, but doesn't really matter since it's not used.
2024-05-25 00:54:29 -04:00
Charles Dang
fb78528f2c GUI2/Story Viewer: fixed controls moving with long story sections 2024-05-25 00:48:20 -04:00
Charles Dang
4cb9df8e6c GUI2/Story Viewer: refine recent design updates, fix some layout issues 2024-05-25 00:26:11 -04:00
Charles Dang
9f1a92d71a GUI2/Widget: draw debug borders in the foreground 2024-05-24 21:25:14 -04:00
Charles Dang
d79fcdc065 GUI2/Widget: fixed long-standing debug border issue
Namely, it not working. At this point, the viewport had already been set to the local coordinates of the widget, so the draw origin needs to be 0,0, not the widget's position in screen space.
2024-05-24 21:24:22 -04:00
Charles Dang
ab3fc34f5c GUI2/Scroll Label: removed custom click handler
This was only added for the storyscreen, which can be handled instead by registering the click handle directly.
2024-05-24 21:20:20 -04:00
Charles Dang
8a0a1ac539 GUI2/Story Viewer: attached click handler directly to label 2024-05-24 21:17:48 -04:00
Dalas121
e2f893c2ea
EI S17b: fix Mal-Ravanal pausing to capture villages
Many turns into EI S17b, a pre-existing lich changes sides and transforms into Mal-Ravanal.

Before this commit, this process would un-capture any villages previously captured by that side, causing Mal-Ravanal to waste turns retaking them.
2024-05-24 20:15:44 -05:00
Dalas121
2027057689
EI S06b: weaken eastern leader guards on lower difficulty
To complete EI's S06b, the player must fight through a necromancer and his bodyguards. Prior to this commit, the necromancer's bodyguards did not vary by difficulty, making Easy disproportionately difficult.

Other leaders do not need to be fought directly to win. In addition, this is an optional mission labeled as more difficult. Therefore, I haven't adjusted other leaders' guards' difficulty scaling.

https://forums.wesnoth.org/viewtopic.php?t=57915
2024-05-24 20:12:12 -05:00
Dalas121
dbed8aa4e9
EI S04b: add objective note regarding herb distribution.
S04b's alternative objective involves collecting herbs that semi-randomly spawn around the map, hidden under fog. Herbs spawn in all directions, but the map layout and scenario design can lead players to expect herbs to all be in the east. This objective note clarifies herb placement.

https://forums.wesnoth.org/viewtopic.php?t=57915
2024-05-24 20:10:21 -05:00
Jonathan-Kelly
b3a8d02774
WoF: fix Lua type error with cast to number (#8773)
Lua was getting this variable without being told it is a number rather than a string. On some systems it is interpreted as a string which breaks this monster spawner code and throws Lua error messages onto the player's screen.
2024-05-24 13:30:01 -04:00
Jonathan-Kelly
a8194ee764
WoF S11: fix easy win AI exploit (#8774)
Fixes #8759
2024-05-24 13:12:19 -04:00
Subhraman Sarkar
9b38089db0
Story screen redesign (#8510) 2024-05-24 19:29:46 +05:30
Dalas121
2591899723
EI S09: add label to gold pile
EI's S09 has a small pile of gold some distance off the main path, visible through the shroud.

Without a label, players may over-commit units/upkeep to getting the gold without realizing it's only a small amount, and possibly worth skipping.
2024-05-22 17:21:12 -05:00
Dalas121
f539e70706
EI: remove random traits from S16 townsfolk (#8896)
Units with traits may sometimes have quick and may sometimes not have quick. This causes civilians to randomly block certain castle hexes that the player can use to recruit.

Remove traits to prevent this random blocking. Increase MP 4->5 to prevent 2 castle hexes from always being blocked.
2024-05-22 09:54:45 -05:00
pentarctagon
21d0e79cc3 preferences accessor cleanup
have external access to the preferences go through explicitly named accessors as much as possible rather than directly using get() and set(). also have the general preferences file directly use its `prefs` config.
2024-05-22 09:53:37 -05:00
pentarctagon
80d09b47c1 formatting
it's a pet peeve of mine, but the name of a type is ie "toggle_button*" aka toggle_button pointer. the asterisk or ampersand is part of the type and should be separated.
2024-05-22 09:53:37 -05:00
pentarctagon
962e0c35ac CI update 2024-05-22 09:53:21 -05:00
pentarctagon
2bc0ff1b1c sort the full list of files by name 2024-05-22 09:53:21 -05:00
pentarctagon
b30e6b2658 print files/rows that have issues 2024-05-22 09:53:21 -05:00
pentarctagon
f9f67eb6e1 write updates back to same file 2024-05-22 09:53:21 -05:00
Dalas121
7fde3f5ab6
EI: simplify S16 achievement (#8897)
The current S16 achievement requires that the player don't recall any units or have any items.

Some items are undroppable, which can make this achievement impossible if you give one to a loyal auto-recalled unit early in the campaign.

This PR alters the achievement to only care about droppable items.
2024-05-22 09:51:02 -05:00
Earth-Cake
b772c241e2 liberty generals name achievement fix for dawn 2024-05-21 23:21:37 -05:00
Dalas121
da47ecf25d
EI: Prevent Dacyn from using the Plague Staff (#8892)
Fixes #8885
2024-05-21 11:14:44 -05:00
Wedge009
73cc52b506 wmlxgettext: Remove unused WmlDefineState class disabled-as-comment/string and resolve #8867 (Python 3.12 highlighting invalid escape sequence in string with SyntaxError). 2024-05-21 14:55:09 +02:00
newfrenchy83
3d097f2950 add [filter_wml] to filter abilities like [experimental_filter_ability], [experimental_filter_ability_active] or [overwrite][experimental_filter_specials]
adding a sub-filter should make it possible to take into account the sub_tags of the abilities in the checking
2024-05-21 14:54:44 +02:00
Toom
9e08a78bf5
Reject [terrain] with unknown terrain type 2024-05-21 11:34:41 +02:00
Subhraman Sarkar
e262954c13
correctly open the initial tab (#8889) 2024-05-21 14:02:04 +05:30
Subhraman Sarkar
92d66554dd
UI : About dialog (#8803)
* Redesigned the version dialog to serve as a general purpose About dialog.

* Credits button removed from title screen

* Moved community dialog contents to about dialog as new tab

Co-Authored-By: Pentarctagon

* Bugfixes to the tab_container widget

* Success indication mechanism on copy buttons
2024-05-21 09:43:32 +05:30
Celtic Minstrel
8d5ca809f4 [Lua] Update obsolete location functions in ai_helper to return a proper named tuple and access locations as x,y instead of [1],[2] 2024-05-19 12:54:35 -04:00
Celtic Minstrel
058d0502e5 [Lua] Update obsolete use of [1],[2] to refer to locations, and simplify some code by leveraging the fact that any object with x,y qualifies as a location; also use moves_left for reachmaps instead of [3] 2024-05-19 12:54:35 -04:00
Celtic Minstrel
f5c4f2e841 [Lua] Update obsolete usage of [1],[2] to refer to a tag's name and contents 2024-05-19 12:54:35 -04:00
Celtic Minstrel
0f6fe67477 [Lua] Use wml.tag to construct WML tables 2024-05-19 12:54:35 -04:00
Wedge009
ef13ea4565 Tutorial S2: Only trigger comment about the 'Dumbo' orc if it is still alive after the attack.
Addresses final point in #5544.
2024-05-19 10:54:16 +10:00
Nils Kneuper
29c469a138 updated French translation 2024-05-18 11:15:01 +02:00
Nils Kneuper
c324082bdf updated Italian translation 2024-05-18 11:13:47 +02:00
Nils Kneuper
df07a0e695 updated Finnish translation 2024-05-18 11:12:32 +02:00
pentarctagon
927937bd8c add a comment for the system prefs file. 2024-05-17 11:58:56 -05:00
pentarctagon
bf4b38b6d0 Better check for wesnothd executable name. 2024-05-17 11:58:56 -05:00
Tahsin Jahin Khalid
c57251ef34
Units: fix white horse HP and XP stats (#8814)
As pointed out by Celtic Minstrel and hejnewar
2024-05-15 16:54:53 +06:00
Steve Cotton
3924b06e70 Update German translation
Thanks to Aurelix.
2024-05-15 12:05:26 +02:00
Iris Morelle
286cc26612 Fix compiler warnings due to missing function prototypes
Introduced in d2b0df9967, at least one
of the functions is affected on Xcode on macOS.
2024-05-13 10:24:00 -04:00
Pentarctagon
e75c579cae
update macos version used in CI (#8865) 2024-05-12 23:15:28 -05:00
pentarctagon
c3ddf890ed don't need to check the same thing 5 times. 2024-05-12 23:12:10 -05:00
doofus-01
fa2770603b
update copyrights.csv for Wyvern images (#8862) 2024-05-12 12:28:55 +02:00
Subhraman Sarkar
336226d198
bugfixes for unit type editor (#8846)
* bugfixes for unit type editor

1. accept space in unit type id
2. don't write translated string to generated wml
3. add textdomain at the top of the generated file
4. fix bad key in generated attack block
2024-05-12 14:41:28 +05:30
doofus-01
62b9ddaa47
Wyvern graphics work (#8854)
* Wyvern portrait and animations
2024-05-11 19:43:45 -07:00
Nils Kneuper
add5abc628 updated Czech translation 2024-05-11 12:57:21 +02:00
Nils Kneuper
894da1d3a1 updated Bengali translation 2024-05-11 12:56:15 +02:00
Nils Kneuper
33a4c4b074 updated Finnish translation 2024-05-11 12:55:13 +02:00
Nils Kneuper
6c6c855627 updated French translation 2024-05-11 12:54:22 +02:00
pentarctagon
7bed0a16c9 remove unused threads commandline options 2024-05-07 18:58:57 -05:00
pentarctagon
c1cce5c806 Don't trigger achievement completion during replays.
Fixes #8858
2024-05-07 18:54:50 -05:00
Dalas121
3e4e805b08
EI S04b: Prevent aswaldan herbs from stacking (#8859)
In "Ill Humors", 2 spawn regions for aswaldan herbs overlap, which can result in both spawning on the same hex without any special visual indicator.

Credit to PointMeAtTheDawn.
2024-05-07 17:52:49 -05:00
pentarctagon
49cb1e88da update docs for linux config dir location 2024-05-07 09:44:05 -05:00
Gunter Labes
dcdc8b4865
Update man pages 2024-05-07 09:12:43 +02:00
Pentarctagon
78f3eb821a
Remove special handling of config directory on linux (#8848)
Instead store the preferences, credentials, and lua command history files in the userdata folder, same as is done on windows and macos.

Also removes another instance of _X11 for #8806
2024-05-06 21:57:29 -05:00
Subhraman Sarkar
03a46f1d7c
Combobox, Tab Container and Editability in Text Box (#8390)
* new combobox and tab container widgets
* ediability in text box via the editable key
2024-05-06 09:56:44 +05:30
Dalas121
9d3e2e82a3
EI: s10 fix owaec being able to enter the sanctuary (#8850)
Fixes #8843
2024-05-05 09:13:54 -05:00
Elvish_Hunter
f89d18ec37 Update copyrights.csv
Added copyright data for the Fire Wisp unit and updated attribution for the Fire Guardian and Dawarf units
2024-05-05 13:53:09 +02:00
Elvish_Hunter
d8b1064c32 Added Fire Wisp unit
The sprites were made by fmunoz, who agreed by forum PM to re-license them under the CC-BY-SA license.
2024-05-05 11:06:47 +02:00
Earth-Cake
30a1a1e7be
EI - changed undead variants from 'spider' to 'ant' (#8849) 2024-05-04 20:49:09 -05:00
Pentarctagon
d2b0df9967
Make userdata path setting code easier to read (#8833)
Partially in preparation for #8059 and also removes one use of _X11 for #8806
2024-05-04 13:11:28 -05:00
Nils Kneuper
f43e977263 updated Norwegian translation credits 2024-05-04 16:02:28 +02:00
Nils Kneuper
5a0069e566 updated Norwegian translation 2024-05-04 16:01:07 +02:00
Nils Kneuper
a056d5e53f updated French translation 2024-05-04 15:57:34 +02:00
Nils Kneuper
8d954e4b37 updated Bulgarian translation 2024-05-04 13:57:36 +02:00
Nils Kneuper
bd606d87e2 updated French translation 2024-05-04 13:57:36 +02:00
Nils Kneuper
9398191502 updated Norwegian translation 2024-05-04 13:57:36 +02:00
pentarctagon
e89ade1f8d Remove version-specific info from xcode projectfile
Instead set the Apple preferences folder from within the code rather than using -DPREFERENCES_DIR.
Remove -DHAS_RELATIVE_LOCALEDIR since that doesn't appear to actually do anything since its only usage is in filesystem_common.cpp, not filesystem.cpp.
2024-05-03 23:39:00 -05:00
Steve Cotton
91fab6939a EI: Add po hints about the plague staff
(cherry picked from commit 8c83da78e2)
2024-05-04 09:44:39 +10:00
Iris Morelle
011e831171 bi: Fix for "unknown" arch issue and enforce the fix
Next time someone attempts to remove Boost.Predef because it looks
"unused", they will at least cause strict CI builds to fail.
2024-05-03 13:45:14 +02:00
Wedge009
7987b863dd Editor Help: grammar correction. Resolves #8615.
[ci skip]
2024-05-03 13:40:38 +02:00
Wedge009
5e9260570b Add date/time reference to translation hint. Resolves #8822.
Current implementation of translation::strftime() uses boost.
Boost docs do not appear to have a 'current' or 'latest' link, instead only making documentation available by explicit version number.

[ci skip]
2024-05-02 07:01:54 +02:00
pentarctagon
d4636e0407 allow loading .mask files
Fixes #8831
2024-05-01 13:06:21 -05:00
Steve Cotton
3fba8897d8 Help shows terrain types in the section for their default_base
Instead of the aliasing hack that the oasis terrain used to use, have
the help topic generator reuse the editor_default_base as a hint that it
should be included in that section.

The terrain_type class gets a new boolean method, and more documentation.
There's a couple of refactors to use the new method in old code too.
2024-05-01 12:33:01 +02:00
Pentarctagon
ebf93c02bb
Remove doxygen comments for GUI2. (#8820)
Instead move this documentation over to the wiki under https://wiki.wesnoth.org/Category:GUI_WML_Reference

Fixes #7899
2024-04-30 10:00:46 -05:00
pentarctagon
479ccc7fdf 1.18 status in readme. 2024-04-29 22:27:51 -05:00
nemaara
ff040853c2 DiD S3: do not allow exp grinding and buff puzzle exp 2024-04-29 18:37:56 -07:00
doofus-01
51b8c5944f
fix copyrights.csv (#8821) 2024-04-28 19:32:23 -07:00
doofus-01
0b281f64e0
1.19 - Brush up minor characters (#8764)
* HttT sea orc update

* TSG eyestalk portrait

* TRoW vampire lady portrait
2024-04-28 18:53:11 -07:00
Tahsin Jahin Khalid
4fb9f51db7 utils.cfg: typo fix in FULL HEAL macro 2024-04-28 20:45:27 +02:00
Subhraman Sarkar
6e2cbdce54
add icon to windows installer and uninstaller (#8817) 2024-04-28 21:27:10 +05:30
Jonathan-Kelly
890caf513c Add submerge to oasis terrain
Follow up to #8783 this makes a unit on an oasis tile visibly sink slightly into its waters, just like with ford terrain.
2024-04-28 11:31:45 +02:00
Gunter Labes
1c166bb0e3
Changelog entries for 72d2f45 2024-04-27 13:59:14 +02:00
ForestDragon
72d2f4588b
Nerf Elvish Shyde/Enchantress/Sylph/Sharpshooter/Avenger
* Elvish Avenger - decreased ranged attack from 11×4 to 10×4, decreased cost from 66 to 60
* Elvish Sharpshooter - decreased ranged attack from 12×5 to 10×5, decreased cost from 62 to 55
* Elvish Shyde - decreased ranged slow attack from 8×3 to 7×3, decreased ranged magical attack from 14×3 to 10×3, decreased cost from 69 to 58
* Elvish Enchantress - decreased ranged slow attack from 7×4 to 6×4, decreased ranged magical attack from 13×4 to 11×4, decreased cost from 70 to 62, decreased XP requirement from 198 to 180
* Elvish Sylph - decreased ranged magical attack from 16×5 to 13×5, decreased cost from 161 to 135
2024-04-27 13:56:50 +02:00
Tahsin Jahin Khalid
60a620ba76
HttT S16: fix li'sar missing her unrenamable=yes (#8782)
* S16: fix li'sar missing her unrenamable=yes

* S16: add one more instance of unrenamable=yes
2024-04-27 12:53:23 +06:00
pentarctagon
6d12b17d95 add tooltip. 2024-04-27 00:55:24 -05:00
Pentarctagon
b3f6f80010
Add a button to the build info dialog to rerun the migrator. (#8791)
Add-ons: checks for any that exist in the chosen other version but not in the current version.
Preferences: adds attributes that don't exist from the chosen other version's preferences that aren't in the current version's preferences. for attributes that exist in both, use the attributes from the file that was modified most recently.
Credentials: move if the credentials file doesn't exist.

Fixes #7936
2024-04-27 00:45:41 -05:00
Gunter Labes
c2d179f75e
Missed one pair of quotes 2024-04-26 23:39:02 +02:00
Gunter Labes
2099c23e54
Remove unnecessary workaround 2024-04-26 23:33:19 +02:00
Gunter Labes
b14ff85b0c
Fallback to commit hash 2024-04-26 23:23:28 +02:00
Jonathan-Kelly
b3802f44ea SoF S7: fewer and slower enemy outriders
This is to counteract the swifter and deadlier Elvish Outrider after the 1.18 core unit balance changes.
2024-04-26 16:44:24 +02:00
newfrenchy83
71a6e465e0 using number of amla to condition increase of experience to level change
Like this, when Youth remain level 1 in EASY mode, max_experience remain to 16
2024-04-24 20:01:37 +02:00
newfrenchy83
8554e9844e add formula in Quenoth Youth advancements 2024-04-24 20:01:37 +02:00
newfrenchy83
5f857f3dfc Add size and id modifications in formulas
while waiting for the release of the use of the number of advancement or their identity to be decided, I added both in the formulas
2024-04-24 20:01:37 +02:00
Iris Morelle
08ee0dddd1 gui/language_selection: Show locale codes if debug mode is enabled 2024-04-24 09:45:13 -04:00
Iris Morelle
00cdaaa2d6 gui/language_selection: Additional UI work for clarity
* Moved the Show All Languages checkbox from the main body to the
   bottom left of the dialog to save space and make it more obviously
   connected to the listbox.

 * Changed the Show All Languages checkbox label to reduce the word
   count a tiny bit.

 * Added text regarding translation percentages representing core
   textdomains only.

 * Added a link to gettext.wesnoth.org.
2024-04-24 09:45:13 -04:00
Steve Cotton
ac12be8342 Unit test cumulative resistance with a max_value
In 1.19 since 82499d0785, this will apply a
max_value of 15, which will also be the combined value.

The same test has surprising result on 1.18, the max_value attributes get added
together for a total max_value of 47, but the values don't, so the single
highest value of 30 is used.

(the corresponding 1.18 commit is 9632febdb5)
2024-04-24 14:52:22 +02:00
Steve Cotton
3fb8a91bc6 Unit test cumulative resistance with a base value
These tests clarify what "cumulative" means for non-leadership abilites,
which since Wesnoth 1.1.3 doesn't seem to fit the English word.

For cumulative abilities, if the base value from the unit is higher that
the ability's value, then the base value is used instead. In the case of
a Skeleton with 40% base resistance, "cumulative=yes" is equivalent to
"value,cumulative=40,no".

In all of these cases, a single ability's value is used; "cumulative"
doesn't mean that the values from multiple abilities interact.

This is all when using value=, not when using add= or sub=.

(cherry picked from commit 9b2016a4af)
2024-04-24 14:52:22 +02:00
newfrenchy83
51e568ff1c Convert CRYSTAL_QUIVER to ability for consistency and move overlay and halo to abilities
I don't know if a bow  attack is added in the objects but in any case I prefer to transfer the special oar in abilities in the same way as for the amulet
2024-04-24 10:41:09 +02:00
newfrenchy83
929d62e7f6 Fix EI: Plague Staff Doesn't Gain Arcane Damage When Equipped After Holy Amulet
Fix https://github.com/wesnoth/wesnoth/issues/8745 in using ability instead of specials
2024-04-24 10:41:09 +02:00
Jonathan-Kelly
707c4e6ed2 Add shallow water to oasis like ford terrain
Resolves  #8753
2024-04-24 04:39:06 +02:00
Gunter Labes
de92a87419
Remove history expansion
It's rarely useful and just gets in the way. Fixes #3328.
2024-04-23 22:57:27 +02:00
Gunter Labes
c7be17bb76 Only return info of known terrain 2024-04-23 13:29:20 +02:00
Gunter Labes
56fc63e238
Remove superfluous double sort and use POSIX conform regex 2024-04-23 09:21:23 +02:00
gfgtdf
55162c4654
Fix build with boost 1.85 2024-04-22 23:07:18 +02:00
pentarctagon
8e5404bc24 update steam runtime image. 2024-04-22 13:38:44 -05:00
Steve Cotton
c7acbd243a Fix a warning in the sdl2 conftest
The argv variable was unused. The build still succeeded,
but GCC emited a warning about it.
2024-04-22 19:24:11 +02:00
Gunter Labes
5ec648a1b2 Avoid invalid pointer access on recall
Should fix #8778.
2024-04-22 19:03:12 +02:00
newfrenchy83
c7080e0ecc
Select alternative damage type based on opponent resistances
If two [damage_type]alternative_type= are used with two different types, the chosen type displayed in the pre-combat window will be the one to which the opponent is most vulnerable. That type will then also be used in the attack if it is stronger than the original/replacement_type.

In the sidebar (report) all alternative_types are displayed.

---------

Co-authored-by: Gunter Labes <soliton@wesnoth.org>
2024-04-21 13:05:03 +02:00
Gunter Labes
553b1a4511
Fix scons SDL version check
0aa8dc3 converted to a runtime test and broke the scons SDL version check since
it only links which trivially makes it work for cross compilation though.
2024-04-20 18:05:11 +02:00
Nils Kneuper
d112ca2339 updated Russian translation 2024-04-20 15:45:26 +02:00
Nils Kneuper
dd8478ed7f updated French translation 2024-04-20 15:44:09 +02:00
Nils Kneuper
3d6907eba1 updated Bengali translation 2024-04-20 15:42:49 +02:00
Wedge009
2c04c274fa Revert "Disable the Windows CI builds"
This reverts commit ac5f821729.
2024-04-20 10:05:18 +02:00
pentarctagon
7b0dd32d79 Fix OOS when teleporting unit with no moves left
debug teleport doesn't use movement points, so there's no need to check them.
2024-04-18 18:24:56 -05:00
Marcus Örnås
d3b3c8c07a Add a "Teleport Unit (Debug!)" option to debug menu
Fixes #5649
2024-04-18 18:24:56 -05:00
pentarctagon
39987cd1ca Add a Community button to the title screen.
This opens a dialog with links to the forums, discord, etc, plus a donate button that links to Wesnoth's SPI page.
2024-04-15 16:50:42 -05:00
Gunter Labes
0222fdad50
Various improvements for the server scripts
Respect server options given as script arguments.
Fix killing background process in trap.
Use printf instead of echo.
Keep upper case variable names reserved for env variables.
Logfilter scripts converted to sed -E and removed GNUisms.
2024-04-14 22:03:03 +02:00
Dalas121
3dadec9cac
EI S12: prevent ogres from saying the final goodbye in "Evacuation" (#8761) 2024-04-14 14:07:20 -05:00
Tahsin Jahin Khalid
d179c3a424 NR: remove unused unit: Cave Serpent
Part of #8734
Note: I searched all NR scenario files with "search and replace" in VS Code and apparently this unit was not even being used in NR.
2024-04-14 18:54:31 +02:00
Wedge009
c62fd51f48
Check log file actually exists before enabling Log File button (#8727)
* Check log file actually exists before enabling Log File button. Resolves #8691.

* Return empty string if output file path is empty.
2024-04-14 16:56:01 +10:00
Dalas121
eb8fe63928
Fix "mak-dak'an" typo in EI (#8752) 2024-04-13 17:01:40 -05:00
Dalas121
dc538bf100
Liberty: Custom Unit for Lord Maddock (#8551)
* Liberty: add custom unit images for lord maddock

* Liberty - upload maddock custom unit .cfg

* Liberty: scenario 4 use custom maddock unit

* Liberty: fix incorrect texdomain in Maddock.cfg

* Liberty: remove whitespace from Maddock.cfg

* Update maddock's unit description

Co-authored-by: nemaara <nemaara@users.noreply.github.com>

* Update Maddock.cfg unit description

* update copyrights

---------

Co-authored-by: nemaara <nemaara@users.noreply.github.com>
Co-authored-by: Gunter Labes <soliton@wesnoth.org>
2024-04-13 05:13:23 -05:00
Nils Kneuper
0dd55ce4f6 updated Czech translation 2024-04-13 11:34:54 +02:00
Nils Kneuper
4e7dfe88ed updated British English translation 2024-04-13 11:33:51 +02:00
Nils Kneuper
631dae9ee2 updated Slovak translation 2024-04-13 11:32:23 +02:00
Nils Kneuper
021e3ac315 updated Ukrainian translation 2024-04-13 11:30:59 +02:00
newfrenchy83
94e388186c rename static function to select_damage_type 2024-04-13 01:50:22 -04:00
newfrenchy83
ec7adf16d3 return optional<std::string> instead of vector<std::string> for damage_type_list
this code should be more readable without affecting the operation of damage_type
2024-04-13 01:50:22 -04:00
Charles Dang
c07d5438c7 Pardon the erroneous comment 2024-04-13 01:27:24 -04:00
Charles Dang
cd6f3fade7 Fix idle anim rate not being saved properly (fixes #8613) 2024-04-13 01:18:41 -04:00
Subhraman Sarkar
6d68af0834
sylph and enchantress attack description changes (cosmetic) (#8737)
enchantress' attack icon is also changed to make it consistent
2024-04-12 17:10:32 +02:00
Gunter Labes
b81afa77aa Make log_file_suffix dependency explicit 2024-04-12 11:44:19 +02:00
Celtic Minstrel
7aa5450a41 [Lua] Replace gui.show_inspector's undocumented config parameter with a string parameter that does the same thing.
It's still supported to pass a config, just in case anything relied on that.

This also updates the LuaDoc documentation at the same time.
2024-04-11 23:49:15 -04:00
Celtic Minstrel
69789b7757 [Lua] Accept {r=..., g=..., b=...} format for colours in add_overlay_text 2024-04-11 23:48:56 -04:00
Celtic Minstrel
d734bfb9e2 [Lua] Make wesnoth.read_location return its result in standard named tuple format 2024-04-11 23:48:21 -04:00
Pentarctagon
9548f4c7b5
Hardware unit submerge effect using SDL_RenderGeometry. (#8687)
Original code from mesilliac in #6826. Made a separate PR for this since the relevant code moved to an entirely separate file and trying to "properly" fix the merge conflicts resulting from that isn't worth the time.
2024-04-11 12:58:56 -05:00
Pentarctagon
901e91c8ec
Move Dunefolk to the Default era. (#8688) 2024-04-11 10:43:41 -05:00
Gunter Labes
020c848c84
Allow git describe to fail 2024-04-11 14:10:55 +02:00
newfrenchy83
82499d0785
add min_value to [resistance] (#8722)
max_value is used to limit the increase in resistance with the "resistance" capability, but there was no equivalent for its reduction.

To be able to add min_value without redoing the "resistance" checking for the umpteenth time, I prefer to modify effect:: so that the checking of these two attributes is done at the same time as the other numerical attributes and keep the door open to a possible generalization of the proceed
2024-04-11 04:48:41 +02:00
Wedge009
f5c8db7b2f Unit editor: Remove translation mark from image paths. 2024-04-10 22:04:21 -04:00
Steve Cotton
f7fea77603 Move knowledge of attack_type out of movetype
The movetype data includes vulnerability to damage types, for example
`resistance_against("arcane")`. There was also a convenience wrapper
that took an attack_type, and returned the vulnerability to that
attack_type's damage type.

The logic of the wrapper is very basic, and does not use unit.cpp's
logic to check whether abilities that change the type are active.
Although it gained knowledge of alternative damage types in 3910817cf7,
it won't always return the same value as the unit.cpp function does.

The wrapper is now only used in FormulaAI, so let's move the code there,
which in effect marks it deprecated.
2024-04-11 00:07:23 +02:00
pentarctagon
3f016ebe35 pot-update and regenerate doc files 2024-04-10 12:07:57 -05:00
grz0
4b027073c0
Remove gzip/bzip2 (de)compression commandline options (#8718)
* Remove handling of --gzip --gunzip --bzip2 --bunzip2 command line options

* Remove --gzip --gunzip --bzip2 --bunzip2 options from manpages

* Remove --gzip --gunzip tests for commandline_options class
2024-04-10 15:45:01 +02:00
Dalas121
b98181a3da
EI: remove duplicate AMLAs (#8723)
Under some circumstances, units in EI could have their custom AMLAs listed multiple times in the advancement dialog.
2024-04-09 18:46:55 -05:00
Dalas121
80e84f1eeb
EI: reduce Barrow/Pyre Wight vulnerability to arcane (#8715)
* Update Undead_Horse_Barrow_Wight.cfg arcane resist
* Update Undead_Horse_Pyre_Wight.cfg arcane resist
2024-04-09 17:07:17 -05:00
Dalas121
f657a36549
EI: preserve XP when Dacyn receives scripted advancements (#8716)
* EI: retain experience when Dacyn advances to twilight mage
* EI: retain experience when Dacyn advances to fallen mage
2024-04-09 17:06:39 -05:00
Gunter Labes
cf52b6bdd0 Fix mismatch between what gettext.w.o and wesnoth consider core textdomains
wesnoth-anl is pretty much an extraction of wesnoth-multiplayer which is core.
2024-04-09 21:10:27 +02:00
Steve Cotton
da0ee60864 Fix race condition causing moveto messages to immediately close
If a mouse click causes a delay and then a message to appear, for example
when moving a unit triggers an `[event]name=moveto`, then the message
would sometimes flash on screen and then disappear with barely enough time
to see which character's portrait was used, let alone to read it.

Although there's already logic to not be triggered by the same mouseclick that
caused the unit to move, it had a race condition if the MOUSE_UP happened
around the time the the dialog's pre_show() function was running.

(cherry picked from commit 26ead85914)
2024-04-09 19:29:52 +02:00
pentarctagon
131fec7866 doxygen fix 2024-04-08 22:48:31 -05:00
gfgtdf
0d9dfb64d2 Remove src/playturn.cpp 2024-04-09 04:18:46 +02:00
gfgtdf
8225916bfc simplify play_controller ctor
- `start_faded` was always true (the default value value was never used)
- 'skip_replay' was only set in playmp_controller which had already other
  code to set it (also it is not used in the ctor)
2024-04-09 01:25:01 +02:00
gfgtdf
71739b372e Remove unneeded display update after ai turn
From the ui point of view, there should be no difference between
network turns and ai turns, and the other play_.._turn functions
also work without such calls. (Furthermore this codes is really
old, so whatever the reason for its existance was probably doesn't
apply anymore)
2024-04-09 00:41:41 +02:00
gfgtdf
1fbeb9226d refactor playmp_controller::process_network_data
In particular we remove an unneeded do_replay(); call
2024-04-09 00:41:41 +02:00
gfgtdf
730f9bc661 remove unneeded recalculate_labels() on [change_controller]
This is already done when gui_->set_team() is called by update_viewing_player()
2024-04-09 00:41:41 +02:00
gfgtdf
1453142579 small hotkey::HOTKEY_ENDTURN refactor 2024-04-09 00:41:41 +02:00
gfgtdf
e3bf4dcb3f use play_controller member over resources:: 2024-04-09 00:41:41 +02:00
gfgtdf
638e37ddf8 remove unused replay_to_process_data_result() 2024-04-09 00:41:41 +02:00
gfgtdf
41554735ed Fix comments 2024-04-09 00:41:41 +02:00
gfgtdf
97c811432d simplify undoing moves message 2024-04-09 00:41:41 +02:00
gfgtdf
2638ce8afc Move some functions
Now its a bit easier to understand which functions are in play_controller adn which in playsingle_controller as all turn related functiosn are now in playsingle_controller
2024-04-09 00:41:41 +02:00
gfgtdf
c9fcce6be0 Don't reset turn statistics when reloading game 2024-04-09 00:41:41 +02:00
gfgtdf
0b08a426b7 Dont autosave on skipped turns
Previously when umc used [end_turn] in turn starte events
the game would still generate an autosave for that turn
2024-04-09 00:41:41 +02:00
gfgtdf
3959540bbc Remove unused function 2024-04-09 00:41:41 +02:00
gfgtdf
b6f9746891 add comments 2024-04-09 00:41:41 +02:00
gfgtdf
8ff6128f0f remove replay_network_sender
It didnt really make the code easier
2024-04-09 00:41:41 +02:00
gfgtdf
d3f52a0fc2 simplify [change_controller] handing on the client 2024-04-09 00:41:41 +02:00
gfgtdf
d99c7b5d59 Refactor when replay actions are sent
Previoulsy send_actions() was called at random
parts of the code in a "better safe than sorry"
manner, which made it hard to understand when
actions are sent or which of these calls is needed.
The new approach is:
- Chat, MapLabels and other unsynced messages are sent
  regularily as part of playmp_controller::play_slice()
- Synced actions are sent as soon as they are undoable:
  - which is immidiately in particular for end_turn and
    init_side
  - after every exceution of synced commands in the end
    of synced_context::run() actions are send if the
    actions cannot be undone.
2024-04-09 00:41:41 +02:00
gfgtdf
79a88266e4 add a synced_context::block_undo() function
Using this function lets te synced context know that the current
action cannot be undone, so that it will in particular send the
actions too all players as soon as possible. The intention is
less delay in networked games.

Currently there is some redundance between is_simultanious_
and is_undo_blocked_, maybe one of these will be removed
later.
2024-04-09 00:41:41 +02:00
gfgtdf
f2bf2dd465 Remove last part of turn_info class
(The files were not deleted because i dont know how to remove them from the various projectfiles)
2024-04-09 00:41:41 +02:00
gfgtdf
8d8643915e add comments 2024-04-09 00:41:40 +02:00
gfgtdf
0ec43a1730 add synced_context::ignore_undo() 2024-04-09 00:41:40 +02:00
gfgtdf
9bedcb298c refactor playmp_controller::process_network_data()
process_network_data() Now always 'procecesses'
synced choices, since they are never exceuted
anyways just put on the recorder. so chat_only=yes
now only delayes new actions. This allows us to implement
receive_actions() by just calling
process_network_data().

This change also make the game execute other unsynced
actions like map labels sooner, along with chat messages.
2024-04-09 00:41:40 +02:00
gfgtdf
5de8f2f3ae simplify playmp_controller::play_network_turn() 2024-04-09 00:41:40 +02:00
gfgtdf
ee47e3a38f refactor notify_next_scenario handling
We now handle the case that the player becomes host during
wait_for_upload() and make the code more robust in case
[notify_next_scenario] is received at a unexpected time.
2024-04-09 00:41:40 +02:00
gfgtdf
ad40e41e9a remove unneeded check in mp_controller::sync_network()
PROCESS_END_LINGER is never returned outside of linger mode
2024-04-09 00:41:40 +02:00
gfgtdf
0b472e8fae simplify playmp_controller::process_network_data() 2024-04-09 00:41:40 +02:00
gfgtdf
cda1d30809 fix linger mode when ending the scenario in end_turn event
I am not really sure whether this is actually needed or whether it
actually worked before for some other reason, in any case the new
code is simpler and safer.
2024-04-09 00:41:40 +02:00
gfgtdf
6ac17427c6 Remove special handling of linger mode in playmp_controller
To make the code simpler.

the sp linger function calls play_slice() which playmp_controller already overwrites, after a little fix of that we can remove a bit of code
2024-04-09 00:41:40 +02:00
gfgtdf
b79e305419 split process_network_data() into smaller functions 2024-04-09 00:41:40 +02:00
gfgtdf
9d7fd59cc8 remove turn_info class
All of its functions were moved to playmp_controller. Since they
were already so interconnected, this makes things a little easier.

Also it was always a bit confusing that this class was called
turn_info when all it did was to process network data.
2024-04-09 00:41:40 +02:00
gfgtdf
0b1cc36e51 small function reorder 2024-04-09 00:41:40 +02:00
gfgtdf
102ba5801e remove redundant error handling code in linger()
Since 1.18 linger() is called indirectly by play_scenario_main_loop()
and play_scenario() which already catches therse erros and offers the option to save the game then.

The special handlng of ingame_wesnothd_error was removed since it
was only added to fix the case of the host leaving resulting in the
game aborting (which should no loner be the case)
2024-04-09 00:41:40 +02:00
gfgtdf
c452f498de enable 'reveal_map' in sp
It defaults to false, the change is mostly to make the code simpler
2024-04-09 00:41:40 +02:00
gfgtdf
dd91316104 Remove wrong comment
The option to load a game is only disabled in networked
multiplayer not in local multiplayer
2024-04-09 00:41:40 +02:00
gfgtdf
69fc479cfa simplify sending of [turn] data
1) We remove the syncmp_handler class which was a
   bit too complicated for its rather simple task
2) We move network related stuff out of playsingle_controller
2024-04-09 00:41:40 +02:00
gfgtdf
4b287691ef remove unneeded sync_network call
this was added at some place in the past when games woudl end via a
game_end_exception, and is not needed anymore§
2024-04-09 00:41:40 +02:00
gfgtdf
38d95cc3ee don't reveal map after mp campaign games by default
It now matches the behavior in sp, this makers especially sense
as sp campaigns can also be played in mp mode.
2024-04-09 00:41:40 +02:00
Steve Cotton
8e59da9186 Clearer documentation for the ATTACK_AND_VALIDATE macro 2024-04-09 00:28:22 +02:00
Steve Cotton
71c2f65a82 Fix clicking on the sidebar going to the wrong trait
If the first trait of a unit has no name, then clicking on the units (other)
trait in the sidebar opened the wrong page in the help.

(cherry picked from commit f9af941f1e)
2024-04-08 01:20:01 +02:00
Steve Cotton
2cb33bc4a2 updated German translation 2024-04-08 00:32:43 +02:00
Steve Cotton
63638278b3 Document why the Fog Clearer's traits show in help
Not mentioned here, but turning on debug mode also affects which units,
and therefore which units' traits, are shown in help.

Having looked back into the history while wondering why it was done this way
in e9603e6e01, back then we needed a fix that could be backported to 1.14,
so couldn't add a new attribute to [unit_type].
2024-04-07 21:53:34 +02:00
Steve Cotton
83288dc6f9 update German translation
s1m0n was in the credits for 1.16, but that was missed when his contributions
were copied to master. Fix that, along with adding his latest updates.

The fuzzy flag in -wof probably got readded by mistake when rebasing.
2024-04-07 12:35:34 +02:00
Steve Cotton
ac5f821729 Disable the Windows CI builds
Setting up vcpkg tries to build xz from source, which fails because the
entire xz repo has now been made private or taken down. The vcpkg team
have been advised not to switch to an alternative repo [1], so for now
our Windows builds will always fail.

Turn those builds off, so that we don't get familiar with seeing red
status markers on all PR's CI results.

[1] `https://github.com/microsoft/vcpkg/pull/37957` - second comment is
the vcpkg team's "We have been explicitly asked by security folks to not
change the upstream [to a different repo] for liblzma at this time."
2024-04-07 12:35:03 +02:00
Gunter Labes
bc5d69d35e
campaignd: Assign port 15019 to 1.19 2024-04-06 22:27:10 +02:00
Nils Kneuper
0657f19c6b updated Finnish translation 2024-04-06 15:07:02 +02:00
Nils Kneuper
f58a9d6422 updated Ukrainian translation 2024-04-06 15:04:10 +02:00
Nils Kneuper
d298d9e1de updated Bengali translation 2024-04-06 15:01:38 +02:00
Nils Kneuper
4f9c583024 updated Arabic translation 2024-04-06 15:00:38 +02:00
pentarctagon
fbaded8c01 Add another query to the MP Activity Report queries
count by map and era
2024-04-04 14:56:15 -05:00
newfrenchy83
57c8e0cce0
Fix attack::damage_type bug for ability resistance
When [damage_type] is used but the opponent uses the resistance ability
against the added type, the ability filter only detected the original type and
the new type was not affected.
2024-04-04 18:01:36 +02:00
OrekOrek
c66b6d6c85
"Sands" to "Sand" (#8443)
Rocky Sand to Gravel
Desert Sand back to Desert Sands
Beach Sand back to Beach Sands
2024-04-03 09:25:08 -05:00
Oleksii
578b67e243
Restore alphabetical order of Ukrainian translators 2024-04-03 12:50:20 +02:00
Oleksii
e052632a50 Ukrainian translators update about_i18n.cfg 2024-04-02 14:53:27 -05:00
pentarctagon
6607da7b89 simplify always true condition a bit 2024-04-02 14:21:44 -05:00
Steve Cotton
6f95b062cb wmlxgettext: Fix "fix invalid escape sequence"
The original code was probably meant to strip trailing whitespace, which
turned out to be a bug when 4be9aa8584
fixed the buggy regexp so that it started working. That has now been
removed.

Fixed handling of multiline plural strings, which was broken too.

One feature has been left unimplemented, and will cause wmlxgettext to error
out. For "long bracketed" strings, Lua allows the contents to start with a
newline, which is automatically stripped from the resulting string. Trying to
understand the original purpose lead me to this feature of Lua strings which we
don't use in Wesnoth; and I finally concluded that, if someone wants to use
that feature, it can be their problem to implement it.

This fixes commit 4be9aa8584.

(cherry picked from commit e4239634e5)
2024-04-02 16:12:23 +02:00
Iris Morelle
57b35dd6bd Update changelog 2024-04-02 09:51:46 -03:00
Iris Morelle
caadb3abbd gui/language_selection: Remove redundant class variable 2024-04-02 09:51:46 -03:00
Iris Morelle
7049166ecc gui/language_selection: Use a custom label for the OK button 2024-04-02 09:51:46 -03:00
Iris Morelle
94cfe18ecc gui/language_selection: Don't force even height for language column
While it sounds like a great idea on paper, in practice having the
language column have the same height on all rows causes issues because
of at least one entry having an unusually tall label because of
non-Latin characters involved in it.

[label] does not support setting the vertical alignment of text — only
the vertical alignment of the widget itself can be set. This doesn't
help in this case because the widget is always as tall as its row —
it's the text's positioning that needs adjusting.

It turns out to be a better look to have all text be vertically
centered by not letting the label's height be dictated by the row's,
and let the layout engine center the label if needed for any reason.
2024-04-02 09:51:46 -03:00
Iris Morelle
7a1d6afafa gui/language_selection: Language dialog overhaul
This overhaul introduces a GUI option to show all languages regardless
of their completion threshold, as well as a side panel including a
general explanation of community translations and how players can
potentially contribute to them, plus a link to the main translations
page on the wiki.

A few points to make here:

 * The URL points to the main page on purpose, since it's meant to be
   a catch-all for all languages regardless of which one the player
   has got selected or configured (those are two different things at
   the moment).

 * There's an issue where when showing all translations, some of the
   non-Latin translation names cause the baseline of the language
   name labels to end up entirely misaligned with the completion
   labels. I am not entirely sure how to fix this right now.

 * Showing all translations alters the dialog's layout permanently. I
   believe there's no way out of this with the current GUI API.

 * We use the stock text colouring function used for unit defence
   values. This might not be entirely ideal because they are all very
   green for translation stats above the minimum threshold, so there's
   basically no variance by default until all translations are shown
   together.

 * An idea could be to add a link to the gettext.wesnoth.org stats
   page in the dialog.
2024-04-02 09:51:46 -03:00
Iris Morelle
a58dd956cc i18n: Add getter for the translation visibility threshold 2024-04-02 09:51:46 -03:00
Dalas121
4dd164e0b0
EI 12_Evacuation.cfg: fix Dacyn's halo not flickering (#8676) 2024-04-01 22:48:48 -05:00
Dalas121
4bed0f2666
EI: survivor trait and sentinel shield bugfix (#8667)
* EI: fix sentinel shield + survivor bug #8632
* EI: fix survivor weaponless bug #8633
2024-04-01 20:20:51 -05:00
Dalas121
061b2da037
campaign_dialog.cfg - Explain the RNG options better (#8610) 2024-04-01 17:43:39 -05:00
pentarctagon
75be23ad3f reset back to the first tab 2024-04-01 14:44:59 -05:00
pentarctagon
c6126104d4 Don't duplicate player names per mod used
Currently even though the results ultimately don't display duplicate information for the modifications used, the resultset coming back does have a row per modification and player, so it appears as though the player list is duplicated.

Fixes #8619
2024-04-01 14:44:59 -05:00
Subhraman Sarkar
d803cd9c96
remove leftover print statement from #8451 (#8674) 2024-04-01 17:48:55 +05:30
Nils Kneuper
ebe84ce5e6 updated Arabic translation 2024-03-31 17:49:51 +02:00
Dalas121
28ab770d7f
EI S05: fade to silence when recounting the priestess's death (#8547)
In EI's S05, Owaec briefly recounts the bloody fate of his local priestess, killed by undead.

The scenario's music consists of wanderer.ogg and traveling_minstrels.ogg, which are inappropriate for encountering a mangled corpse.

Instead, fade the music out during this section.
2024-03-31 09:48:11 +02:00
Steve Cotton
8318a6ccf8 Boost tests: run test_without_attribute_filter
It was added in 532d17f958, but
that commit missed adding it to boost_test_schedule.

(cherry picked from commit c80fdc2283)
2024-03-31 09:36:42 +02:00
Iris Morelle
97fc0e9e5d Update changelog 2024-03-31 02:44:04 -03:00
Iris Morelle
55290c8715 Make the Changelog macOS app menu item more relevant
This changes the URL used for the changelog menu item from using a
direct GitHub file link to the master branch's changelog.md file to
using a https://changelog.wesnoth.org/X.Y.Z link, where X.Y.Z are
specifically the version number used in the macOS bundle's Info.plist
file.

Note that this may result in incorrect links for +dev versions, where
the Changelog link will simply send the user to the page for the
latest release and not the future release. This shouldn't be a problem
though, since people using those builds, especially on macOS, should
really already know where to find the most relevant changelog for the
version they're running -- in their own source tree.
2024-03-31 02:44:04 -03:00
Iris Morelle
1e33024171 fs: Replace deprecated Boost.Filesystem symbolic_link_exists()
This function has been deprecated since at least Boost 1.34 (2007).
2024-03-30 18:12:47 -03:00
Dalas121
ae8b3a580d EI S14 - Indicate uncleared swamp hexes with "swap reed" images
EI's S14 involves traversing a swamp with hidden undead. To make it easier for the player to remember which hexes they've cleared, mark the uncleared hexes.
2024-03-30 19:32:50 +01:00
Dalas121
13ded3e60d Add "swamp reed" images to EI Drowned Plains
Derived from the core water-plant.png and water-plant2.png images.

Copyright attribution updates by octalot:

They've been darkened since the original commit, but the swamp water
tiles in data/core/images/terrain/swamp are clearly Tommy(yobbo)'s
images originally added in f7cc2f1079.
The current water-tile.png seems to be a later addition, so I've
left it attributed to "unknown".

Co-authored-by: Steve Cotton <steve@octalot.co.uk>
2024-03-30 19:32:50 +01:00
Dalas121
1fe6b1379b
EI S10: change "ghasts in cages" to "ghouls in cages"
Fixes #8620
2024-03-30 10:28:07 -05:00
Dalas121
8deaad2b10
EI - show custom traits in help menu (#8652)
* EI - add dummy unit file so traits show up in help menu.
* EI - add help_text to traits
2024-03-30 08:33:38 -05:00
newfrenchy83
21e2ec5847
Fix default argument in matches_if_present filters (#8649)
Due to confusion between NULL and std::nullopt, these filters used
zero instead of nullopt as the default value for this argument. However,
the effects are limited to experimental_filter_ability and that tag's _active
sibling, and result in a false positive when the filter matches a value of
zero. With those constraints, I (octalot) am happy to apply it to stable.

This was detected as a compilation error when building with musl libc,
thanks to iFoundSilentHouse for finding and reporting it.
2024-03-30 13:34:30 +01:00
Steve Cotton
f930418827 UtBS S05: Stop moving when sighting ants and dwarf
The stalactite and dwarf sighting became effectively a single
event in a7680561d0, so this combines them into one.
2024-03-30 13:13:37 +01:00
Discontinuum
423481d481
Fix description of World Conquest 4p (#8657) 2024-03-29 18:51:07 -05:00
PointMeAtTheDawn
09b8430da0
UtBS S1: Smooth out the luck involved in getting units from villages
Before this change villages had a certain set % chance to grant player a unit upon capture. Now the chance to get a unit is dependent on difficulty, value of units player has already received and the amount of villages already captured.
2024-03-29 21:40:11 +01:00
Steve Cotton
b313270261 Tutorial S01: Better timing for the hints
No string changes, just adjusting when the hints at the top-left of the screen
appear and disappear.

The hint about crowns now appears after recruiting both elves, so that there
are units to compare the leader to, who have the same orb color but no crown.

The hint about traits appears when told to attack the quintain with the elves.
The player will probably find a strong or dexterous trait, and Delfador already
comments about those traits after attacking. Even if neither elf has those,
speedy or robust could also influence whether to use melee or ranged attacks.

There's now no hint on screen when first choosing which village to use for
healing; previously it was the hint about crowns which didn't seem relevant.
No strings are added in this commit, but a hint about checking the quintain's
movement range would fit here, see <https://r.wesnoth.org/t54644>.

(cherry picked from commit f7a0f119de)
2024-03-29 13:38:21 +01:00
Gunter Labes
9da0fbcc23 Keep python 2 compatibility 2024-03-28 17:06:00 +01:00
Gunter Labes
de778b1232
Add support for 1.18 2024-03-28 13:41:20 +01:00
Steve Cotton
c1b331c62f updated German translation 2024-03-27 01:00:51 +01:00
Subhraman Sarkar
0bef2252a1
basic support for filtering campaigns based on completion status (#8451) 2024-03-26 13:24:14 -05:00
Subhraman Sarkar
ea564e4501 add edit_unit to test schedule 2024-03-26 13:23:38 -05:00
Subhraman Sarkar
0b646dec8a New Unit Type Editor UI in Scenario Editor 2024-03-26 13:23:38 -05:00
P. J. McDermott
2993757315 Add a CI check for missing images in WML macros
This detects image errors such as issue #8432.

Example output:

    data/multiplayer/scenarios/2p_Aethermaw.cfg:134: missing image: units/undead/shadow-s-attack-1.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:135: missing image: units/undead/shadow-n-attack-2.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:147: missing image: units/undead/shadow-n-3.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:149: missing image: units/undead/shadow-s-attack-4.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:196: missing image: units/human-loyalists/spearman-attack-se-10.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:197: missing image: units/human-loyalists/spearman-attack-s-6.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:198: missing image: units/human-loyalists/spearman-attack-se-9.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:203: missing image: units/human-loyalists/general-idle-5.png
2024-03-26 13:23:22 -05:00
Steve Cotton
98492e1797 updated German translation
All of these are from René.
2024-03-26 14:46:04 +01:00
Subhraman Sarkar
29cc307ac7
aethermaw : change Sulla's title to Aether Mage (#8539) 2024-03-26 19:14:33 +05:30
pentarctagon
06cccdbd4a achievements scrollbar auto 2024-03-26 00:32:34 -05:00
Subhraman Sarkar
62ac421cf4 MP: Aethermaw: Update images with their 1.18 variants
(cherry picked from commit 2b9ed47080)
2024-03-25 21:02:48 +01:00
Steve Cotton
3d71a2e4d8 Automatically replace missing .jpg images with .webp if found
Give .jpg files the same logic that .png files were given in
8f06da1974, because many files
were renamed in 51b58ad218.
UMC using the old name for images will trigger a warning, but
the player will still see the image file.

This is just a cosmetic change that doesn't change compatibility,
because have_asset("images", "blah.jpg") won't be automatically
redirected to "blah.webp".

(cherry picked from commit 84ed5488e0)
2024-03-25 21:02:18 +01:00
Toom
e9e1c060d6 Add yellow and pink color_range 2024-03-25 18:28:55 +01:00
Toom
4be9aa8584 fix invalid escape sequence 2024-03-24 21:33:47 +01:00
Nils Kneuper
2beda25526 updated Arabic translation 2024-03-23 22:04:16 +01:00
Nils Kneuper
52a01093dc updated Bengali translation 2024-03-23 22:02:20 +01:00
Gunter Labes
e850f27fa1
Add script for the addon webinterface generation 2024-03-23 01:47:12 +01:00
Gunter Labes
db5a934e1e
refactor to avoid eval and create less processes 2024-03-23 01:39:20 +01:00
pentarctagon
0a613aac16 Attempt to fix data migration for steam
It *appears* that the migration prompt doesn't show up for steam players because steam automatically creates the <userdata>/saves/steam_autocloud.vdf file on start, since the saves folder is what's synced. Since the migration logic is looking for whether the userdata folder exists, this means it always exists when launched from steam.

So, fix that by checking a different subfolder under userdata (checking the logs folder is arbitrary, it could be any of them aside from the saves folder).
2024-03-22 17:44:39 -05:00
pentarctagon
8674958cfb fix help portraits scaling too large 2024-03-22 17:44:24 -05:00
pentarctagon
0786acb0aa logs these, since normalize_path can return an empty string 2024-03-22 17:40:44 -05:00
Gunter Labes
01db35ae56
Add the 1.19.x campaignd to port list 2024-03-22 22:30:22 +01:00
Gunter Labes
8096970a93
Streamline bug report template 2024-03-22 19:53:14 +01:00
newfrenchy83
7eee400ec0 fix shema validation for overwrite_specials
sme weapon special can use overwrite_specials but i forget to put it in shema validation
2024-03-22 17:09:29 +01:00
Subhraman Sarkar
333b3edc42 change horizontal scrollbar mode and update changelog 2024-03-22 09:45:42 -04:00
Subhraman Sarkar
d692f6ba12 add changelog and remove achievements dialog changes 2024-03-22 09:45:42 -04:00
Subhraman Sarkar
8c7660ce49 scrollbar and height adjustments for achievements dialog 2024-03-22 09:45:42 -04:00
Subhraman Sarkar
90dcf67076 fix double scrollbar bug 2024-03-22 09:45:42 -04:00
pentarctagon
cbf749dc3a Update appdata screenshots. 2024-03-21 18:29:30 -05:00
Iris Morelle
642828b375
wesmere: Bump CSS version 2024-03-21 18:38:49 -03:00
Iris Morelle
df147dab9c
wesmere: Use the correct version of jQuery 2024-03-21 18:38:07 -03:00
Iris Morelle
14dda3ea1b
wesmere: Remove Google Fonts requirement 2024-03-21 18:36:12 -03:00
Gunter Labes
0331a02720
Add missing newline 2024-03-19 20:33:15 +01:00
Gunter Labes
8d0b9bb59b
Use unique flatpak branch to allow parallel installation
Need to fetch some commit history and tags so that git describe works.
2024-03-19 19:26:29 +01:00
Gunter Labes
e5c741a296 Use --jobs instead of adjusting the manifest 2024-03-18 20:56:30 +01:00
pentarctagon
3df31c4a0c final 1.16 changelog update 2024-03-17 20:56:56 -05:00
Severin Glöckner
576e2d0d2d German translation: rename units 2024-03-17 23:12:06 +01:00
Nils Kneuper
deca351723 updated Finnish translation 2024-03-17 20:20:32 +01:00
Nils Kneuper
cd21b3c829 updated Dutch translation 2024-03-17 20:19:20 +01:00
Nils Kneuper
114fc2993f updated Chinese (Traditional) translation 2024-03-17 20:17:40 +01:00
Jonathan-Kelly
e3a6610668 WoF S11: tweak enemy gold
Testing by effectively droiding the player's side, the enemy side still lost even with 480 gold and otherwise default difficulty settings. So upping enemy side gold to 480 for all difficulty levels.
2024-03-17 14:11:33 -05:00
pentarctagon
c00cfe2a05 Add an environment variable to disable logging to file
Fixes #8527
2024-03-17 12:23:31 -05:00
Steve Cotton
2265127b66 updated German translation 2024-03-17 01:38:38 +01:00
Hejnewar
c25d87bc9a
Improve default settings for the timer
Action bonus - is often thought as inconsisnent and generally not very well understood not only by new players but aslo by players with mid tier experience, so removing it from initial setting should improve overall experience of a new player.
Turn bonus - 60 seconds is way too low and initial 270 is also not much for the whole game. 240/240 does better job at keeping the game in good pace while not being too opressive in my opinion, 360 reserve is aslo ok if you can save some time for more intensive turns.
2024-03-17 00:51:18 +01:00
Iris Morelle
19d8eeb5e9 Fix "implicit conversion turns floating-point number into integer" warnings
Found with Xcode 15.3:

  /Users/iris/Projects/wesnoth/src/game_config.cpp:551:18 Implicit conversion turns floating-point number into integer: 'double' to 'const int'
2024-03-17 00:42:25 +01:00
Nils Kneuper
88f1ea9ec8 updated copyrights file for change Italian image translation 2024-03-16 17:03:03 +01:00
Nils Kneuper
4c8840d4bd updated French translation 2024-03-16 16:54:53 +01:00
Nils Kneuper
6d54ff203a updated Italian translation (incl. image changes) 2024-03-16 16:47:10 +01:00
pentarctagon
59ac60fa12 add secondary_authors to pbl schema 2024-03-16 01:25:29 -05:00
Iris Morelle
e7050c185b Update changelog 2024-03-16 00:13:16 -03:00
Iris Morelle
854b812ed4 gui/unit_recruit: Add unit type level number as a filtering criterion
The Recall dialog already did this, but Recruit did not.
2024-03-16 00:13:16 -03:00
Iris Morelle
df4039d593 gui/unit_recruit: Add alignment and race hints for filtering
This adds the human-readable version of each unit's alignment and
their (gendered) race name and plural race name as hints for the
filter box functionality, so that players can enter keywords such as
"liminal", "dwarves", "mermaid" and get what they expect even if those
words are not literally part of the unit type names.
2024-03-16 00:13:16 -03:00
Iris Morelle
3a8c234df7 gui/unit_recruit: Restructure filter criteria checks
This makes it easier to add any number of text criteria for filtering
without making the conditional increasingly unwieldy. Criteria that
shouldn't count because of conditions disabling them (such as the unit
type id only being considered when debug mode is eanbled) can just
become empty strings which will never match.
2024-03-16 00:13:16 -03:00
Iris Morelle
9f5e61b803 gui/unit_recall: Add alignment and race hints for filtering
This adds the human-readable version of each unit's alignment and
their (gendered) race name and plural race name as hints for the
filter box functionality, so that players can enter keywords such as
"liminal", "dwarves", "mermaid" and get what they expect even if those
words are not literally part of the unit type names.
2024-03-16 00:13:16 -03:00
Nils Kneuper
a924018a84 updated Polish translation 2024-03-15 20:59:42 +01:00
Jonathan-Kelly
625356dd26 WoF S11: more enemy gold 2024-03-15 14:52:32 -05:00
Jonathan-Kelly
13e2cf3592 WoF S10: smaller enemy waves 2024-03-15 14:52:32 -05:00
Jonathan-Kelly
8691c062e5 WoF S9: yet more yetis 2024-03-15 14:52:32 -05:00
Jonathan-Kelly
cc41cff8c2 WoF S7: slightly weaken guards 2024-03-15 14:52:32 -05:00
Jonathan-Kelly
232f730c97 WoF S6: minor income consistency 2024-03-15 14:52:32 -05:00
pentarctagon
07100d0759 validate addon name when first entered as well 2024-03-14 22:03:45 -05:00
pentarctagon
b4f988a220 fix tags and secondary_author for pbl editor 2024-03-14 22:03:45 -05:00
Gunter Labes
c855a30404
Fix indentation 2024-03-14 19:47:01 +01:00
Gunter Labes
954c12a99b Let the new manifest handle data/dist creation 2024-03-14 19:24:33 +01:00
Gunter Labes
c082bc7b5f Set distribution channel for flatpak 2024-03-14 19:24:33 +01:00
Jonathan-Kelly
28ba930c89 WoF: adjust music 2024-03-14 13:22:40 -05:00
Jonathan-Kelly
a3a785f27b WoF S9: move crannog village in from map edge
Two other maps and one other scenario which depict the same region get corresponding tweaks.
2024-03-14 18:20:29 +01:00
Iris Morelle
dce011919c Add -Wno-shorten-64-to-32 to compiler flags in Xcode
This is necessary with Xcode 15.3 to avoid about 750 warnings across
all of the codebase regarding "Implicit conversion loses integer
precision", most of which apply in cases where theoretical limits are
involved because of conversions from unsigned 64-bit integers (usually
size_t) to signed 32-bit (int).

Ideally we want to address these warnings, but given how many of them
there are all over the place this is not something that can reasonably
be done in such short notice before Wesnoth 1.18.0 is released, and in
the meantime they make the compiler output with Xcode unnecessarily
noisy and completely bury any relevant warnings from actual code
changes. In the meantime, this is best for productivity until we can
get to a place where we can fix all of them and force using
-Wshorten-64-to-32 for all platforms in CI.
2024-03-13 23:04:29 -03:00
Steve Cotton
4b44515673 Changelog for SotA S16: Keep Crelanu within his ring
Changelog for d106238410,
the changelog is already included in 1.18's cherry-pick.
2024-03-13 21:07:37 +01:00
Gunter Labes
13a1e44c64
Set distribution channel for flatpak CI build 2024-03-13 14:50:43 +01:00
newfrenchy83
24a75ba95c
fix math include necessary in game_config.cpp for compile file. (#8542) 2024-03-12 13:12:15 -04:00
Wedge009
d106238410 SotA S16: Keep Crelanu within his ring of protective holy waters. Resolves #8361. 2024-03-12 13:35:40 +01:00
shijie.chen
d88ddec6f1
Remove unnecessary header files (#8531)
Co-authored-by: shijie.chen <shijie.chen@goland.cn>
2024-03-12 00:07:48 -04:00
22180 changed files with 765464 additions and 623484 deletions

4
.clang-tidy Normal file
View file

@ -0,0 +1,4 @@
---
Checks: '-*,modernize-use-nullptr,performance-unnecessary-value-param'
WarningsAsErrors: true
...

View file

@ -13,3 +13,7 @@ indent_size = 4
[*.{cpp,hpp}]
indent_style = tab
indent_size = 4
[*.lua]
indent_style = tab
indent_size = 4

View file

@ -1,5 +1,5 @@
name: Bug Report
description: Create a report to help us improve the game.
description: Create a bug report to help us improve the game.
labels: ['Bug']
body:
@ -8,17 +8,11 @@ body:
attributes:
label: Game and System Information
description: |
- What version of the game are you running?
- Where did you download it from? (Steam, Mac App Store, our website, built from source, etc.)
- If you're using a custom build, what compiler did you use, and what commit did you build at?
- What version of the game are you running? (If you built wesnoth yourself, mention the exact commit)
- What OS are you running?
value: |
- **Version:**
- **Downloaded from:**
- **Build info:**
- **OS:**
validations:
required: true
- type: textarea
id: description

View file

@ -11,7 +11,7 @@ jobs:
checks: # checks that don't need a wesnoth binary
runs-on: ubuntu-latest
container:
image: wesnoth/wesnoth:2204-master
image: wesnoth/wesnoth:2404-master
options: --tty # docker create options
env:
CLICOLOR_FORCE: 1
@ -31,6 +31,9 @@ jobs:
- name: Whitespace and WML indentation check
if: success() || failure()
run: ./utils/CI/fix_whitespace.sh; git status; git diff --exit-code
- name: WML missing images check
if: success() || failure()
run: utils/CI/check_wml_images.sh
- name: Run luacheck
if: success() || failure()
run: luacheck .
@ -38,31 +41,33 @@ jobs:
if: success() || failure()
run: doxygen doc/doxygen/Doxyfile
copyright: # check takes a bit longer and does not need to run in docker
copyright: # check takes a bit longer and does not need to run in docker (sound/music only)
runs-on: ubuntu-latest
steps:
- { uses: actions/checkout@v4, with: { fetch-depth: 50 } }
- name: Copyright check
run: ./update_copyrights --output=
- name: Sound/Music copyright check
run: ./update_copyrights
ubuntu:
strategy:
fail-fast: false
matrix:
include:
- { tool: scons, cc: gcc, cxx: g++, cfg: debug, lto: false, sys_lua: false }
- { tool: cmake, cc: clang, cxx: clang++, cfg: release, lto: true, sys_lua: true }
# the check for WML tests below may need to be adjusted if configurations are changed
- { cfg: debug, tool: scons, cc: gcc, cxx: g++, std: 17, lto: false, sys_lua: false }
- { cfg: release, tool: cmake, cc: gcc, cxx: g++, std: 20, lto: true, sys_lua: false }
- { cfg: release, tool: cmake, cc: clang, cxx: clang++, std: 17, lto: true, sys_lua: true }
runs-on: ubuntu-latest
container:
image: wesnoth/wesnoth:2204-master
image: wesnoth/wesnoth:2404-master
options: --tty # docker create options
env:
TOOL: ${{ matrix.tool }}
CFG: ${{ matrix.cfg }}
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
CXX_STD: 17
CXX_STD: ${{ matrix.std }}
LTO: ${{ matrix.lto }}
SYS_LUA: ${{ matrix.sys_lua }}
CLICOLOR_FORCE: 1
@ -85,10 +90,15 @@ jobs:
scons "$@" build="$CFG" ctool="$CC" cxxtool="$CXX" cxx_std="$CXX_STD" \
extra_flags_config="-pipe" forum_user_handler=true \
nls=false enable_lto="$LTO" system_lua="$SYS_LUA" force_color=true \
jobs=2 --debug=time glibcxx_debug=true glibcxx_assertions=true
jobs=2 --debug=time glibcxx_debug=true glibcxx_assertions=true compile_db=true
}
build strict=true wesnoth boost_unit_tests
build cdb
# disable all warnings since we have coverage on them in a standard build, and clang-tidy
# triggers false positive compiler warnings that clang itself won't
run-clang-tidy -quiet -use-color -j 2 -extra-arg="-w" -warnings-as-errors='*' '^(?!.*src/modules/|.*build/)'
apt remove -y -qq libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev
build strict=false wesnothd campaignd
@ -99,7 +109,7 @@ jobs:
cmake "$@" -DCMAKE_BUILD_TYPE="$CFG" -DCXX_STD="$CXX_STD" \
-DEXTRA_FLAGS_CONFIG="-pipe" -DENABLE_MYSQL=true \
-DENABLE_NLS=false -DENABLE_LTO="$LTO" -DFORCE_COLOR_OUTPUT=true -DLTO_JOBS=2 \
-DENABLE_SYSTEM_LUA="$SYS_LUA" .
-DENABLE_SYSTEM_LUA="$SYS_LUA -DCLANG_TIDY=true" .
}
rm -R /usr/local/lib/cmake
rm /usr/local/lib/libboost*
@ -118,18 +128,27 @@ jobs:
if: success() || steps.build.outcome == 'success'
run: |
./wesnoth --version
for opt in config data userconfig userdata
for opt in data userdata usercache
do
output=$(./wesnoth --nobanner --"$opt"-path)
if [ "$output" = "" ]; then printf 'option --%s-path prints nothing to stdout!' "$opt" >&2; exit 1; fi
if [ "$output" = "" ]; then printf 'option --%s-path prints nothing to stdout!\n' "$opt" >&2; exit 1; fi
printf '%s-path: %s\n' "$opt" "$output"
done
- name: WML validation
if: success() || steps.build.outcome == 'success'
# only run on release builds (takes ~10 times as long on debug); since there are multiple release builds
# but running the following tests multiple times doesn't make much sense use cc==clang as the check
if: matrix.cc == 'clang' && (success() || steps.build.outcome == 'success')
run: ./utils/CI/schema_validation.sh
- name: Run WML tests
if: success() || steps.build.outcome == 'success'
run: ./run_wml_tests -g -c -t 20 -bt 1000
# only run on release builds (takes ~6 times as long on debug)
if: matrix.cc == 'clang' && (success() || steps.build.outcome == 'success')
run: ./run_wml_tests -v -v -g -c -t 20 -bt 1000 -a=--userdata-dir=ud
- name: Upload userdata files from WML unit tests (logs, replays)
if: matrix.cc == 'clang' && (success() || failure())
uses: actions/upload-artifact@v4
with:
name: WMLTest-userdata-Linux
path: ud
- name: Run play tests
if: success() || steps.build.outcome == 'success'
run: ./utils/CI/play_test_executor.sh
@ -193,17 +212,17 @@ jobs:
options: --tty --cap-add=ALL --privileged # docker create options
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- { uses: actions/checkout@v4, with: { submodules: "recursive", fetch-depth: 500, fetch-tags: true } }
- name: Flatpak
run: |
# write to an ignored filename so the build is not marked as modified
jq '.modules |= map(select(.name == "wesnoth").sources[0]={"type":"dir","path":"."}) | ."build-options".env.FLATPAK_BUILDER_N_JOBS="2"' packaging/flatpak/org.wesnoth.Wesnoth.json > wesnoth-manifest.json
flatpak-builder --force-clean --default-branch=ci --disable-rofiles-fuse wesnoth-app wesnoth-manifest.json
flatpak build-export export wesnoth-app ci
flatpak build-bundle export wesnoth.flatpak org.wesnoth.Wesnoth ci --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
jq '.modules |= map(select(.name == "wesnoth").sources[0]={type:"dir",path:"."})' packaging/flatpak/org.wesnoth.Wesnoth.json > wesnoth-manifest.json
git config --global --add safe.directory "$PWD"
branch=ci-$(git describe || git log -n 1 --format=%h) # if git describe fails fall back to the commit hash
flatpak-builder --force-clean --default-branch="$branch" --disable-rofiles-fuse --jobs=2 wesnoth-app wesnoth-manifest.json
flatpak build-export export wesnoth-app "$branch"
flatpak build-bundle export wesnoth.flatpak org.wesnoth.Wesnoth "$branch" --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
- name: Upload flatpak bundle
uses: actions/upload-artifact@v4
@ -214,7 +233,7 @@ jobs:
translations:
runs-on: ubuntu-latest
container:
image: wesnoth/wesnoth:2204-master
image: wesnoth/wesnoth:2404-master
env:
LANGUAGE: en_US.UTF-8
LANG: en_US.UTF-8
@ -234,7 +253,7 @@ jobs:
make pot-update; echo "Ran make pot-update"
make mo-update; echo "Ran make mo-update"
make clean
scons translations build=release --debug=time nls=true jobs=2; echo "Ran scons translations"
scons pot-update; echo "Ran scons pot-update"
scons update-po4a; echo "Ran scons update-po4a"
@ -244,8 +263,8 @@ jobs:
strategy:
fail-fast: false
matrix:
cfg: [ Debug, Release ]
runs-on: macos-11.0
cfg: [ Release ]
runs-on: macos-13
env:
CFG: ${{ matrix.cfg }}
@ -269,6 +288,7 @@ jobs:
[ -x "build/$CFG/unit_tests" ] || { printf 'Failed to build unit test executable!\n' >&2; exit 1; }
- name: Create disk image
working-directory: projectfiles/Xcode
continue-on-error: true # allow failures since this is not essential and it does fail spuriously (hdiutil: create failed - Resource busy)
run: hdiutil create -volname "Wesnoth_$CFG" -fs 'HFS+' -srcfolder "build/$CFG" -ov -format UDBZ "Wesnoth_${CFG}.dmg"
- name: Upload disk image
uses: actions/upload-artifact@v4
@ -277,7 +297,13 @@ jobs:
path: projectfiles/Xcode/Wesnoth_${{ matrix.cfg }}.dmg
- name: Run WML tests
if: matrix.cfg == 'Release'
run: ./run_wml_tests -g -c -t 30 -p "projectfiles/Xcode/build/$CFG/The Battle for Wesnoth.app/Contents/MacOS/The Battle for Wesnoth"
run: ./run_wml_tests -g -c -t 30 -bt 350 -p "projectfiles/Xcode/build/$CFG/The Battle for Wesnoth.app/Contents/MacOS/The Battle for Wesnoth" -a=--userdata-dir="$PWD/ud"
- name: Upload userdata files from WML unit tests (logs, replays)
if: matrix.cfg == 'Release' && (success() || failure())
uses: actions/upload-artifact@v4
with:
name: WMLTest-userdata-MacOS
path: ud
- name: Run unit tests
run: ./run_boost_tests --path=projectfiles/Xcode/build/"$CFG" --executable=unit_tests
@ -285,7 +311,7 @@ jobs:
strategy:
fail-fast: false
matrix:
cfg: [Debug, Release]
cfg: [Release]
env:
CFG: ${{ matrix.cfg }}
VCPKG_FEATURE_FLAGS: dependencygraph
@ -294,7 +320,7 @@ jobs:
defaults:
run:
shell: cmd
runs-on: windows-2019
runs-on: windows-latest
steps:
- { uses: actions/checkout@v4, with: { submodules: "recursive" } }
@ -317,14 +343,21 @@ jobs:
run: cmake -DCMAKE_BUILD_TYPE=%CFG% -DENABLE_GAME=true -DENABLE_SERVER=true -DENABLE_CAMPAIGN_SERVER=true
-DENABLE_TESTS=true -DENABLE_MYSQL=false -DENABLE_NLS=false
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_INSTALL_OPTIONS=--debug
-DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_GENERATOR_PLATFORM=x64 -G "Visual Studio 16 2019" .
-DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_GENERATOR_PLATFORM=x64 -G "Visual Studio 17 2022" .
- name: Build wesnoth, wesnothd, campaignd and unit tests
run: MSBuild.exe wesnoth.sln -p:Configuration=%CFG%
- name: Run WML unit tests
if: matrix.cfg == 'Release'
run: python run_wml_tests -v -g -c -t 20 -p %CFG%/wesnoth.exe
run: python run_wml_tests -v -g -c -t 20 -p %CFG%/wesnoth.exe -a=--userdata-dir=ud
- name: Upload userdata files from WML unit tests (logs, replays)
if: matrix.cfg == 'Release' && (success() || failure())
uses: actions/upload-artifact@v4
with:
name: WMLTest-userdata-Windows
path: ud
# run after all other jobs have completed to check overall build status
notification:

View file

@ -6,6 +6,7 @@ on:
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
workflow_dispatch:
jobs:
analyze:
@ -15,7 +16,7 @@ jobs:
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 360
permissions:
actions: read
@ -49,11 +50,12 @@ jobs:
- name: Install dependencies
if: matrix.language == 'cpp'
run: |
utils/autorevision.sh -t h > src/revision.h
sudo apt update
sudo apt install scons libboost-system1.74-dev libboost-filesystem1.74-dev libboost-iostreams1.74-dev \
libboost-serialization1.74-dev libboost-locale1.74-dev libboost-regex1.74-dev libboost-random1.74-dev \
libboost-program-options1.74-dev libboost-thread1.74-dev libboost-context1.74-dev libboost-test-dev \
libboost-coroutine1.74-dev libboost-graph1.74-dev libasio-dev libsdl2-dev libsdl2-image-dev \
sudo apt install scons libboost-system1.83-dev libboost-filesystem1.83-dev libboost-iostreams1.83-dev \
libboost-serialization1.83-dev libboost-locale1.83-dev libboost-regex1.83-dev libboost-random1.83-dev \
libboost-program-options1.83-dev libboost-thread1.83-dev libboost-context1.83-dev libboost-test-dev \
libboost-coroutine1.83-dev libboost-graph1.83-dev libasio-dev libsdl2-dev libsdl2-image-dev \
libsdl2-mixer-dev libvorbis-dev libpango1.0-dev libssl-dev libcurl4-openssl-dev liblua5.4-dev
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
- name: Autobuild

88
.github/workflows/image_metadata.yml vendored Normal file
View file

@ -0,0 +1,88 @@
name: Image metadata check CI
on:
push:
branches: [ master ]
paths: [ '**.webp', '**.png', '**.jpg', '**.jpeg' ]
pull_request:
paths: [ '**.webp', '**.png', '**.jpg', '**.jpeg' ]
permissions:
contents: read
jobs:
build:
name: Image Metadata
runs-on: ubuntu-latest
env:
BASE_SHA: ${{ github.event_name == 'push' && github.event.before || github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event_name == 'push' && github.event.after || github.event.pull_request.head.sha }}
steps:
- name: exiftool installation
run: |
sudo apt-get install --assume-yes exiftool
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: check image EXIF metadata
run: |
mapfile -t image_files < <(git diff --name-only --diff-filter=d "$BASE_SHA" "$HEAD_SHA" | grep -E '\.(webp|je?pg)$')
# cycle through the changed image files, make sure they have the right fields
for file in "${image_files[@]}"; do
# check Artist tag, fail if missing
artist="$(exiftool -p '$Artist' "$file")"
if [ "$artist" ]; then
printf 'Artist tag in %s is %s\n' "$file" "$artist"
else
printf 'no Artist EXIF tag in %s\n' "$file"
exit 1
fi
# check Copyright tag, fail if missing or wrong type
copyright="$(exiftool -p '$Copyright' "$file")"
case $copyright in
'GNU GPL v2+'|'CC BY-SA 4.0'|CC0)
printf 'Copyright tag in %s is %s\n' "$file" "$copyright"
;;
'')
printf 'no Copyright EXIF tag in %s\n' "$file"
exit 1
;;
*)
printf 'Copyright tag %s in file %s is not an accepted license! Must be one of: "GNU GPL v2+", "CC BY-SA 4.0", "CC0"\n' "$copyright" "$file"
exit 1
;;
esac
done
- name: check png XMP metadata
run: |
mapfile -t image_files < <(git diff --name-only --diff-filter=d "$BASE_SHA" "$HEAD_SHA" | grep -E '\.png$')
# cycle through the changed image files, make sure they have the right fields
for file in "${image_files[@]}"; do
# check Creator tag, fail if missing
artist="$(exiftool -p '$XMP:Creator' "$file")"
if [ "$artist" ]; then
printf 'Creator tag in %s is %s\n' "$file" "$artist"
else
printf 'no Creator XMP tag in %s\n' "$file"
exit 1
fi
# check Rights tag, fail if missing or wrong type
copyright="$(exiftool -p '$XMP:Rights' "$file")"
case $copyright in
'GNU GPL v2+'|'CC BY-SA 4.0'|CC0)
printf 'Rights tag in %s is %s\n' "$file" "$copyright"
;;
'')
printf 'no Rights XMP tag in %s\n' "$file"
exit 1
;;
*)
printf 'Rights tag %s in file %s is not an accepted license! Must be one of: "GNU GPL v2+", "CC BY-SA 4.0", "CC0"\n' "$copyright" "$file"
exit 1
;;
esac
done

4
.gitignore vendored
View file

@ -127,6 +127,7 @@ wesnoth.plg
*.exe
*.dll
*.so
compile_commands.json
# library files
.libs
@ -165,6 +166,8 @@ po/**/Makefile*
data/tools/unit_tree/**/files
data/tools/unit_tree/**/reports
data/tools/unit_tree/**/Locale
data/tools/macro_reference.html
about.wiki
# doc
doc/doxygen/html
@ -219,6 +222,7 @@ config.h
callgrind.out.*
data/dist
clean.sh
widgets_tested.log
# clangd cache
.cache/clangd

View file

@ -1,4 +1,4 @@
# set minimum version
# set minimum version
cmake_minimum_required(VERSION 3.14)
project(wesnoth)
@ -171,6 +171,7 @@ option(GLIBCXX_ASSERTIONS "Whether to define _GLIBCXX_ASSERTIONS" OFF)
option(GLIBCXX_DEBUG "Whether to define _GLIBCXX_DEBUG and _GLIBCXX_DEBUG_PEDANTIC. Requires a version of Boost's program_options that's compiled with __GLIBCXX_DEBUG too." OFF)
option(ENABLE_POT_UPDATE_TARGET "Enables the tools to update the pot files and manuals. This target has extra dependencies." OFF)
option(FORCE_COLOR_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." FALSE)
option(CLANG_TIDY "Enable clang-tidy linter checks." OFF)
if(UNIX AND NOT APPLE AND NOT CYGWIN)
option(ENABLE_NOTIFICATIONS "Enable Window manager notification messages" ON)
@ -255,6 +256,11 @@ if(NOT MSVC)
endif()
endif()
### Enable clang-tidy linting
if (CLANG_TIDY)
set(CMAKE_CXX_CLANG_TIDY "clang-tidy -Wno-unknown-warning-option")
endif()
### Set the final compiler flags.
set(COMPILER_FLAGS "${COMPILER_FLAGS} ${CXX_FLAGS_USER}")
@ -474,7 +480,7 @@ if(NOT MSVC)
else()
set(CMAKE_CXX_FLAGS "/W3 /WX /wd4503 /wd4351 /wd4250 /wd4244 /wd4267 /we4239 /wd4275 /EHsc /utf-8 /Zc:__cplusplus" CACHE STRING "Global flags used by the CXX compiler during all builds." FORCE)
set(CMAKE_C_FLAGS "/WX" CACHE STRING "Global flags used by the C compiler during all builds." FORCE)
add_definitions(-D_WIN32_WINNT=0x0601 -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -DNOMINMAX)
add_definitions(-D_WIN32_WINNT=0x0A00 -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -DNOMINMAX)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG_LUA")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
@ -527,7 +533,7 @@ if(ENABLE_GAME OR ENABLE_TESTS)
find_package(VorbisFile REQUIRED)
find_package(PkgConfig REQUIRED)
find_package(Fontconfig REQUIRED)
find_package(SDL2 2.0.10 REQUIRED)
find_package(SDL2 2.0.18 REQUIRED)
if(NOT MSVC)
# for everything else, use pkgconfig
# SDL2_image and SDL2_mixer don't seem to have any cmake configuration available at all

View file

@ -2,7 +2,7 @@
## Prerequisites
Wesnoth requires a compiler with sufficient C++17 support such as GCC 8 and
Wesnoth requires a compiler with sufficient C++17 support such as GCC 11 and
later, or a version of Clang with equivalent support.
You'll need to have these libraries and their development headers installed in
@ -19,8 +19,9 @@ order to build Wesnoth:
* System
* Coroutine
* Graph
* Charconv (This requires boost 1.85 or higher and is optional but reccomended especially for clang builds)
* SDL2 libraries:
* SDL2 >= 2.0.10 (macOS: 2.0.22 due to needing https://github.com/libsdl-org/SDL/commit/3bebdaccb7bff8c40438856081d404a7ce3def30)
* SDL2 >= 2.0.18 (macOS: 2.0.22 due to needing https://github.com/libsdl-org/SDL/commit/3bebdaccb7bff8c40438856081d404a7ce3def30)
* SDL2_image >= 2.0.2 (with PNG, JPEG, and WEBP support)
* SDL2_mixer >= 2.0.0 (with Ogg Vorbis support)
* Fontconfig >= 2.4.1
@ -173,7 +174,7 @@ false value.
| `strict=<boolean>` | `ENABLE_STRICT_COMPILATION=<boolean>` | Whether to treat compiler warnings as errors or not. Primarily intended for developers. |
| `prefsdir=<directory name>` | `PREFERENCES_DIR=<directory name>` | Hardcoded user preferences and user data directory. The default is to leave this unspecified so that Wesnoth will use separate XDG paths such as .config/wesnoth and .local/share/wesnoth/<version> for its user preferences and data, respectively. |
| `cxxtool=<program>` | `CMAKE_CXX_COMPILER=<program>` | Specifies which C++ compiler to use. By default, the system's default C++ compiler will be automatically selected during configuration. |
| `ccache=<boolean>` | | Whether to run the compiler through ccache first. Useful if the compiler executable is not a symbolic link to ccache. Requires ccache to be installed first. If using CMake, use CMAKE_C_COMPILER and CMAKE_CXX_COMPILER instead. |
| `ccache=<boolean>` | `CMAKE_CXX_COMPILER_LAUNCHER=ccache` | Whether to run the compiler through ccache first. Useful if the compiler executable is not a symbolic link to ccache. Requires ccache to be installed first. If using CMake, use CMAKE_C_COMPILER and CMAKE_CXX_COMPILER instead. |
| `extra_flags_<buildtype>=<flags>` `extra_flags_config=<flags>` | `CXX_FLAGS_USER=<flags>` | Additional compiler flags to use when compiling a specific build type (SCons-only). To apply the same flags to all builds, use extra_flags_config (SCons) or CXX_FLAGS_USER (CMake) without a build type suffix. Alternatively, you may specify your flags in the CXXFLAGS environment variable. |
| `fifodir=<full path>` `server_uid=<UID>` `server_gid=<GID>` | `FIFO_DIR=<full path>` `SERVER_UID=<UID>` `SERVER_GID=<GID>` | Directory and owner id for the wesnothd control FIFO file. This is relevant only if you wish to be able to communicate with a local wesnothd instance through a named pipe. You must run wesnothd with the same UID specified at build time for this to work. |
| `enable_lto=<boolean>` | `ENABLE_LTO=<boolean>` | Controls using Link Time Optimization. Enabling will result in a smaller, faster executable at the cost of increased time to compile and link. For cmake, use LTO_JOBS=N tells how many threads to use during linking. |

View file

@ -3,7 +3,7 @@
|Branch|CI status|
|------|---------|
|Master|[![CI](https://github.com/wesnoth/wesnoth/actions/workflows/ci-main.yml/badge.svg)](https://github.com/wesnoth/wesnoth/actions/workflows/ci-main.yml?query=branch%3Amaster)|
|1.16|[![CI](https://github.com/wesnoth/wesnoth/actions/workflows/ci-main.yml/badge.svg?branch=1.16)](https://github.com/wesnoth/wesnoth/actions/workflows/ci-main.yml?query=branch%3A1.16)|
|1.18|[![CI](https://github.com/wesnoth/wesnoth/actions/workflows/ci-main.yml/badge.svg?branch=1.18)](https://github.com/wesnoth/wesnoth/actions/workflows/ci-main.yml?query=branch%3A1.18)|
About
=====
@ -50,7 +50,7 @@ Wesnoth can be played on Windows, macOS, and Linux, and can be installed using:
* standalone installers on [SourceForge](https://sourceforge.net/projects/wesnoth/files/) (Windows and macOS)
* [Flatpak](https://flathub.org/apps/details/org.wesnoth.Wesnoth) (Linux)
Additionally, Wesnoth is available for [iOS](https://apps.apple.com/us/app/battle-for-wesnoth/id575852062) and [Android](https://play.google.com/store/apps/details?id=it.alessandropira.wesnoth114).
Additionally, Wesnoth is available for [iOS](https://apps.apple.com/us/app/battle-for-wesnoth/id575852062) and [Android](https://sourceforge.net/projects/wesnoth-on-android/files/).
To build the game from source, see [INSTALL](/INSTALL.md) for instructions.

View file

@ -120,6 +120,7 @@ opts.AddVariables(
BoolVariable("OS_ENV", "Forward the entire OS environment to scons", False),
BoolVariable("history", "Clear to disable GNU history support in lua console", True),
BoolVariable('force_color', 'Always produce ANSI-colored output (GNU/Clang only).', False),
BoolVariable('compile_db', 'Produce a compile_commands.json file.', False),
)
#
@ -189,6 +190,11 @@ if env['distcc']:
if env['ccache']: env.Tool('ccache')
if env['compile_db']:
env.Tool('compilation_db')
cdb = env.CompilationDatabase()
Alias('cdb', cdb)
boost_version = "1.67"
def SortHelpText(a, b):
@ -226,6 +232,7 @@ You can make the following special build targets:
update-po = merge message catalog templates with localized message catalogs for particular lingua
update-po4a = update translations of manual and manpages
af bg ca ... = linguas for update-po
translations = build all translations
dist = make distribution tarball as wesnoth.tar.bz2 (*).
data-dist = make data tarball as wesnoth-data.tar.bz2 (*).
binary-dist = make data tarball as wesnoth-binaries.tar.bz2 (*).
@ -363,7 +370,7 @@ if env["prereqs"]:
def have_sdl_other():
return \
conf.CheckSDL2('2.0.10') & \
conf.CheckSDL2('2.0.18') & \
conf.CheckSDL2Mixer() & \
conf.CheckSDL2Image()
@ -378,6 +385,7 @@ if env["prereqs"]:
conf.CheckBoost("program_options", require_version = boost_version) & \
conf.CheckBoost("random", require_version = boost_version) & \
conf.CheckBoost("smart_ptr", header_only = True) & \
conf.CheckBoostCharconv() & \
CheckAsio(conf) & \
conf.CheckBoost("thread") & \
conf.CheckBoost("locale") & \
@ -664,7 +672,7 @@ for env in [test_env, client_env, env]:
env[d] = os.path.join(env["prefix"], env[d])
if env["PLATFORM"] == 'win32':
env.Append(LIBS = ["wsock32", "crypt32", "iconv", "z", "shlwapi", "winmm", "ole32", "uuid"], CCFLAGS = ["-mthreads"], LINKFLAGS = ["-mthreads"], CPPDEFINES = ["_WIN32_WINNT=0x0601"])
env.Append(LIBS = ["wsock32", "crypt32", "iconv", "z", "shlwapi", "winmm", "ole32", "uuid"], CCFLAGS = ["-mthreads"], LINKFLAGS = ["-mthreads"], CPPDEFINES = ["_WIN32_WINNT=0x0A00"])
if env["PLATFORM"] == 'darwin': # Mac OS X
env.Append(FRAMEWORKS = "Cocoa") # Cocoa GUI

View file

View file

@ -81,7 +81,7 @@ code_blocks_target_translations = {
# XCode #
#=======#
def add_to_xcode(filename, targets):
def modify_xcode(filename, targets, remove):
"""Add the given file to the specified targets.
"""
projectfile = rootdir.joinpath(
@ -103,36 +103,47 @@ def add_to_xcode(filename, targets):
f"Could not find target '{tname}' in Xcode project file")
# groups are organized by directory structure under "src"
src_groups = project.get_groups_by_name("src")
# except for tests, which have a separate root, "tests"
if pathlib.Path("tests") in filename.parents:
src_groups = project.get_groups_by_name("tests")
else:
src_groups = project.get_groups_by_name("src")
if len(src_groups) != 1:
raise Exception("problem finding 'src' group in xcode project")
src_group = src_groups[0]
parent_group = src_group
for d in filename.parts[:-1]:
if d == "tests":
continue
found_groups = project.get_groups_by_name(d, parent=parent_group)
if len(found_groups) != 1:
groupname = parent_group.get_name()
raise Exception(f"problem finding '{d}' group in '{groupname}'")
parent_group = found_groups[0]
# if the group already has an entry with the same filename, loudly skip.
# note: this doesn't allow adding to targets one at a time.
# a new file should be added to all targets at once...
# or maybe targets could be checked somehow,
# or maybe the file could simply be completely removed and readded.
if project.get_files_by_name(filename.name, parent=parent_group):
print(" '"+filename.name+"' already found in Xcode project '"+",".join(translated_targets)+"', skipping")
return
if remove :
# Remove from all targets if we want to remove
for file in project.get_files_by_name(filename.name, parent=parent_group):
project.remove_file_by_id(file.get_id())
else:
# if the group already has an entry with the same filename, loudly skip.
# note: this doesn't allow adding to targets one at a time.
# a new file should be added to all targets at once...
# or maybe targets could be checked somehow,
# or maybe the file could simply be completely removed and readded.
if project.get_files_by_name(filename.name, parent=parent_group):
print(" '"+filename.name+"' already found in Xcode project '"+",".join(translated_targets)+"', skipping")
return
# force is True here because otherwise a duplicate filename in
# a different place will block addition of the new file.
# the rest is just to match existing project file structure.
project.add_file(filename.name,
force=True,
tree="<group>",
parent=parent_group,
target_name=translated_targets,
)
# force is True here because otherwise a duplicate filename in
# a different place will block addition of the new file.
# the rest is just to match existing project file structure.
project.add_file(filename.name,
force=True,
tree="<group>",
parent=parent_group,
target_name=translated_targets,
)
# that's done, save the file
project.save()
@ -142,7 +153,7 @@ def add_to_xcode(filename, targets):
# source_lists #
#==============#
def add_to_source_list(filename, source_list):
def modify_source_list(filename, source_list, remove):
source_list_file = rootdir.joinpath("source_lists", source_list)
sl_lines = open(source_list_file).readlines()
file_line = filename.as_posix() + '\n'
@ -151,12 +162,16 @@ def add_to_source_list(filename, source_list):
if filename.suffix != ".cpp":
return
# if the target already has an entry with the same filename, loudly skip
if file_line in sl_lines:
print(f" '{filename}' already found in '{source_list}', skipping")
return
if remove:
if file_line in sl_lines: sl_lines.remove(file_line)
else:
# if the target already has an entry with the same filename, loudly skip
if file_line in sl_lines:
print(f" '{filename}' already found in '{source_list}', skipping")
return
sl_lines.append(file_line)
sl_lines.append(file_line)
sl_lines.sort()
open(source_list_file, 'w').writelines(sl_lines)
@ -164,13 +179,18 @@ def add_to_source_lists(filename, targets):
translated_targets = [source_list_target_translations[t] for t in targets]
print(" source_list targets:", translated_targets)
for t in translated_targets:
add_to_source_list(filename, t)
modify_source_list(filename, t, False)
def remove_from_source_lists(filename):
# remove from all tagerts if -r was specified.
for t in source_list_target_translations.values():
modify_source_list(filename, t, True)
#==============#
# Code::Blocks #
#==============#
def add_to_code_blocks_target(filename, target):
def modify_code_blocks_target(filename, target, remove):
cbp_file = rootdir.joinpath(
"projectfiles",
"CodeBlocks",
@ -184,30 +204,33 @@ def add_to_code_blocks_target(filename, target):
elem = f"\t\t<Unit filename=\"{filename_for_cbp}\" />\n"
# if the target already has an entry with the same filename, loudly skip
if elem in cbp_lines:
print(f" '{filename}' already found in '{target}.cbp', skipping")
return
if remove:
if elem in cbp_lines: cbp_lines.remove(elem)
else:
# if the target already has an entry with the same filename, loudly skip
if elem in cbp_lines:
print(f" '{filename}' already found in '{target}.cbp', skipping")
return
# find an appropriate line to add before/after
index = 0
for line in cbp_lines:
if line.startswith("\t\t<Unit "):
if elem < line:
# find an appropriate line to add before/after
index = 0
for line in cbp_lines:
if line.startswith("\t\t<Unit "):
if elem < line:
break
elif line.startswith("\t\t<Extensions>"):
# we must be the last entry, as this comes after the Unit section
break
elif line.startswith("\t\t<Extensions>"):
# we must be the last entry, as this comes after the Unit section
break
index += 1
cbp_lines.insert(index, elem)
index += 1
cbp_lines.insert(index, elem)
open(cbp_file, 'w').writelines(cbp_lines)
def add_to_code_blocks(filename, targets):
translated_targets = [code_blocks_target_translations[t] for t in targets]
def modify_code_blocks(filename, targets, remove):
translated_targets = code_blocks_target_translations.values() if remove else [code_blocks_target_translations[t] for t in targets]
print(" code::blocks targets:", translated_targets)
for t in translated_targets:
add_to_code_blocks_target(filename, t)
modify_code_blocks_target(filename, t, remove)
def sanity_check_existing_cpp_hpp(filenames):
"""
@ -279,6 +302,8 @@ if __name__ == "__main__":
help="which build targets to add the file to")
ap.add_argument("--no-checks", action="store_true",
help="do not check whether the files exist, etc")
ap.add_argument("-r", "--remove", action="store_true",
help="remove the specified files from projectfiles instead of adding them, --target is then ignored")
# By default, recognise --help too
options = ap.parse_args()
@ -295,7 +320,13 @@ if __name__ == "__main__":
sanity_check_existing_cpp_hpp(filenames)
for filename in filenames:
print(f"adding '{filename}' to targets: {options.target}")
add_to_xcode(filename, options.target)
add_to_source_lists(filename, options.target)
add_to_code_blocks(filename, options.target)
if options.remove:
print(f"removing '{filename}' from all targets")
modify_xcode(filename, options.target, True)
remove_from_source_lists(filename)
modify_code_blocks(filename, options.target, True)
else:
print(f"adding '{filename}' to targets: {options.target}")
modify_xcode(filename, options.target, False)
add_to_source_lists(filename, options.target)
modify_code_blocks(filename, options.target, False)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 B

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 678 B

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 KiB

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 677 B

After

Width:  |  Height:  |  Size: 815 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,014 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 677 B

After

Width:  |  Height:  |  Size: 815 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 517 B

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 776 B

After

Width:  |  Height:  |  Size: 914 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 B

After

Width:  |  Height:  |  Size: 953 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 835 B

After

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 953 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 535 B

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 744 B

After

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 744 B

After

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 752 B

After

Width:  |  Height:  |  Size: 890 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 B

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 B

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 852 B

After

Width:  |  Height:  |  Size: 990 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 901 B

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 B

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 B

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 B

After

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 B

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 B

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 B

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 B

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 B

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 B

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 B

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 B

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 312 B

Some files were not shown because too many files have changed in this diff Show more