28628 Commits

Author SHA1 Message Date
Gunter Labes
7c021b73cb
Schema: Add missing modify_unit_type keys 2022-07-19 15:22:36 +02:00
Steve Cotton
2e28ed4617 Schema: the [fire_event][data] tag is optional
Fixup for 715cf386.
2022-07-19 13:09:29 +02:00
Celtic Minstrel
715cf3864e Add missing tag in the schema 2022-07-19 02:10:02 -04:00
Celtic Minstrel
7e234f8833 Replace deprecated usages of on_event() 2022-07-18 21:56:42 -04:00
Celtic Minstrel
5a184bbb40 Split wesnoth.game_events.add into multiple functions
Basically this means each of the call modes of the old function is now a separate function.

- add_repeating and add_menu take an ID and a function
- add_wml takes variable substitution setting and a config
- add takes the full options table
2022-07-18 21:56:42 -04:00
Celtic Minstrel
42889232ea Update schema for the new [event] options 2022-07-18 21:56:42 -04:00
Celtic Minstrel
19c62a083e Update [remove_event] to use new API 2022-07-18 21:56:42 -04:00
Celtic Minstrel
8a72206f02 Unit tests for the new filter options 2022-07-18 21:56:42 -04:00
Celtic Minstrel
245cd57d24 Unit tests for each way of assigning an action to an event handler 2022-07-18 21:56:42 -04:00
Celtic Minstrel
8aa2ee74a2 Move the event firing functions to wesnoth.game_events
* These functions take the full event data config as the final argument, rather than just the weapon info subconfigs.
* The [fire_event] tag now supports a [data] tag that can add additional data to the event, for example damage_inflicted. The [primary_attack]  and [secondary_attack] tags are still supported and are not deprecated.
* wesnoth.current.event_context now has a data child which holds the full event data. It still duplicates common info (weapons and damage inflicted) in the same way as before.
2022-07-18 21:56:42 -04:00
Celtic Minstrel
8cd1332630 Enable setting an arbitrary Lua function as an event handler.
Unlike the old wesnoth.game_events.on_event hook and the "convenient" on_event() wrapper for it, this new functionality supports all of the features of WML events, with the sole exception of serialization, since it's not possible to reliably serialize a Lua function.

