75889 Commits

Author SHA1 Message Date
Jyrki Vesterinen
cba53cd471 Disable attempting to change floating point precision in 64-bit MSVC builds
It's not supported and causes an assertion failure on startup.
2019-12-02 19:43:33 +02:00
Earth-Cake
1e19cd5d23 Bug fix
Fix a bug regarding enemy leader leaving starting position and going with his soldiers.
2019-12-02 07:19:09 -06:00
Celtic Minstrel
732b7942bb Replace all references to deprecated functions in the helper module
(and remove the require if this meant it was no longer used)
2019-12-02 01:10:34 -05:00
Celtic Minstrel
74e004c265 Use a location set in the implementation of the item functions and WML tags 2019-12-01 22:30:31 -05:00
Celtic Minstrel
4b9f5d4485 Extend the location_set module to support set operators, custom index operators, and a tostring metamethod
Also adds set difference and symmetric difference functions, and a clone function.
2019-12-01 22:29:49 -05:00
Celtic Minstrel
9da5d4adfd fixup! Declare wesnoth.interface.remove_overlay directly instead of declaring it local and then assigning it
Missed updating the deprecation line and used the wrong new name
2019-12-01 21:50:56 -05:00
gfgtdf
f40a51c3ef remove ai advancement parameter from attack_and_advance
celmin confirmed that it is no longer needed
2019-12-02 03:41:32 +01:00
gfgtdf
7ddf61f08a don't abort advancement on invalid advancement index
this would in theory give the player
the option to postpone a unit
advancement by selecting an invalid
advancement index. Now we just use the
first advancement in case of an invalid
advancement index.
2019-12-02 03:41:32 +01:00
gfgtdf
b67579a030 ai unit advancement improvements
1) use ai unit advancement asepect also
   during [event]s fixes #4605

previously advancements of ai units
invoked by [event]s for example by
unstoring a unit with enough xp would
always do a purely random advancement even if
it happend during the ais own turn. Now the
advancemt_aspect is considered. I don't really
know how the code inside ai/ works so i just
took the easiert way to get a advancements_aspect
from the manager. In particular this leaves a
TODO comment about whether the advancemnts_aspect
of advance_unit_at (and thus of
attack_and_advance) can not be removed or not
because i don't know whether the advancement
aspect is effectively a singleton (per side)
or not.

2) support amlas in ai units_advancement_aspect
2019-12-02 03:41:32 +01:00
pentarctagon
f3ed41d728
Remove schema validation for AOI. 2019-12-01 20:06:48 -06:00
nemaara
73f2429041 Remove left over wesnoth-aoi translation things 2019-12-01 20:33:07 -05:00
Celtic Minstrel
57bb4224b0 Declare wesnoth.interface.remove_overlay directly instead of declaring it local and then assigning it 2019-12-01 20:25:47 -05:00
Celtic Minstrel
aa5ac6af29 Add stringx module that exposes Wesnoth's split/join functions to Lua
The built-in string module is set as the metatable index for the stringx module, and the stringx module is set as the metatable index for strings, meaning all string and stringx methods are available through (''):method_name.

This also enables direct indexing of strings to get individual characters (ie ('str')[1] and the like), which package.lua already assumed even though it didn't work. Negative indices are supported to, and index from the end of the srring.

