Elvish_Hunter
b397ca6262
wmlscope: document external docstring directive
2021-07-04 20:51:17 +02:00
Elvish_Hunter
ddc51d5d46
wmlscope: allow defining external docstrings for inline macros
...
External docstrings can be defined with the '# wmlscope: docstring' directive
2021-07-04 20:51:17 +02:00
Elvish_Hunter
00a5beb5ae
wmlscope: do not report 'INTERNAL:' macros in the macro reference
2021-07-04 20:51:17 +02:00
Steve Cotton
eaa39d653b
Say what the error is when a broken .po file stops Wesnoth starting
...
Bug #5923 is that a broken .po file can make Wesnoth fail to start, not
even reaching the title screen. Additionally, the error message printed
to the console just said "*timestamp* error general:", and then missed
the details of what had broken.
This commit fixes the error message to show which add-on and which line
are causing the problem.
2021-07-04 16:45:42 +02:00
Nils Kneuper
041b965719
updated Turkish translation
2021-07-03 19:04:09 +02:00
Nils Kneuper
e1a6685856
updated Portuguese (Brazil) translation
2021-07-03 19:00:48 +02:00
Nils Kneuper
63f1a67f36
updated Italian translation
2021-07-03 18:59:46 +02:00
Nils Kneuper
5f893170f5
updated Spanish translation
2021-07-03 18:58:14 +02:00
Nils Kneuper
760e55a294
updated Bulgarian translation
2021-07-03 18:53:46 +02:00
Celtic Minstrel
b4809e9ded
fix whitespace
2021-07-02 18:51:48 -04:00
Celtic Minstrel
7c2d0c1c5d
Lua API: Fix location_set.of_pairs including the location in the value
...
This is the real cause of the breakage in 5a9c24c4e79d624e34aa475949a4aa49b1984322 and d04bd2bf5d2ad932ca9bb3203f4ff9f91411e261.
A returned location now has both x/y and 1/2, so the location_set logic removed the x/y but kept the 1/2, causing it to break when converted to a config.
This makes it use rawget when the value is a table, which fixes it.
2021-07-02 16:55:42 -04:00
Charles Dang
f6327849f3
Deployed config::optional_child in a bunch of places
2021-07-02 14:58:23 -04:00
Celtic Minstrel
f5de3cca18
Lua API: Add a mode argument to locaton_set:to_wml_var
...
It has the same semantics as the mode in wml_utils.vwriter.init.
2021-07-02 14:04:54 -04:00
Celtic Minstrel
9ad2a8d2a0
Lua API: find_reach now accepts ignore_teleport=false without a viewing_side
...
It now issues a Lua warning, but then continues as if ignore_teleport=true had been passed.
2021-07-02 14:04:54 -04:00
Celtic Minstrel
695eb8356d
Lua API: Better error checking when converting a location set to a WML variable
2021-07-02 14:04:54 -04:00
Celtic Minstrel
c6f4e8db28
Lua API: Use string indexing here
2021-07-02 14:04:54 -04:00
Celtic Minstrel
d04bd2bf5d
Lua API: Add a named tuple idiom, used mainly for locations
...
This should fix the issue introduced in 5a9c24c4e79d624e34aa475949a4aa49b1984322
I also spotted a couple more cases missed in the prior commit.
2021-07-02 14:04:54 -04:00
Celtic Minstrel
0b309a0d6a
Lua API: Move wesnoth.as_text into core
...
This means it's now usable in map generation or plugin scripts.
2021-07-02 14:04:54 -04:00
Celtic Minstrel
c1304fb441
Lua: Add location_set.of_raw to ease working with AI functions that return raw location sets
2021-07-02 14:04:53 -04:00
Celtic Minstrel
9c2689ac9e
Lua AI: Move the deprecation messages to Lua so that the deprecated functions get nulled out with --strict-lua
2021-07-02 14:04:53 -04:00
Celtic Minstrel
dc180c7db0
Lua AI: The recalculate move map functions don't return anything so why do they claim to return 1 value!?
2021-07-02 14:04:53 -04:00
Steve Cotton
6c13d7f103
Fixup e555e0681db1e8
...
I think this is an MSVC bug, but revert the change from e555e0681db1e8 that isn't building on Windows.
2021-07-02 14:04:53 -04:00
Celtic Minstrel
e555e0681d
Fix a bunch of compiler warnings
...
- Some implicit conversions
- Loop variable is always copied
- Missing prototypes
- Unused lambda captures
- Comma operators
2021-07-01 01:33:28 -04:00
Celtic Minstrel
55c19e7675
Remove unused functions
2021-07-01 01:33:28 -04:00
Celtic Minstrel
5a9c24c4e7
Updated a few places that didn't handle locations in the unified way
2021-07-01 01:33:28 -04:00
Celtic Minstrel
e317fa4817
Lua AI: Fix bug in ai.get_attacks()
2021-07-01 01:33:28 -04:00
Alexander Lacson
9b7a287595
Alphabetically sort import statements and add comment explaining separation of import yaml
...
Sorting import statements was made easier and less error-prone using [isort](https://pypi.org/project/isort/ )
Make it clear that the `yaml` package is not part of Python's Standard Library and should be installed with a package manager as outlined in [this](https://pep8.org/#imports ) section of PEP8.
2021-06-30 18:18:58 +02:00
Gunter Labes
6cfcb5b937
Remove dead code
2021-06-30 15:58:36 +02:00
Gunter Labes
02585e5aff
Call actually existing function
...
Fixes 7b2ceb8.
2021-06-30 14:28:29 +02:00
Celtic Minstrel
3b556b3c4b
Improve a deprecation message
2021-06-29 09:35:15 -04:00
Celtic Minstrel
f01088d3fd
Return nil instead of an empty string when indexing beyond the string length
...
Fixes #5893
2021-06-29 09:33:37 -04:00
Celtic Minstrel
3c9639f603
Fix another deprecation message
2021-06-29 09:23:58 -04:00
Charles Dang
ee5e159ce4
Utils: decay both types passed to decayed_is_same
2021-06-28 16:49:09 -04:00
Charles Dang
84f71d1b71
GUI2: made static map const in decode_font_style
2021-06-28 16:47:32 -04:00
Charles Dang
fb35023814
GUI2: cleaned up and improved up bind_status_label implementation
...
- Used constexpr if instead of SFINAE for the default getter functions
- Added support for menu buttons in the default getter function
- Fixes potentially calling get_value_label on classes derived from integer_selector other than slider
(this function is a member of the slider class)
- Made value getters take a const reference (we don't want to be able to modify widgets here)
- Made value getters return a t_string (avoids conversion to std::string and set_label takes a t_string anyway)
2021-06-28 16:47:05 -04:00
Charles Dang
1d0b245504
Cleaned up about::get_campaign_credits usage
2021-06-28 16:41:56 -04:00
Charles Dang
da6a6f31d9
Merge pull request #5909 from stevecotton/load_hotkeys_in_main_thread
...
Fix an intermittent crash with keyboard input during the load screen
2021-06-28 10:25:29 -04:00
Pentarctagon
dbc7aee776
Remove 32-bit specific flag.
2021-06-28 09:13:11 -05:00
Pentarctagon
67d6e1b677
Add rc file to VS+cmake configuration.
2021-06-28 09:13:02 -05:00
Steve Cotton
fc0b764403
Fix an intermittent crash with keyboard input during the load screen
2021-06-28 16:08:14 +02:00
Celtic Minstrel
45625b0cf5
Fix some incorrect deprecation messages
2021-06-27 19:59:20 -04:00
Charles Dang
80b3809b9b
GUI2/Widget: used scoped enum for debug border states
2021-06-27 12:51:03 -04:00
Celtic Minstrel
9f96c4662b
Fix incorrect default in wesnoth.audio.play
2021-06-27 11:59:57 -04:00
Celtic Minstrel
ceacb9ecad
WC: Forgot to remove a testing thing
2021-06-27 11:51:48 -04:00
Celtic Minstrel
24cf433aaf
WC: Fix schema validation
...
When one attribute is dependent on another, apparently order matters.
2021-06-27 11:49:51 -04:00
Celtic Minstrel
cf9fbdd516
WC: Fix schema
...
When one attribute is dependent on another, apparently order matters.
2021-06-27 10:54:51 -04:00
Gunter Labes
6c9813af8e
Update deprecated path options
2021-06-27 11:11:19 +02:00
Nils Kneuper
d96ac0431a
updated Chinese (Traditional) translation
2021-06-27 11:09:33 +02:00
Celtic Minstrel
81b147bc51
WC: Update schema
2021-06-27 02:38:39 -04:00
Celtic Minstrel
315cebf0d9
WC: Fix missing commas
2021-06-27 01:34:07 -04:00