Commit graph

84281 commits

Author SHA1 Message Date
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