82226 Commits

Author SHA1 Message Date
newfrenchy83
2a4a073da4 Add tests for ranges and negative values in ability filters
Changed to use "-" instead of ".." as the separator by octalot,
but I believe newfrenchy83 prefers "..".
2023-08-11 21:59:06 +02:00
Steve Cotton
cc8dddea6e Support negative numbers in ranges
Adds support for using these in the weapons and ability filters:
* "-1", which was previously treated as an parse error (no number before the separator).
* "-3--1"
* "-infinity" as the lower number in the range, provided a different upper number is given.

This treats "-infinity" (with no other number), "-infinity--infinity",
"infinity" (with no other number) and "infinity-infinity" as errors. It seems
unlikely that someone would intend to use a filter that can't match any
reasonable number.

The range "-infinity-infinity" will be parsed successfully. I don't see a use
case for that, but nor do I see a reason to add extra C++ to reject it.
However, it's not added to the schema, as I think it's good for the schema to
give a warning when someone creates a filter which will accept every value
(including accepting the default, so "-infinity-infinity" accepts the unset
value too).

Includes new unit tests for the C++ and the Lua stringx.parse_range functions.
The next commit adds more WML tests, but is kept separate to credit the author.

This started as a change to move common filter functions from unit.cpp to
somewhere that they could be reused for other config-based filters. In the
process a missing feature was found and added, the move is still included in a
single Git commit because the move was required in order to make these
functions accessible to the Boost unit tests.

Two CodeBlocks project files additionally get src/utils/any.hpp added,
which was in one of them but missing from the other two. I noticed because
these are alphabetically at the start of the src/utils file list.

Thanks to @CelticMinstrel for the review comments and Xcode project updates.
2023-08-11 21:59:06 +02:00
Gunter Labes
76246291cd
Simplify campaign rank display 2023-08-11 21:41:42 +02:00
Charles Dang
7d05b3f441 We don't like unnecessary heap allocations 2023-08-11 15:07:03 -04:00
Gunter Labes
d5c76f7cc5
Use DATA variable consistently 2023-08-11 21:00:20 +02:00
Gunter Labes
73f2a6e90a
Update key bindings extraction 2023-08-11 20:56:13 +02:00
Pentarctagon
6319401d60 Add new query for MP activity report
This gives a rolling count of how many players have played how many games, which is useful for seeing what player retention for MP is.
2023-08-11 12:24:18 -05:00
Gunter Labes
e863350260
Allow specifying the destination for the macro reference 2023-08-11 18:38:27 +02:00
Gunter Labes
9f4f356f81
Just print the commit subject line 2023-08-11 17:29:30 +02:00
Gunter Labes
43f7e5d9b8
Clarify documentation 2023-08-11 16:50:10 +02:00
Steve Cotton
20ec934658 Whitespace consistency 2023-08-11 08:37:23 +02:00
Ivo Julca
5ebc9a790a Implement event priority
For any given event name, events execute in order of decreasing priority.

Priority is a real number, and may be assigned via the `priority` attribute for
the WML [event] tag, or through the Lua APIs:

- wesnoth.game_events.add({priority = number})
- wesnoth.game_events.add_repeating(name, action, [priority])