This commit also divorces menu items from the event that they trigger. The undocumented wesnoth.interface.set_menu_item function no longer adds an event for the menu item; the caller needs to separately register an event using the new functionality.
2022-07-18 21:56:42 -04:00
doofus-01
58403574d5
ghost sprite updates (#6881)
* base image for ghost that is not part of standing anim

* nightgaunt animations
2022-07-17 14:13:28 -07:00
Steve Cotton
f2ef939352 Fix whitespace 2022-07-16 18:32:03 +02:00
Pentarctagon
265d3972da
Well clearly this doesn't do anything... 2022-07-16 09:59:55 -05:00
Descacharrado
91983c8c87 TSG S4 Fixed replay OOS on victory event 2022-07-15 11:52:36 -05:00
Tommy
8144c06389
Add new [screen_fade] WML action (#6864)
* Add new [screen_fade] WML action

It takes (for now) the arguments:
 * red, green, blue = values between 0 and 255
 * alpha = value between 0 and 255
 * duration = time in ms over which to fade

The game display is faded to the given colour over the duration.
It will be left with an overlay of that colour and alpha until
a screen_fade to 0 alpha is performed.
2022-07-15 09:32:19 -04:00
Tommy
90224728c1 Fix "def" label width in default theme
Fixes #6872
2022-07-15 13:38:51 +12:00
Tommy
26ae5a6fb0 Make blue fires in test scenario more obviously blue 2022-07-13 16:33:09 +12:00
Tommy
fd8068ddc9 Remove comment about fire animation in test scenario
This method of item animation is unsupported. Ref GH#1219
2022-07-13 16:32:25 +12:00
Wedge009
a6c57d014d Test scenario: Use progressive syntax for fire animation
[ci skip]
2022-07-13 13:11:00 +10:00
mattsc
2424d5705f Micro AI CAs: add handle_user_interact calls 2022-07-12 22:57:16 -04:00
mattsc
c7b3393a9d ai_helper: add handle_user_interact calls 2022-07-12 22:57:16 -04:00
mattsc
b1b521f582 Lua AI CAs: add handle_user_interact calls
Insert these calls in loops that do expensive calculations for the CAs of the default and experimental AIs.
2022-07-12 22:57:16 -04:00
doofus-01
be14c5ab35
1.17 Loyalist sprite updates (#6803)
* update swordsman sprite and anims

* update royal guard sprite and anims

* update pikeman sprite and anims

* update lieutenant sprite and anims

* update sergeant sprite and anims

* update halberdier sprite and anims
2022-07-10 18:03:11 -07:00
doofus-01
09fe5a19fd
Adding Amorphous to credits
for the swordsman attack animation.
2022-07-10 17:12:13 -07:00
mattsc
6ed684af73 move-to-any-enemy CA: stop eval if no enemies
Otherwise there is an error caused by one of the sort functions later in the code.
2022-07-03 06:48:47 -07:00
Luis Miguel Iglesias Sánchez
65515848ef
Fixed replay OOS by moving victory event to synced event (#6676) 2022-07-03 01:02:36 -05:00
Descacharrado
21e22fad97 Fixed Warden’s and Arbiter’s animations popping on water tiles 2022-07-02 16:39:18 -05:00
mattsc
90f1c01f41 AI: improve efficiency of move-to-any-enemy CA
The new method avoids a lot of path finding that the previous method did, esp. on large maps with many units and/or enemies, leading to significant speed improvements in some cases.

This fixes #6504
2022-07-01 18:56:00 -07:00
Pentarctagon
08cc17ac1a Put this in the right textdomain. 2022-07-01 10:21:39 -05:00
Pentarctagon
e3fbf930f3 Whitespace fixup. 2022-07-01 10:21:39 -05:00
Pentarctagon
536eaa67b4 Move hero string macro text into their definitions. 2022-07-01 10:21:39 -05:00
Pentarctagon
b15c3420d3 Remove silly GUI macro. 2022-07-01 10:21:39 -05:00
Pentarctagon
0ca5a97d1f Move mainline string macro text into various definitions. 2022-07-01 10:21:39 -05:00
Pentarctagon
d7fa23abc5 Move effect string macro text into various definitions. 2022-07-01 10:21:39 -05:00
Pentarctagon
df99280274 Move artifact string macro text into artifact definitions. 2022-07-01 10:21:39 -05:00
Pentarctagon
3eb75b3e48 Remove some training.cfg one-liner macros. 2022-07-01 10:21:39 -05:00
Pentarctagon
875c6e0cf1 Remove WORLD_CONQUEST_II_CAMPAIGN_RESOURCE from its own file. 2022-07-01 10:21:39 -05:00
Pentarctagon
159396fdc0 Remove one-liner macros used once within the same file. 2022-07-01 10:21:39 -05:00
Pentarctagon
d472e2acb0 Remove factions/random.cfg and its macro. 2022-07-01 10:21:39 -05:00
Pentarctagon
ff5f795663 Remove factions/strings.cfg and related macros.. 2022-07-01 10:21:39 -05:00
Pentarctagon
0b6eb2a6e0 Remove config.cfg and era-related single use macros. 2022-07-01 10:21:39 -05:00
Tahsin Jahin Khalid
4252fad434
Update Death Squire and Bone Knight units (#6820)
* Death Squire, Bone Knight: rename files
* Bone Knight, Death Squire, Skeleton Rider: attack icon change
* Bone Knight: stats adjust
2022-07-01 02:41:03 -04:00
Astrid Halberkamp
4878c3565e
Add the Skeleton Rider line and Death Squire to core (#6088) 2022-06-30 23:34:17 -04:00
Tommy
613f047c1e Remove hex_brightening config option
It is not used, and appears to have been unused for a long time.
It was related to mouseover hex brightening, but the brightening
amount is hardcoded. There were associated hex_semi_brightening,
mouseover_image and selected_image keys, but that info is also
hardcoded, and those keys appear to have been removed already.
2022-07-01 15:06:25 +12:00
Celtic Minstrel
9ade435cd4
Remove WC's custom Pick Your Advancements mod (#6807) 2022-06-29 19:29:04 -04:00
Pentarctagon
1244639dc7
Fix whitespace. 2022-06-28 23:34:27 -05:00
Celtic Minstrel
a089c6e5ea Deprecate {AI_CA_POISONING}
This was already effectively deprecated by proxy due to the overall deprecation of FormulaAI.
So this just adds a message.
2022-06-28 23:07:50 -04:00
mattsc
38978feadd Schema: allow key values to be variables 2022-06-28 09:47:11 -05:00
mattsc
6fcca95be0 Schema: Add missing path key to [textdomain] 2022-06-28 09:47:11 -05:00