82799 Commits

Author SHA1 Message Date
Celtic Minstrel
09c88d2b47 [LuaDoc] Fix typo 2024-02-07 22:10:33 -05:00
Celtic Minstrel
3276b9a36c [LuaDoc] Fix missing and incorrectly optional arguments to gui.widget.remove_items_at 2024-02-07 22:10:33 -05:00
Celtic Minstrel
249f9e70f9 [Lua] Fix an error reading filters in wesnoth.game_events.add 2024-02-07 22:09:55 -05:00
Celtic Minstrel
a9c0d37525
[Lua] Prevent divide by 0 in rushers recruit AI 2024-02-07 20:13:13 -05:00
Celtic Minstrel
d19858a150 [Lua] Fix missing parentheses in rusher recruit AI
Fixes #8297
2024-02-07 19:06:47 -05:00
Steve Cotton
5b35ca3edd SoF S02: Alanin has planned (unshrouded) his escape route
The intro to this map shows Rugnur running into the stronghold, with the
elves not far behind. Those moves were running into shroud, which
generated "could not find move_unit_fake route" warnings because the
animation prefers routes that moving side can already see.

Also, have the conversation between Alanin and Rugnur take place with
Alanin on a road hex, because if he starts on the keep then he takes a
long route to avoid cave terrain.
2024-02-08 00:47:28 +01:00
P. J. McDermott
1f1a68e94e Check for and fix copyrights.csv rows with wrong numbers of fields
This should prevent accidental uses of commas in fields without quotes.
It would have caught the previous issue of str.join() not quoting fields
that contain commas.  For now though, it found a different issue: three
rows added in commit c6313453143c had duplicated MD5 fields.
2024-02-07 11:12:55 +01:00
P. J. McDermott
5a048ad303 Fix how update_copyrights writes fields with commas
str.join() isn't smart enough to quote CSV fields when necessary, so
a field containing field separators (commas) would get parsed by the
second update_copyrights run as multiple fields.  Upon finding some rows
containing an extra field, the csv.reader() object then added an extra
blank field to each of all the other rows.

Use csv.writer() instead of str.join() to write proper CSV output.

This commit also undoes the removal of commas from fields that was
necessary in commit 676c1fa2b98.
2024-02-07 11:12:55 +01:00
Celtic Minstrel
ba3b00f3df [LuaDoc] Add a type alias for a compiled formula function 2024-02-06 22:21:09 -05:00
Celtic Minstrel
e644613cae [LuaDoc] mathx.random_choice can return nil if the input list is empty 2024-02-06 19:04:02 -05:00
Celtic Minstrel
121f0a3cac [LuaDoc] Add unit.loc field 2024-02-06 19:04:02 -05:00
Celtic Minstrel
a38e67da45 [LuaDoc] Title is optional for alert/confirm 2024-02-06 19:04:02 -05:00
Celtic Minstrel
dc75045eea [LuaDoc] Add comments for micro_ai_helper.lua 2024-02-06 19:04:01 -05:00
Celtic Minstrel
265aea7da4 [LuaDoc] Document the third element of the location triple returned from paths.find_reach 2024-02-06 19:04:01 -05:00
Celtic Minstrel
f9c7336f1a [LuaDoc] Document location_set operators 2024-02-06 19:04:01 -05:00
Celtic Minstrel
3a7bd26067 [LuaDoc] Document ndirs member of a directory listing 2024-02-06 19:04:01 -05:00
Celtic Minstrel
3bf903e2a4 [LuaDoc] Avoid "Missing required fields" warnings by annotating the fields as optional.
This is probably rather unfortunate in the case of the unit fields, as it may now interpret it as meaning the fields can be nil. We'll see if this causes issues.
2024-02-06 19:04:01 -05:00
Celtic Minstrel
c7741907c2 [LuaDoc] Fix several errors in the inline documentation 2024-02-06 19:04:00 -05:00
Celtic Minstrel
795bb22be9 [LuaDoc] Add annotations for micro_ai_self_data.lua 2024-02-06 19:04:00 -05:00
Celtic Minstrel
5a51a309a4 [LuaDoc] Fix several minor errors in the specification of API 2024-02-06 19:04:00 -05:00
Celtic Minstrel
2aa7d9357d [LuaDoc] Fix failure to detect that the string type's metatable was overridden
This isn't a generic solution, but at least makes all our built-in stringx methods work.
2024-02-06 19:04:00 -05:00
gfgtdf
60ae0db611
remove nonsensial comment
we call do_replay() after at_end() so its clearly possible  to be at the end here
2024-02-06 02:51:36 +01:00
Steve Cotton
cfb28fbfb5 Use -Wno-dangling-reference when building with GCC-13
Version 13 of GCC added the -Wdangling-reference option, however
due to false positives it had to be moved from -Wall to -Wextra.
Discussion about its status in GCC-14 is in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110075

