28766 Commits

Author SHA1 Message Date
Tommy
65f4c8cfe2 DM: Use global FLASH_LIGHTING effect in stead of local macro 2022-08-07 23:11:21 +12:00
Tommy
24e1da729d Tutorial: use FLASH_LIGHTNING rather than color_adjust 2022-08-07 23:11:21 +12:00
Tommy
2d37a13bb8 WML: Add macros for screen_fade, and modify FLASH to use it as well
New macros:
 * SCREEN_FADE_OUT - to replace FADE_TO_BLACK in most cases
 * SCREEN_FADE_IN - to replace FADE_IN in most cases
 * SCREEN_FADE r g b duration
   - convenience wrapper for [screen_fade] with 255 alpha
 * SCREEN_UNFADE duration
   - convenience wrapper for [screen_fade] with 0 alpha
 * FLASH r g b actionWML
   - like FLASH_WHITE etc but takes a colour
 * FLASH_LIGHTNING actionWML
   - flashes an appropriate colour and plays lightning.ogg

Modified macros:
 * FLASH_WHITE/RED/GREEN/BLUE}
   - these now use [screen_fade] not [color_adjust]
2022-08-07 23:11:21 +12:00
Alexander Lacson
34ff1117f7 [UtBS] In S6b, add a scroll to detonation event
When Jorgin dies, make the map scroll to the detonation event that occurs right after so that the player will clearly know what happened.
2022-08-07 14:11:29 +08:00
Alexander Lacson
14c17c3368 [UtBS] In S6b, add an "explosive charge failed" sound to event
Used the dwarvish thunderer miss sound as a sound effect that plays in an event where a dwarf lights an explosive charge but if fails to detonate.
2022-08-07 14:11:29 +08:00
Iris Morelle
532ec4e06f addon/client: Add modeless dialog for displaying add-on install progress
This implements an add-on extraction progress dialog that does not
actually run its own event loop, allowing the caller to take ownership
of it (display() static method) and update its state using a callback
function object. The object in question is passed into the add-ons
management API and used to update the dialog status each time an add-on
file is written to disk as part of the pack extraction process.

In order to avoid stalling the extraction process in UI code, the
callback is invoked for every single file, but the dialog's progress
update method places a time restriction on GUI2 API calls of 120
milliseconds -- this is a good throttle interval that allows add-ons to
be extracted in about the same amount of time as before while still
updating the progress bar smoothly enough for add-ons that take longer
than that.

(This is not the most trivial code to test, so it is suggested to add a
sleep/delay API call in unarchive_file() in src/addon/manager.cpp to
introduce artificial delays.)

One issue with this code, however, is that because modeless_dialog
doesn't execute its own event loop, the only way to get the dialog to be
updated is to force a draw event in ourselves via the new
gui2::dialogs::modeless_dialog::force_redraw() method. This is really a
side-effect of my design choice here to run the dialog in the middle of
a blocking operation instead of somewhere where events are being
processed normally. I'm not entirely sure if the draw events would be
pushed even in that case, however.