Note that delayed variable substitution is not currently supported in the WML attribute.
2023-08-11 08:34:43 +02:00
Gunter Labes
9887d0ca26
Run all tests even if some fail 2023-08-10 23:54:42 +02:00
Gunter Labes
8714f8e6bc
Run whole notification job only on push and failure 2023-08-10 23:27:17 +02:00
Gunter Labes
fac9504290
Allow notifications to work for PRs from forks 2023-08-10 10:38:55 +02:00
Gunter Labes
f9b480b6bb
Add IRC notification step to CI 2023-08-10 01:23:07 +02:00
Gunter Labes
7703433a05
Add IRC notification workflow 2023-08-10 00:07:45 +02:00
Gunter Labes
4a9acd6e06
Improve --help output
Fixes #7836.
2023-08-09 11:08:20 +02:00
Pentarctagon
bf1a7c18e3 Remove unused threads arguments from wesnothd.
Also remove an old environment variable from SDL 1.2.
2023-08-06 00:15:42 -05:00
Gunter Labes
8708a222f2
Update before install 2023-08-05 22:18:24 +02:00
Gunter Labes
81c31c40c5
Update jquery and tablesorter 2023-08-05 20:07:49 +02:00
Nils Kneuper
76dfa7394a updated Italian translation 2023-08-05 13:13:04 +02:00
Nils Kneuper
1d86b5b9c1 updated Czech translation 2023-08-05 13:12:13 +02:00
Pentarctagon
1c20221ae5 bump vcpkg for dependency graph fix 2023-08-04 22:22:27 -05:00
Charles Dang
3e1e910ff7 Font/Text: inverse_table can be constexpr 2023-08-04 21:44:54 -04:00
Pentarctagon
63bee6a315 make sure 'new addon' return value is never a valid addon id 2023-08-04 18:36:05 -05:00
Pentarctagon
6fc627511c Don't ask for the addon again when using F5 2023-08-04 18:36:05 -05:00
Charles Dang
542fd92744 GUI2/Main Menu: used linear scaling for background (resolves #7741) 2023-08-04 15:34:52 -04:00
Gunter Labes
8386642a57
Set up CodeQL security analysis 2023-08-04 17:20:41 +02:00
Gunter Labes
64f702e96d
Move {join,host}.lua to a better place 2023-08-03 22:06:27 +02:00
Gunter Labes
a0d7054360
Fix schema to allow upkeep in SUF 2023-08-03 20:09:19 +02:00
Gunter Labes
68b3eeb0ff
Fix schema to allow SUF under [advancement] 2023-08-03 19:49:52 +02:00
Gunter Labes
3ba96c0fd4
Remove useless default
Bash is the default either way and without this the default options are saner.
2023-08-02 22:17:34 +02:00
Gunter Labes
c2d105e4f0
Fix indentation 2023-08-02 20:15:18 +02:00
Steve Cotton
3203d367c6 Update vcpkg baseline to include glib's build fix
Using the version from 2 days ago, as that avoids an update to CMake,
and I want to look at one issue at a time.
2023-08-02 14:25:09 +02:00
gfgtdf
8083da0d73 Fix #7820 "Enable planning mode on start" Setting
previously the code that tried to activate the whiteboard failed because it checks `can_modify_game_state` which checks for `!synced_context::is_unsynced`
2023-08-02 04:23:18 +02:00
Gunter Labes
6d4066aa52
Simplify windows job a little by removing absolute paths 2023-08-01 20:38:48 +02:00
Pentarctagon
1af69b2236 fix git checkout failing for vcpkg 2023-07-28 17:12:04 -05:00
Gunter Labes
b5821d9611
Update archive exclusions 2023-07-27 18:07:16 +02:00
Pentarctagon
752e8788f5
try enabling vcpkg's dependency graph (#7816) 2023-07-26 20:16:52 -05:00
Gunter Labes
34df9d6ca8
Revert "Game Display: make first_turn a static local to the only function that uses it"
This reverts commit cc7204f66ec3efe5dd04333c30782ac7dfdf918d.
2023-07-26 19:18:05 +02:00
Celtic Minstrel
b5ea773827
Update type.cpp
Fixes the other error noted in #7813
2023-07-24 13:47:11 -04:00
Gunter Labes
f99c0b50ba
Add missing include
Fixes part of #7813.
2023-07-24 18:17:52 +02:00
Pentarctagon
ae73b734f6 Fix parts of #7810
F5 causing the editor to crash - the editor saves temporary files out to disk which don't have an extension, so give them the proper extension
The add-on selection dialog showing non-add-on folders in the add-ons folder - only show files with a _main.cfg
2023-07-23 19:58:48 -05:00
Celtic Minstrel
d05bc6e444
Update filesystem.lua (typo) 2023-07-23 11:58:21 -04:00
Celtic Minstrel
46ac2ff1de
Update filesystem.lua
The new include_file directive uses the "scenarios" directory as the asset type, so add it to `filesystem.asset_type`.
2023-07-23 11:58:02 -04:00
Pentarctagon
c2ad332b21 consistent periods 2023-07-20 18:36:36 -05:00
Pentarctagon
0424f08f49 unused variable 2023-07-20 17:25:47 -05:00
Pentarctagon
8c1f2da40e try windows caching suggestion 2023-07-20 17:25:47 -05:00
Pentarctagon
5df54c8ba2 add deprecation message for map_file 2023-07-20 14:20:13 -05:00