The warning is for C++ only and the flag will generate a warning
when compiling C files if the flag is set in Scon's CCFLAGS.

The docs don't explain exactly what triggers the warning, but here's the
explanation from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106393#c1
> The warning works by checking if a reference is initialized with a function
> that returns a reference, and at least one parameter of the function is a
> reference that is bound to a temporary. It assumes that such a function
> actually returns one of its arguments! ... suppress the warning when we've
> seen the definition of the function and we can say that it can return a
> variable with static storage duration.

Consistent with that, we're getting warnings on functions of the form
find(container, const std::string&). All of the things triggering it
seem to be false positives:

* Calls to find_widget<...>.
* Calls to theme::get_theme_config.
* Calls to race::gender_value.
* In src/actions/attack.cpp, any `attacker->attacks()[i]`.
    Although there's an iterator in there, the eventual reference
    is to a member of the array, not the iterator.
* In src/gui/dialogs/unit_advance.cpp, `cfg.child_range("...").back()`
    That returns an object indirectly owned by cfg.

We'd like the other warnings of -Wextra, so turn off -Wdangling-reference.
2024-02-05 20:03:40 +01:00
Steve Cotton
78e929e075 SoF S02: Don't [allow_undo] when activating the runes
Standing on the runes changes some hexes to impassable,
so it's a change to the game state. It isn't a random
event, so it would be possible to add an [on_undo], but
that seems unnecessary, and would need to handle
multiple runes.
2024-02-05 16:18:34 +01:00
Severin Glöckner
dd40711d79 Avoid linebreak in title text of help pages
* doesn't clutter unit help tree when a unit variation is displayed
* when displaying a unit variation in the help, it displays the links
  below the unit image at the same line as when displaying the base unit
patch from #6011
2024-02-04 21:20:52 -06:00
Celtic Minstrel
c143dfdfeb Fix shallow_literal/shallow_parsed not returning named tuples for the WML tags 2024-02-04 16:23:25 -05:00
Celtic Minstrel
9eefcda17a Deprecate ai_helper.split
I used level 3 deprecation because this is something that was intended for internal use in the ai_helper module, and the ai_helper module itself is not an officially stable API
2024-02-04 13:28:19 -05:00
pentarctagon
d71d3b25cd Force the UI to update fully when changing addon filters
content_resize_request() doesn't appear to return the correct result in this case, even when the number of rows to display has increased.

Fix #7270
2024-02-04 12:02:59 -06:00
pentarctagon
676c1fa2b9 copyrights update 2024-02-04 10:56:03 -06:00
pentarctagon
e3ee472352 Remove transparent padding from the status icon image files.
Just removing transparency from all images on the top bar and side bar causes other issues, particularly with the unit sprite and the clock icon alignment.

Fixes #8335
2024-02-04 10:56:03 -06:00
doofus-01
e63bc7c743 remove LAYER argument from main Cud wall rule 2024-02-03 14:57:45 -08:00
Nils Kneuper
72f48bf4a5 updated Arabic translation 2024-02-03 22:37:35 +01:00
Nils Kneuper
75e9a10132 updated Finnish translation 2024-02-03 22:36:56 +01:00
Nils Kneuper
96b3a4b0f4 updated French translation 2024-02-03 22:36:12 +01:00
shijie.chen
cfd8aabb94 [dev] Remove unused header files 2024-02-03 20:21:57 +01:00
gfgtdf
75784ee3c3
make sure transform_unit doesn't heal the unit (#8147)
Previously it could happen that removing an object applies the status healing,
in particular of the default AMLAs (which are meant to only heal the unit once).
2024-02-03 18:47:37 +01:00
gfgtdf
30139da16c
fix typo in comment 2024-02-02 20:28:45 +01:00
Steve Cotton
6b516e8aa5 Fix deprecation warning when setting [endlevel]end_credits=
Change the Lua implementation to directly call the
non-deprecated function, this is related to 9daa10a9f2.

