82978 Commits

Author SHA1 Message Date
gfgtdf
a1286479f4 move victory_when_enemies_defeated around 2024-02-29 00:18:46 +01:00
Charles Dang
f1e6a0e0b1 Bump vcpkg baseline
Gives us (among other things) these updates:

Boost:             1.82                            -> 1.84
OpenSSL/libcrypto: 3.1.0a-dev (runtime 3.1.0a-dev) -> 3.2.0a-dev (runtime 3.2.0a-dev)
libcurl:           8.1.2 (runtime 8.1.2-DEV)       -> 8.6.0 (runtime 8.6.0-DEV)
Cairo:             1.17.8 (runtime 1.17.8)         -> 1.18.0 (runtime 1.18.0)
Pango:             1.50.14 (runtime 1.50.14)       -> 1.50.14 (runtime 1.50.14)
SDL:               2.26.5 (runtime 2.26.5)         -> 2.30.0 (runtime 2.30.0)
SDL_image:         2.6.3 (runtime 2.6.3)           -> 2.8.2 (runtime 2.8.2)
SDL_mixer:         2.6.3 (runtime 2.6.3)           -> 2.8.0 (runtime 2.8.0)
2024-02-28 13:18:26 -05:00
Wedge009
1c78750176 Set gold laurel first in case of only one difficulty setting.
Also use dense formatting as per existing code.
2024-02-28 14:03:52 +11:00
Wedge009
c25321b713 Remove spurious if condition. 2024-02-28 14:03:52 +11:00
Wedge009
a84561390a Keep laurel decorations consistent with difficulty level (resolves #8442). 2024-02-28 14:03:52 +11:00
pentarctagon
422fef3f3e update text post logging fix 2024-02-27 10:42:23 -06:00
newfrenchy83
bf420cd7dd update list of boost headers used in compilation 2024-02-27 15:21:11 +01:00
Tahsin Jahin Khalid
24ee61b2d3
WML tools GUI app: updated copyright (#8327)
String Change to update to year 2024
2024-02-27 11:37:03 +06:00
Iris Morelle
834c0cc670 HttT S5b: Fix duplicate loyal trait for Delurin
NAMED_LOYAL_UNIT has the loyal trait built in, so this results in an
extra copy of it being granted to the unit.

(cherry picked from commit c64777433ae35af2895adaddd1677eccd6f4541d)
2024-02-27 15:01:52 +11:00
Celtic Minstrel
a2c9d2627e [Lua] Fix obviously broken functions in ai_helper.
These functions are not used anywhere, and they have other issues besides the one fixed in this commit – they're implied to return all moves, but they only return one move for each possibly destination hex. However, this will make them at least be minimally usable.
2024-02-26 13:24:38 -05:00
Celtic Minstrel
bb3c95ebbc [Lua] Remove nonexistent parameter 2024-02-26 13:24:38 -05:00
Celtic Minstrel
c2f50062d2 [Lua] Suppress nodiscard warning 2024-02-26 13:24:38 -05:00
Celtic Minstrel
8276fd2e4b [Lua] Fix incorrect function name 2024-02-26 13:24:37 -05:00
Celtic Minstrel
1fd17d94ba [Lua] Fix missing parameter warning when passing empty filter 2024-02-26 13:24:37 -05:00
Celtic Minstrel
1efc2fbe4d [Lua] Avoid reusing no-longer-needed variables for different meanings
This raises Lua warnings about mismatched types
2024-02-26 13:24:36 -05:00
Celtic Minstrel
f19b7829c7 [Lua] Fix call of nonexistent function 2024-02-26 13:24:36 -05:00
Rafael Fillipe Silva
65090cc1bb add scons rules do detect boost-graph
Signed-off-by: Rafael Fillipe Silva <rfsc.mori@gmail.com>
2024-02-26 10:12:43 -06:00
Rafael Fillipe Silva
3fd34b53ea add boost-graph dependency to codeql workflow
Signed-off-by: Rafael Fillipe Silva <rfsc.mori@gmail.com>
2024-02-26 10:12:43 -06:00
Rafael Fillipe Silva
96ebe8a693 add tests for link cycle validation
Signed-off-by: Rafael Fillipe Silva <rfsc.mori@gmail.com>
2024-02-26 10:12:43 -06:00
Rafael Fillipe Silva
e24c13a1b7 implement cycle detection for type aliases (links)
Since the detection happens after loading the config tree, it is necessary to expose the links and subtypes of the types alias and composite, respectively.

This implementation builds a graph of all links to detect cycles, ignoring all other types.

To handle links in elements of lists, all subtypes of composite types are visited, keeping the type name of the parent composite type.

Signed-off-by: Rafael Fillipe Silva <rfsc.mori@gmail.com>
2024-02-26 10:12:43 -06:00
Rafael Fillipe Silva
c925737f54 format changes related super mandatory keys validation with clang-format 2024-02-26 10:12:43 -06:00
Rafael Fillipe Silva
0f78777dee add tests for mandatory key validations considering super tags 2024-02-26 10:12:43 -06:00
Rafael Fillipe Silva
c421d7e8be verify if all mandatory keys are specified, including the ones from the super tags
This pattern presents the same infinite loop issue as the find_key and find_tag calls on wml_tag. The solution is the same, to use a helper to keep track of the already seen tags and stop when a cycle is detected.
2024-02-26 10:12:43 -06:00
Rafael Fillipe Silva
be3724a003 add tests to missing super detection 2024-02-26 10:12:43 -06:00
Rafael Fillipe Silva
4600043492 detect when a super defined in the schema doesn't exist
Note that this is only detected if the tag referencing the missing super is used in a .cfg file. The super element itself doesn't need to be used for the detection to work.

The schema self validator should already catch this, but it deserves a warning of its own as the schema self validator can be disabled.
2024-02-26 10:12:43 -06:00
Rafael Fillipe Silva
40e7dff3ad add tests to cover super cycle detection while validating a .cfg file 2024-02-26 10:12:43 -06:00
Rafael Fillipe Silva
1c36153f06 detect schema super cycles while validating a .cfg file
Note that if the .cfg file does not use the tags that causes a cycle, those won't be detected.

This change exposes the super_refs_ so the schema validator does not need to reinvent wml_tag::expand when detecting super cycles.

The super dependency graph is built during the validation of each tag, finishing and reporting cycles at the end of the root tag.
2024-02-26 10:12:43 -06:00
Rafael Fillipe Silva
a3672ba509 add the super's full path to the tag's super_list
This allows for better diagonistic when the specified super doesn't exist and when super cycles are detected.
2024-02-26 10:12:43 -06:00
Rafael Fillipe Silva
c7e643bffd add a test to cover the fix to find_key's infinite loop/crash
Adds a test with a schema example containing a super cycle and a .cfg file containing an unknown key to this schema. Previously, this would cause an infinite loop or crash. Now an exception for invalid key should be thrown.
2024-02-26 10:12:43 -06:00
Rafael Fillipe Silva
c64416bbb6 handle super cycles while searching for a key or for a tag
A super cycle may be found during the validation, leading to an infinite loop. For example, calling find_key on an unknown key defined in the .cfg file may trigger this behavior if a cycle exists.

To handle this, a new version of these functions was introduced, keeping the original in the class' private scope. During the search there is a bookkeeping helper that will cause the routine to return nullptr if the search goes back to the initial tag context.
2024-02-26 10:12:43 -06:00
Rafael Fillipe Silva
f7511ea731 fix wml_tag::iterator CRTP parameter
Forwards the Map type parameter instead of defaulting to `std::map<string, T>`.
2024-02-26 10:12:43 -06:00
Rafael Fillipe Silva
fd6cd7c2a2 add tests for super cycle detection on schema self validator
Add test for the already existing validation where a tag shouldn't set itself as its own super.

Add test for the new cycle detection when validating a schema.
2024-02-26 10:12:43 -06:00
Rafael Fillipe Silva
dafb78cdf1 implement super cycle detection for the schema self validator
The super tag dependency forms a directed graph. Boost Graph's depth first search implementation was used with a back edge detector to find the cycles.

This is a preparation for enumerating all keys that a tag can use, including the keys from the super tags. If cycles aren't handled, it is impossible to validate mandatory keys without entering an infinite loop.
2024-02-26 10:12:43 -06:00
Steve Cotton
b9cb577bac HttT S06: Make Elensefar's defenses look damaged by the Orcish siege
Just some debris embellishments to suggest that the towers at the
end of the bridges were hit with siege weapons. The defense stats
are still the same and there's no dialogue change to go with this.
2024-02-26 11:31:38 +01:00
Nils Kneuper
4764956291 use correct font file instead whatever it was before... 2024-02-26 08:36:47 +01:00
pentarctagon
bfdbaaf423 Multiply help portait scaling by the pixel multiplier.
Fixes #8275
2024-02-26 00:27:15 -06:00
pentarctagon
6bb24810f1 and forward port this.. 2024-02-25 21:30:13 -06:00
Celtic Minstrel
04b5315b0b Lua: Make sure unit type is built before returning it from iteration
Fixes #8456
2024-02-25 16:13:29 -05:00
Gunter Labes
9371562454
Add 1.17 port number back
Once the server gets turned off the port number should be moved to the deactivated list instead of removed.
2024-02-25 19:31:25 +01:00
doofus-01
2eeccd98d8
skeletal rider and alternative bear portraits (#8453)
* skeletal rider portrait

* alternative bear portrait
2024-02-25 08:40:47 -08:00
pentarctagon
19dcc5530c looks like this never got updated 2024-02-24 23:20:23 -06:00
pentarctagon
7726b243a3 also add graph here. 2024-02-24 21:27:45 -06:00
pentarctagon
4b016790dd add boost graph dependency. 2024-02-24 19:16:40 -06:00
Charles Dang
011fa3aa9d Editor: refined Addon Selection prompt 2024-02-24 20:01:37 -05:00
Charles Dang
b0d1b75a9f MP/Staging: don't hardcode bold formatting in translatable strings 2024-02-24 20:00:06 -05:00
Charles Dang
2227eb00dd Simplify is_in_hex
Avoids double cache lookup.
2024-02-24 19:42:48 -05:00
Charles Dang
d3739effcf MP/Create Game: bump game label border size 2024-02-24 19:06:18 -05:00
Charles Dang
60e2d7c234 MP/Create Game: fix excess border if game icon not set 2024-02-24 19:05:58 -05:00
Charles Dang
08fc993c16 GUI2/Canvas: allow text shape to set outline (resolves #8398) 2024-02-24 18:30:33 -05:00
Charles Dang
dd4aec0cdb Help: use relative scaling for unit sprites (resolves #8401) 2024-02-24 17:43:56 -05:00