Closes #1101.
2022-08-06 15:11:41 -05:00
Pentarctagon
a5e7986b3e Updates for newer luacheck. 2022-08-06 03:03:17 -05:00
walodar
6eb2246eff
Colored attack type icons, resistances and movement costs. Reordered resistances. (#5264)
Using colors to make relevant information stand out at a quick glance.

The six attack type icons are recolored using the six equidistant hues cyan, green, yellow, red, magenta and blue, with the same saturation and lightness as the old icons. The images are optimized with woptipng.

Resistances and movement costs are colored using a gradient from red to green, like the defense values.

The resistance table in the help browser now also shows the attack type icons.

Previously, the resistance table was always ordered alphabetically by their original English names (not their translation, unlike the terrain modifiers). Now, the order is set to blade - pierce - impact - fire - cold - arcane.

These changes are made in all relevant areas, including the help browser, tooltips, the sidebar and dialogs.

Missing icons are handled by replacing them with a blank image scaled to the same size.
2022-08-01 17:57:46 -05:00
ancestral
efafebb1df Changed and added hotkeys (#3157)
Re-created hotkeys file.

Borrows heavily from https://r.wesnoth.org/t41525.

Most of the common commands now have single keystrokes on the keyboard in addition to their currently defined keystrokes. Almost everything remains the same, except the following has changed:

* Continue is now `C` instead of `T`
* Go to Leader is now `K` instead of `L`
* Kill Unit is now `DEL` instead of `X`
* Undo is now `Z` or `CTRL + Z` instead of `U`
* Redo is now `SHIFT + Z` or `CTRL + SHIFT + Z` instead of `R`
* Planning mode is now `ALT + P` instead of `P`
* Delete Action (Planning Mode) is now `BACKSPACE` instead of `H`
* Suppose Dead (Planning Mode) is now `X` instead of `I`
2022-08-01 14:59:39 -05:00
Wedge009
461fd5fff5 Replace deprecated wesnoth.fire_event with wesnoth.game_events.fire. 2022-07-30 16:32:31 +10:00
Celtic Minstrel
0f3d8388df Fix deprecation warning in [kill]
Fixes #6924
2022-07-29 23:37:36 -04:00
Tommy
64a5a7c20d Allow items in the test scenario to submerge when the map changes 2022-07-30 14:56:38 +12:00
Tommy
0418df9281 Modify most items in the map editor to submerge if placed on water
Many items where the effect does not make sense (or looks especially
bad) were passed over and will appear on top of water as previously.

This could use more definition by using submerge values other than
0 and 1 (numbers from 0.0 to ~2.5 work as it multiplies the base
unit submerge value) however there is a bug with blitting transparent
textures so it will not appear correct for the submerged part.
2022-07-30 14:56:38 +12:00
Tommy
36d43da21a Add new PLACE_IMAGE_SUBMERGED macro and use for HttT:04_BoP
It does the same thing as PLACE_IMAGE except the created item may
use the same submerge code as units. If not placed on water there
will be no submersion effect. If placed on water it will be submerged
to the same level a unit would be submerged to. In general physical
items placed into water should use this, whereas items placed on top
of water should use PLACE_IMAGE.

The new macro has been applied to the merfolk cages in the Bay of Pearls
scenario in HttT.
2022-07-30 14:56:38 +12:00
Tommy
b4119dce4a Change pickuppable item macros to create submergable items
This fixes #1146.
2022-07-30 14:56:38 +12:00
Tommy
3127178e17 Add a submerge value to items, to control submerge amount
It defaults to 0, which is no submersion.
2022-07-30 14:56:38 +12:00
Tahsin Jahin Khalid
6701542f63
[SoF] In S7, adjust wording to avoid awkward reuse of the word "doubt" 2022-07-30 03:23:32 +06:00
Tahsin Jahin Khalid
058949e848
NR: Give Hamel leadership to add consistency to plot 2022-07-30 01:34:09 +06:00
Alexander Lacson
2b2b70d2e1
[UTBS] Remove some fungus from S6 2022-07-30 03:12:33 +08:00
Alexander Lacson
c74f1e49c7 [SoF] In S7, edit a sentence to not use awkward reuse of the word "doubt"
Resolves #6773.
2022-07-30 02:33:05 +08:00
Alexander Lacson
b7c3a1cbb4 [UTBS[ Remove some fungus from S6
Resolves one of the subitems of #6197.
Rationale for this PR is in the Issue thread.
2022-07-28 17:28:49 +08:00
Alexander Lacson
c85f7241fc [UtBS] Add series of bat screeches in the Zochtanol Isle scenario
Resolves #6503.
2022-07-28 16:55:41 +08:00
Elvish_Hunter
1be1ba4282 Fixed {IS_HERO} to prevent loss of hero ellipse when leveling up 2022-07-27 16:18:06 +02:00
Celtic Minstrel
e08451517a Fixup some event deprecations
No functionality change, just documentation
2022-07-26 00:08:00 -04:00
Celtic Minstrel
26f977c9b2 PUA: Fix Lua error when a unit is recruited
Fixes #6897
2022-07-26 00:05:29 -04:00
Celtic Minstrel
53b6f892dc That just... doesn't even do anything... 2022-07-26 00:03:17 -04:00
doofus-01
a513a82e9f
1.17 (test scenario) out-of-hex unit animation tests (#6878)
* out-of-hex unit animation tests (id=anim_tester_ooh)
2022-07-24 20:22:47 -07:00
doofus-01
2327f5c81b
1.17 human magi sprite cleanup (#6906)
* fill semitransparent pixels

* sprite palette cleanup
2022-07-24 17:28:14 -07:00
doofus-01
8e6abab897
merfolk sprite palette cleanup (#6904) 2022-07-24 13:03:12 -07:00
doofus-01
e8d451bbd5
1.17 dwarf sprite cleanup (#6902)
* fill semitransparent pixels

* sprite palette cleanup
2022-07-23 21:30:49 -07:00
doofus-01
346e74697f
1.17 drake sprite cleanup (#6901)
* fill semitransparent pixels

* drake sprite palette cleanup
2022-07-23 18:33:14 -07:00
Discontinuum
6991fcf5a8 Fix the description of concealment
It affects all villages, water villages included
2022-07-21 18:21:15 +02:00
Pentarctagon
78764ccd58
1.17.6+dev 2022-07-19 19:31:18 -05:00
Pentarctagon
ab8fe65b83
1.17.6 2022-07-19 19:30:24 -05:00
Pentarctagon
765681335a
pot-update and regenerate doc files 2022-07-19 19:26:27 -05:00
Gunter Labes
1a49e91b0a
Schema: Use correct type 2022-07-19 15:35:18 +02:00
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