Commit graph

11471 commits

Author SHA1 Message Date
Celtic Minstrel
5a1e38e99b
Add wesnoth.sync module for the synchronization-related commands (#5862) 2021-06-19 15:39:10 -04:00
Celtic Minstrel
f145dc2bba Replace uses of the moved interface functions 2021-06-19 12:09:46 -05:00
Steve Cotton
264f90eed4 Default [print]duration= to 5 seconds, tutorial uses "unlimited"
In 1.14, the default was 50 frames, or around 1.7 seconds. In 1.15.4, commit
a9d9e48c72 changed the interpretation of that
number to milliseconds, but missed that this affected the [print] tag; this
left the default time that the text is shown as an unreadable 50ms.

All places in mainline that use [print] specify a duration, so the default
isn't used. Here I've plucked the new value from UtBS S09, where it was chosen
in f405b916a1.

The special value "unlimited" is now recognised as meaning to display the text
until it's removed by another [print] tag. The tutorial uses this special case
to display the text until the player does the requested move - originally it
displayed the text for 10000 frames (around 40 minutes), which still seemed
reasonable when it changed to 10000ms.
2021-06-19 07:08:17 +02:00
Celtic Minstrel
0c42cdc038
Enable translation mark validation by the schema (#5800)
- The t_string type is now a schema built-in type and no longer attempts a regex match.
- You can also specify that non-t_string types may be optionally-translatable; this case supports a regex match on the string (but note that the translation mark is not part of the match).
- Error messages involving keys with very large values ( > 128 characters) will now truncate the value.
- To account for occasional cases where the schema is intentionally violated, the --validate command-line option now automatically defines the SCHEMA_VALIDATION preprocessor define.

A key validates as type t_string if one of the following is true:
- The key is not present
- The key has at least one segment with a translation mark
- The key is blank (an empty string)

Any type other than t_string is not allowed to be translatable by default, unless you specify allow_translatable=yes in the [type] tag.

An optionally-translatable string could also be defined as a union of t_string and some other type.
2021-06-14 23:59:52 -04:00
Steve Cotton
08b65b2bd7 Tutorial S02 and tips: Mention holding shift for accelerated speed
One of these uses bold for the menu's name, the other uses italic, because that
seems more consistent with the other hints in the same context.

Re-attach the comment about upkeep to the correct [event], and move the comment
about the easter-egg event to the start of its [event].
2021-06-14 09:57:26 +02:00
doofus-01
4811de8642
Last minute Naga things (#5855)
* move UtBS mace nagas to core

* adding mace naga portraits from LordBob

* move naga hunter portrait to UtBS from core

* de-bow-ify the ophidian nagas and add Deflect weapon special

* revisions to mace nagas base sprites

* revisions to naga guards, including new weapon special Absorb

* compatibility Nagas for UtBS
2021-06-13 20:51:38 -07:00
doofus-01
eed1fe6073
SoF - final scenarios (#5835)
* some revisions to final two scenarios

* update the credits

* add cave and red wyrms (dragon-ish bat replacements)
2021-06-06 20:58:12 -07:00
Gunter Labes
9ccbf9989c
Fix malin_resist AMLA 2021-06-05 20:43:07 +02:00
Gunter Labes
0b2b15c326
Simplify WML a little 2021-06-05 20:43:07 +02:00
nemaara
c687e31701 DiD: fix bad variable names 2021-06-02 02:24:04 -04:00
Steve Cotton
0fdf52058b Support [movetype][special_note] and [language]special_note_damage_type_*
Refactor special notes for abilities, attack types, movetypes and weapon specials

An easier way of setting special notes in the most common use-cases. Text given
in the following attributes will be collected and added to the special notes
for units and unit types (some of these were added in the previous commit):

* [ability tag name]special_note=
* [language]special_note_damage_type_TYPE=
* [movetype][special_note]note=
* [attack][specials][special tag name]special_note=

It's no longer necessary to put these notes in each unit_type's .cfg file, and
the macros for doing so are now deprecated.

C++ changes
-----

Simplify both unit_type::special_notes and unit::unit_special_notes. Add
utils::stable_unique, similar to std::unique but accepts non-ordered input and
preserves the order in the output.

Remove unit_type::has_special_notes() - callers can instead call
special_notes() and then check if the returned vector is empty, which removes
the need for duplicating code in unit_type.

Trade-off: the new [language]special_note_damage_type_TYPE is likely deprecated in 1.19.
-----

Adding [language]special_note_damage_type_TYPE= uses the same existing design
as [language]type_TYPE=, however both are hacks that don't fit the general
style of WML. It could be better to define a new [damage_type] tag that
supercedes both and also provides a place for specifying the damage icon;
however that won't be done in time for the API freeze for 1.16.

Doing it in the way that this commit does it is a hack, but it's one where
replacing it with the better solution in 1.18 will affect very few UMCs (only
those that define additional damage types). Even in the UMCs that would be
affected, it would likely only be a few changes in a single central file.

Trade-off: NOTE_DEFENSE_CAP is not auto-added
-----

It might be better to auto-add NOTE_DEFENSE_CAP when movetype.cpp detects that
the type has capped values. However as NOTE_SPIRIT already requires
[movetype][special_note], it's simple to use the same mechanism. If we decide
to change it to being auto-added, the current commit greatly reduces the number
of places that would need to change again, as it's now in the [movetype]
instead of the many [unit_type]s using that movetype.
2021-06-01 14:29:57 +02:00
Celtic Minstrel
3568b5ff66 An easier way of setting special notes in the most common use-case (abilities and weapon specials)
Rebased version of e6c58fc35c, with merge conflicts resolved.
2021-06-01 14:29:57 +02:00
Steve Cotton
c1cbc53353 AToTB S02: The necromancer is leaving, not waiting for reinforcements
Also change a line from the elves, so that it changes from sympathy to defense
instead of a sudden swing from sympathy to aggression.
2021-05-30 15:02:20 +02:00
Gunter Labes
c94bfcf117
Typo fix 2021-05-29 23:18:59 +02:00
newfrenchy83
8cac6af25a replace deprecated special= by special_id/type in Utbs and scenario-test 2021-05-26 18:30:06 -05:00
Iris Morelle
affb15fbac freenode suffered a horrible accident, we're moving to Libera.Chat
The problem is that right now Libera.Chat does not have a web chat
interface, and no guarantee as to what its URLs are gonna be like
; although staff have said they're probably gonna stick to the same stack
as before so we might end up with very similar looking URLs.

For the time being, we have to get rid of the webchat URLs. They will be
missed a bit. Maybe.

Before anybody asks, yes, I am aware of the po comments in German
translation catalogues including a freenode IRC protocol URL. If I do
anything about it now, somebody will helpfully revert my changes during
a message catalogue merge (it happened some time ago). So, not touching
those until release time.

Also nobody cares about Travis anymore. It's dead cruft, just leave it
alone. (What on earth is that massive base64 string anyway?)

CC #5797
2021-05-21 05:20:44 -04:00
doofus-01
ca334be4fd
SotA - update walking corpses to mesh with mainline (#5791) 2021-05-16 15:11:46 -07:00
Celtic Minstrel
ccb9f4f0e9 Update mainline uses of have_file and read_file 2021-05-11 14:52:21 -04:00
Celtic Minstrel
bf746a0207 Update mainline content to use the wesnoth.scenario module 2021-05-11 14:52:21 -04:00
Celtic Minstrel
1410b5cef9 Allow accessing variables through the new APIs in the mapgen kernel
This also reverses the deprecation of wml.tovconfig and friends in the mapgen kernel.
2021-05-11 14:52:20 -04:00
Celtic Minstrel
05b0b7a1df Update uses of wesnoth.fire 2021-05-11 14:52:20 -04:00
Celtic Minstrel
e8381ea9da Update uses of eval_conditional 2021-05-11 14:52:20 -04:00
Celtic Minstrel
1205e3fd25 Move the Lua global variable helpers from WC to a new "experimental" module 2021-05-11 14:52:19 -04:00
Celtic Minstrel
6e9826cfcd Update mainline content to use the wesnoth.audio module 2021-05-11 14:52:18 -04:00
Celtic Minstrel
1dccc3ad76 Update mainline content to use the mathx module 2021-05-08 17:20:49 -04:00
Celtic Minstrel
1fc31c23d0 Replace all uses of get_time_stamp -> ms_since_init 2021-05-08 17:20:49 -04:00
newfrenchy83
ad95696b4a Fix teaching_anim not implmmented in variation_id=sceptre of Httt Princes and Battle Princess
I have forget to pull this in variation scpeter of unit_type
2021-05-02 19:40:48 -05:00
Tahsin Jahin Khalid
0547941b13 [world conquest] Restored 2 instances of wml.parsed
1. removed the "cfg = cfg" thing
2. restored 2 instances of wml.parsed()

As for the wml.parsed() in line 74 of effects.lua, I chose to not re-add it as it causes an error.
2021-05-02 17:06:26 -05:00
Tahsin Jahin Khalid
45d7372e69 [world conquest] fix remaining deprecated code usage
1. Fixed an un-added entry in the changelog
2. fixed the last 2 deprecation messages
3. removed instances of `wml.parsed` as it is no longer required.
2021-05-02 17:06:26 -05:00
nemaara
9e4c770553 HttT: date fix again 2021-04-26 20:58:45 -04:00
nemaara
ac9f6da122 HttT: fix bad time references (fixes #5740) 2021-04-26 02:20:12 -04:00
Gunter Labes
70e2e7f4a6
Add missing closing parenthesis 2021-04-25 21:45:53 +02:00
Steve Cotton
93cd645205 UtBS: Use $amount instead of %d in the teaching ability
Part of #4436
2021-04-23 09:57:12 +02:00
Tahsin Jahin Khalid
0700434acb
[WC] Fix deprecated code usage and enable Dunefolk (#5727)
Fixes #5545 
Addresses #5650
2021-04-22 13:43:38 -04:00
newfrenchy83
73a76a1644
fix text don't readable because duration not specified (#5725)
HttT S23: fix floating text duration
2021-04-21 15:38:38 -04:00
nemaara
1b0d63f305
Liberty S7: date fix 2021-04-19 15:17:21 -04:00
nemaara
3e54971d92 DiD: buff malin again 2021-04-15 04:16:49 -04:00
nemaara
0cca370ff5 DiD: buff Malin 2021-04-15 04:15:42 -04:00
nemaara
b8c5baaab3 TRoW: rebalance fix 2021-04-15 04:11:18 -04:00
Eric Gallager
06798cfda1
Edit "The Rise of Wesnoth" difficulty (#5603)
TRoW: edit difficulty
2021-04-15 03:58:42 -04:00
Celtic Minstrel
89778ca26f WC: Change the invest dialog title to be more descriptive
I doubt anyone who hasn't played before will guess what "Invest" means.
2021-04-02 11:38:39 -04:00
Pentarctagon
ea46abf5b0
Run wmlindent. 2021-03-31 13:46:12 -05:00
Celtic Minstrel
726b5458f9 SotA: Convert zombie recruit dialog to WML 2021-03-31 14:02:29 -04:00
Pentarctagon
852938519a
Run wmlindent. 2021-03-31 10:29:10 -05:00
Celtic Minstrel
cc12e342a0 tutorial: Convert character dialog to WML 2021-03-31 09:43:48 -04:00
Celtic Minstrel
7defa434e8 WC: Convert the remaining dialogs to WML
- Pickup confirmation
- Got unit from invest
- Settings for map editor
2021-03-31 09:29:20 -04:00
Celtic Minstrel
1af920669c WC: Make that macro uppercase as per style guidelines 2021-03-31 02:17:23 -04:00
Celtic Minstrel
63aad7453c WC: Convert the help dialog to WML 2021-03-31 02:05:55 -04:00
Celtic Minstrel
a51271670c WC: Convert invest dialog to WML 2021-03-31 01:27:06 -04:00
Celtic Minstrel
ea2d74580f WC: Fix invest dialog 2021-03-31 00:45:14 -04:00