84202 Commits

Author SHA1 Message Date
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 9c665ae3c4684f8826f4b7d8e0a75b9a986e8617 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 af81bba53b00d29e65ee5b7b89019f27457914d7 and 247e5ff05555bb6b937036c16d0cfeeae4fd5d35
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