Clean up the C++ header files by removing the declarations of
functions that were removed in 3c8de46771.

Use [endlevel]end_credits=no in the test scenario (trigger it
by moving to hex 9,3). If you debug with :next_level without
triggering the moveto, "The End" will show; trigger the moveto
first, and it won't show the credits.
2024-02-02 16:04:27 +01:00
Rafael Fillipe Silva
16e9476191 add a disallowed type to override a mandatory name key into a disallowed optional name key
An impossible regex is defined as the value so nothing will be matched, not even an empty string. The field should be omitted entirely.
2024-02-02 14:57:05 +01:00
Rafael Fillipe Silva
1eb2b494c4 remove super from [elseif] tag, similar to [if], as this is a filter context
This removes the `name` mandatory key requirement from the `[elseif]` without the need of an override.
2024-02-02 14:57:05 +01:00
Tahsin Jahin Khalid
4a8498d5b5
changelog: add missing unit type ID prefix (#8329)
Doing so since we have three Javelineers:

- Javelineer (Loyalist)
- Merman Javelineer (Rebels)
- Saurian Javelineer (core/pseudo-Drakes)

One easily mistake the loyalist one for the merman one here.
2024-02-02 19:28:32 +06:00
pentarctagon
37a45c32ce Re-add cropping of transparent padding on status icons.
Fixes #8303
2024-02-01 09:32:14 -06:00
gfgtdf
9dbbb09fc3
fix whitespace 2024-02-01 01:34:37 +01:00
gfgtdf
05d1e4b9ba
require_modification/campaign now defaults to yes (#8135)
It's better to be defensive with those default values,
especially now that the mp lobby code can automatically
download addons, having require_modification set to true
isn't inconvenient for the users either.

(The issue that the added comment is about isn't something
that was added in this commit)
2024-02-01 01:29:20 +01:00
Tahsin Jahin Khalid
e506c2a1ff
[Units] Raven unit tree stats update patch
* units/ war harbinger: +3 HP, +2g cost, -50 XP

* units/war harbinger: removed village and forest def

* units/Dark Omen: removed village and forest def

* Units/Raven: removed village and forest def

* add changelog entry file
2024-02-01 01:29:24 +06:00
Hejnewar
2811bfcdc5
UtBS: Mitigate issues with flying units breaking scenarios
Fix #8188
2024-01-31 08:51:26 +01:00
Hejnewar
d6e3773aa1
UtBS S08: Skip dialog that does not make sense after discovering the cultist fort
Fix #8198
2024-01-31 08:49:54 +01:00
Hejnewar
f9aa91ee87
UtBS: Remove deprecated [store_unit_defense] use
Fix #8184
2024-01-31 08:45:31 +01:00
P. J. McDermott
4c87a4be74 Fix license on LordBob's portraits, and check licenses
Commit 97c8feb8ca3b (pull #7903) specified for 58 of LordBob's portraits
a license of "GNU GPL v2+;CC BY-SA 4.0".  I don't know if the semicolon
is supposed to mean "and" or "or".

"And" (e.g. a GNU GPL v2+ file with CC BY-SA 4.0 modifications) isn't
legally possible.  "Or" appears incorrect, because LordBob [licensed][1]
his portraits under "the GNU GPL" and I can't find any evidence of him
also licensing them under CC BY-SA 4.0.

Also make update_copyrights check for possibly invalid licenses like
"GNU GPL v2+;CC BY-SA 4.0".

[1]: https://forums.wesnoth.org/viewtopic.php?p=329342#p329342
2024-01-30 21:20:10 -06:00
P. J. McDermott
efad8a0f74 Fix and check copyrights.csv "Needs Update" field
Commit 97c8feb8ca3b (pull #7903) included a comma in the "Notes" field
of four files, which instead of being enclosed in quotes, overflowed
into the "Needs Update" field.  So if those files are updated,
update_copyrights would clobber part of the notes.

Commit 1ecd4f4d599c (pull #8195) updated the "Date" field but didn't
clear "Needs Update" after update_copyrights set "Needs Update" and
"MD5" for data/core/images/units/monsters/raven/harbinger.png.

Make update_copyrights check for and warn about "Needs Update" instead
of clobbering it.  This should trigger CI failures if someone forgets
to update a row or accidentally puts into the "Needs Update" field
important information that shouldn't be clobbered on future updates.
2024-01-30 21:20:10 -06:00