New functions:
- stringx.split
- stringx.parenthetical_split
- stringx.map_split
- stringx.escaped_split
- stringx.quoted_split
- stringx.anim_split
- stringx.join
- stringx.join_map
2019-12-01 20:25:13 -05:00
Celtic Minstrel
86f66a5825 Lua: Add a few more useful functions to the WML module and make WML table conversion a little more robust
- New functions: wml.find_child, wml.attribute_count, wml.equal, wml.valid
- When converting a Lua table to WML, the engine will no longer accept invalid attributes
- Use of wml.tovconfig in plugin or map generation scripts is deprecated (it already doesn't quite work properly in those contexts but still could've been used as a way to test a table's validity as WML)
2019-12-01 20:25:13 -05:00
nemaara
680e7741ff AOI: remove translations folder 2019-12-02 11:47:50 +11:00
nemaara
dcc96cf0fa DiD: change Lord Karres to Lady Karae and use portrait from AOI 2019-12-02 11:47:50 +11:00
nemaara
66237089a3 TSG: move and use portraits from AOI 2019-12-02 11:47:50 +11:00
nemaara
c71701ea60 Add AOI removal to changelog 2019-12-02 11:47:50 +11:00
nemaara
666f3a2c78 AOI: remove from mainline 2019-12-02 11:47:50 +11:00
nemaara
1f73bcbc47
Merge pull request #4613 from walodar/master
Fix: Dune Alchemist used Dune Apothecary image in both attack animations
2019-12-01 11:39:12 -05:00
walodar
f48c3b62b4 Fix: Dune Alchemist used Dune Apothecary image in both attack animations 2019-12-01 12:38:52 +01:00
Steve Cotton
eb7f3674dc
Port run_wml_tests to Python and add batch support (part of #4535) (#4603)
The verbosity settings are a bit different, but other than that it
should be a drop-in replacement for the old shell script.

Wesnoth's --validcache option isn't used any more, which is part of
the cleanup for #4587 (it didn't speed anything up, because all of
the calculation for the checksum was still done).
2019-12-01 08:25:10 +01:00
gfgtdf
95739dc93b
add bug label to bug template 2019-11-30 02:42:20 +01:00
newfrenchy83
632bb80ba6 Update tests.cbp 2019-11-29 16:28:53 -06:00
newfrenchy83
bfa8bbf889 add tests projectfile to codeblock workspace 2019-11-29 16:28:53 -06:00
Celtic Minstrel
5a27cd5b1b Also correct the dperecation message regarding the previous commit
[ci skip]
2019-11-29 00:36:47 -05:00
Celtic Minstrel
c7e84f487c Correct old names for some deprecated (renamed) unit functions
Fixes #4608
2019-11-29 00:33:36 -05:00
doofus-01
107b9af282
Some dunefolk sprite updates (#4573)
* some dunefolk sprite updates

* some revisions to updates

* revise lvl1 naga sprite to look less like existing fighter

* some more sprite revisions

* some base-frame edits and partial path reorganization

* revised firetrooper base-frame

* little pilot flame for firetrooper torch standing anim

* dunefolk sunderer line base sprites

* finish dunefolk sprite directory reorg
2019-11-28 07:30:59 -08:00
pentarctagon
acb2dd8226
Install python3 for the WML unit tests. 2019-11-28 00:55:04 -06:00
pentarctagon
53e92feedf
Fix team names to match the description of allowing FFA. 2019-11-27 21:32:31 -06:00
sigurdfdragon
6c999dea00 WoV: Update to match the 1.0.5 version on the 1.14 add-on server
Changes:
Make objective notes in S05, 06, 07, & 11 more blunt
S02: Slightly improve dialog
S04: Capitalization fix
S05: Dialog tweak for possible addition of nagas with ranged attack
S09: Improve flow of victory dialog
S09: Change gameplay and difficulty to eliminate tomato surprise
S11: Bump up turn limit
S12: Have saurian elders under player control
S12: Fine-turn enemy recruitment for slightly more clasher line units
2019-11-27 22:25:36 -05:00
newfrenchy83
fa7e5c2dfe fix test projectfiles 2019-11-28 04:53:52 +11:00
Celtic Minstrel
1c6d1ddfa8 Attempt to fix Travis failure 2019-11-26 23:40:47 -05:00
Celtic Minstrel
5b7383cdf2 Fix ai.aspects.avoid always returning an empty table 2019-11-26 23:40:30 -05:00
Celtic Minstrel
cfd23bd850 Fix string AI assets being truncated if they contain spaces 2019-11-26 23:22:06 -05:00
Steve Cotton
63ebe48d64
Select the correct item in a filtered and sorted generator (#4585)
In the load-game dialog, this makes deleting a file select the next
visible game save, thus it fixes #4125.

Credit and many thanks to DisherProject for the inspiration and hard
work of debugging where to fix this.
2019-11-25 18:48:47 +01:00
Steve Cotton
e50fd80d53
Convert some fail-on-success unit tests to pass-on-success (#4597) 2019-11-25 14:28:03 +01:00
Iris Morelle
3fb3decdb0 Drop addon_info.order
Nothing uses it anymore, and the reason for its existence isn't valid
anymore either since we get first upload ts from the server.
2019-11-24 23:59:00 -03:00
Nils Kneuper
00c1f03406 updated Portuguese (Brazil) translation 2019-11-24 12:28:34 +01:00
nemaara
c1638915b4 DiD S3: add another easter egg 2019-11-24 01:56:50 -05:00
Celtic Minstrel
b7a358c4af Fix a typo 2019-11-23 15:25:06 -05:00
Celtic Minstrel
859ab37254 Lua: Fix deprecate_api changing the behaviour of tables with an __index metamethod 2019-11-23 14:44:25 -05:00
Celtic Minstrel
3734bce276 Lua: Replace uses of deprecated (moved) sides functions 2019-11-23 14:41:03 -05:00
Celtic Minstrel
930e39422a Lua side proxy now has starting_location member (replaces wesnoth.get_starting_location()) 2019-11-23 14:37:41 -05:00
Celtic Minstrel
81ee0f0349 Make AI aspect handling in Lua more robust
There should never again be a bug where aspects of one type return nil instead of their value.

If support for a new type isn't explicitly added either in lua_object or in impl_ai_aspect_get, it'll raise a runtime error instead of returning nil.
2019-11-23 14:15:30 -05:00
Celtic Minstrel
7fb2c86c3b Add alternate mode of access to WFL map (currently only in FormulaAI)
This also hides the map's terrain from the string conversion.
2019-11-23 01:04:27 -05:00
Celtic Minstrel
153680400d Unify the Lua and WFL interfaces to the movement type
See changelog for details.
2019-11-23 00:59:36 -05:00
Celtic Minstrel
0ecae9de17 Fix ai.aspects table not containing string aspects 2019-11-22 23:10:16 -05:00
Steve Cotton
63bb076b97
Support running multiple expected-to-pass unit tests (#4582)
This allows batching all of the tests that are expected to return status zero,
which is currently 161 tests, and running the batch with a single instance of
Wesnoth.  It doesn't include the changes to the run_wml_tests script to use
this new feature.

Timing on my PC:
* 4 seconds to run a single test on a debug build
* 90 seconds to run the whole batch of 161 on a debug build
* 1.2 seconds to run a single test on a release build
* 31.2 seconds to run the whole batch of 161 on a release build
2019-11-22 23:14:53 +01:00
jostephd
4b3a7c0800
core.lua: Link to #4584 in a comment near the new warning 2019-11-22 19:19:53 +00:00