Commit graph

2674 commits

Author SHA1 Message Date
Elvish_Hunter
5eadebeb3a wmllint: added four tags to the allowed children of [if]
They are [true], [false], [found_item] and [proceed_to_next_scenario]
2020-12-06 11:23:12 +01:00
Elvish_Hunter
7babdf3cec wmllint: added [elseif] and [wml_message] to the tags allowed inside [part] 2020-12-06 11:23:12 +01:00
Elvish_Hunter
351f7cafcc wmllint: added support for custom conditional tags with magic comments 2020-12-05 11:03:40 +01:00
Elvish_Hunter
785bd018e6 wmllint: prevent a crash if CLEAR_VARIABLE and its arguments aren't on the same line 2020-12-03 21:33:49 +01:00
Elvish_Hunter
845887dfa6 wmllint: prevent a crash if an [attack] tag without the corresponding [/attack] is found 2020-12-03 21:12:21 +01:00
Elvish_Hunter
a5207027fe wmllint: don't quit when finding a mask= key not referencing a .mask file
Fixes #5324
2020-12-03 21:01:15 +01:00
Elvish_Hunter
5e4ba6c01b wmllint: fix a crash if advances_to= is placed before id= in [unit_type]
This was supposed to be a part of the fix for #4102, but for some reason it never got committed.
2020-12-03 20:55:12 +01:00
Celtic Minstrel
ef14581956 Remove make targets for the old and obsolete wmlvalidator
This validator was already removed in another commit, so there's no point in these targets existing.
2020-11-29 12:53:54 -05:00
Elvish_Hunter
4be3eb580a wmlscope: never consider macro definitions as part of the file docstring 2020-11-22 10:59:02 +01:00
Elvish_Hunter
4cf440e729 wmlscope: remove 'endarg' strings from HTML output 2020-11-19 11:49:39 +01:00
Elvish_Hunter
b39ca0e548 wmlscope: report optional macro arguments in HTML output 2020-11-19 11:46:55 +01:00
Elvish_Hunter
8c3ca97287 wmlscope: also report macros without documentation in HTML output 2020-11-19 11:44:52 +01:00
Elvish_Hunter
d51d389801 wmlscope: report about deprecated macros in HTML reference 2020-11-19 11:35:04 +01:00
Eric Gallager
3d27278296 update gitignores 2020-11-08 23:41:21 -05:00
gfgtdf
e822e22b2f wmlindent: don't indent #'#deprecated' 2020-10-19 23:53:52 +02:00
gfgtdf
ae9b533925 wmlindent: don't indent if #endarg is on the same line
this might change behaviour of the arg value
2020-10-19 23:53:52 +02:00
gfgtdf
2f234a8823 add data/schema to wmlindent ignore
until we decided what to do with it
2020-10-19 23:53:52 +02:00
Gunter Labes
6e60db597d
Use __WMLUNITS__ define for all parse calls
Enables workarounds for wmlunits in core unit files.
2020-08-16 22:43:14 +02:00
Steve Cotton
935fa41379
Final part of the Python 2 removal, including updating install-pytools (#5027)
Update the list of files installed by "scons install-pytools", dropping Python2
versions and adding their Python3 replacements. This doesn't update any
`import` statements, as the tools have already been ported to use the Python3
modules - the scons script was out of date and was still bundling the wrong
versions.

Note for anyone looking at the history - although most of the current
tools have a '3' in the name just to indicate that they're the Python 3 version,
there's a double-meaning to that number in wmlparser3.py's name. There was a
`wmlparser2.py`, where the `2` indicates a redesign of the original.

The data/tools/README.md file was renamed from plain README without being
converted to Markdown format. This commit touches about half of that file;
headings in that half are updated to be Markdown, but to reduce the diff the
other headings aren't updated.
2020-08-05 21:56:12 +02:00
Steve Cotton
ebbd9c5dfa
Remove the python2 rmtrans tool (#5014)
It seems unused, as there's:

 * Wiki: no mention of rmtrans
 * main Git repo: only the brief paragraph in the tools readme
 * resources repo: no mention of it
 * forums: only as part of a general list of Python files
 * Github issues and PRs: only as part of a general list of Python files

FWIW, I think it's already possible to do with Gimp's default tools ("Colors",
"Curves ...", select channel "Alpha", select curve type "Freehand", click in
the bottom-left of the box and sweep down, then to the left edge of the box,
then as far right as required).
2020-07-30 22:19:52 +02:00
Iris Morelle
9fa0536eaa wmllint: Recognize [remove_time_area]
Fixes issues with wmllint emitting spurious warnings about unit ids when
encountering time area ids in [remove_time_area].

[ci skip]
2020-07-25 04:05:49 -04:00
Elvish_Hunter
76b155f940 wmllint: implemented a better handling of amendment tags
This should solve some 'unknown ... referred to by id' warnings that might happen when using certain amendment tags.
2020-07-10 22:42:10 +02:00
Elvish_Hunter
a364dfd669 wmllint: recognize amendment tags to avoid a crash
In certain situations, the 'directly_in_event' list was allowed to become empty and cause a crahs because the code was unable to handle amendment tags.
2020-06-22 10:53:30 +02:00
Elvish_Hunter
b97d2e6a5e wmllint: implemented warnings about [advancefrom] -> [modify_unit_type] and extra_defines 2020-04-19 20:49:18 +02:00
Earth-Cake
23cb2eecf7 Remove WoV from wmlling and schema_validation 2020-02-04 18:05:59 -06:00
Elvish_Hunter
bff0611411 wmllint: allow multiple abilites for the same special note and handle some special cases
The notes handled as special cases are {NOTE_ARCANE}, {NOTE_SPIRIT} and {NOTE_DEFENSE_CAP}.
Fixes #4379
2020-01-27 20:42:22 +01:00
Elvish_Hunter
ada19250f7 wesnoth_addon_manager: do not generate packet.dump files any more
Fixes #4651
2020-01-13 17:29:12 +01:00
Severin Glöckner
15cd351c6b wmllint: better migration path for old id
[ci skip]
2020-01-13 00:14:41 +01:00
Iris Morelle
9a8bb8fb6e website: New Year copyright update
[ci skip]
2020-01-10 00:03:52 -03:00
Charles Dang
50839dd49f
Merge pull request #4663 from Chergnobarp/master
More wesml.vim fixes
2019-12-28 19:52:49 -05:00
Severin Glöckner
76a6e79fe6 update wmllint about DF changes
- Piercer was removed, it's line starts now from L2
 (Rider has different properties, but can advance to it)

- Strider is a better replacement for Monawish
  (Skirmisher was once a L2 and is now L1, while Strider is the new L2)

closes #4658
2019-12-26 12:25:56 +01:00
Chris Nasser
ef7d696935 Merge remote-tracking branch 'upstream/master' 2019-12-21 23:08:57 -04:00
Chris Nasser
8b2e589465 wesml.vim: Missing tags and typos. 2019-12-21 23:03:47 -04:00
Elvish_Hunter
d2e8d8cfd8 wesnoth_addon_manager: use tabs instead of spaces as field separators in --list output 2019-12-20 11:53:20 +01:00
Chris Nasser
bcffc9c7b9 Typo fix in wesml.vim.
store_village and story had no space between them, so they didn't
highlight correctly.
2019-12-18 07:13:11 -06:00
Chris Nasser
f6f339da4e Typo fix in wesml.vim.
store_village and story had no space between them, so they didn't
highlight correctly.
2019-12-18 00:39:13 -04:00
Elvish_Hunter
ec41359368 wmlscope: detect and analyze optional macro arguments 2019-12-02 21:23:58 +01:00
Toom
c4e39152cf Fix "wmllint: no translatables" magic comment 2019-11-19 18:21:15 +01:00
Elvish_Hunter
63c4fa6f66 wmllint: don't warn about [side] without type= if side controller is null
Fixes a few warnings in SotA
2019-11-18 20:46:34 +01:00
Steve Cotton
1035825152 Update changelog and readme for trackplacer python3 port 2019-11-18 18:24:28 +01:00
Steve Cotton
2c9caab3ce Add trackviewer, remove trackplacer
Trackviewer shows a journey without needing to start Wesnoth and refresh the
cache. Combined with tmx_trackplacer, the python3 versions now have
feature-parity with the old trackplacer, without the reliance on python2 or
pygtk (fixes #4365).

At least on Linux you can have both Tiled and this open on the same file. Save
the file in Tiled, alt+tab to this, and press enter to reload the file.
2019-11-18 16:57:26 +01:00
Elvish_Hunter
4acb95d557 wmllint: don't warn about missing type= in [side] if there's a [leader] tag inside
Fixes a wmllint warning in TSG, which is listed in #4494
2019-11-15 23:32:56 +01:00
Steve Cotton
3a8dc9c361 trackplacer3 a utility to export and import tmx files (#4365)
The python2 trackplacer included both the handling of the file format, and the
GUI application. This trackplacer3 is a library for the file format, without
the GUI.

The new tmx_trackplacer is a command-line tool for exporting the data to
Tiled's .tmx format, and re-importing it back to .cfg files, so that the GUI of
Tiled can be used to avoid reimplementing the GUI of Trackplacer in Python 3.

The implementation uses Tiled's Object Layers (not Tile Layers).  This allows
additional journey markers to be added with the "Insert Tile" tool, and
additional journeys to be added as new layers.

It can also read in a .cfg and then re-export it to a new .cfg file, to see if
the data is preserved. The format is chosen by the output filename.

The old trackplacer2 isn't removed in this commit - before removing it, I think
trackplacer3 needs some way to preview the animation.

----- Comments on the mainline campaigns: -----

AToTB, DM, LoW, NR and THoT will work with this. But:

Northern Rebirth's bigmap.cfg has a track RECOVERY whose STAGE1 starts with
an OLD_REST - that isn't handled by trackplacer, it must have been hand-edited.
That OLD_REST will be lost when read by either trackplacer2 or trackplacer3,
similarly the OLD_BATTLE of LoW's SAURIANS track will be lost.

Delfador's Memoirs SEARCH_STAGE1 is omitted from all subsequent parts of
SEARCH. Also in DM, SEARCH_STAGE3 has a point which is then moved in STAGE4
onwards - I guess a hand edit. Both of this will be overwritten if the file
is edited with either this tool or with the python2 trackplacer.

SotA's journey_chapter*.cfg files and WoV's bigmap.cfg file have some of the
trackplacer comments removed, they won't be handled by this tool, at least not
until better error handling is added.
2019-11-14 13:43:25 +01:00
Steve Cotton
4c48defdd0 Remove journeylifter from data/tools/README.md
Of the removed tools, it's the only one listed in this readme. The removal
was b896517834.
2019-11-14 01:11:16 +01:00
Elvish_Hunter
6ec75e9d54 wmllint: ignore id= keys in [candidate_action]
Fixes the TB warning listed in #4494
2019-11-13 22:31:28 +01:00
Elvish_Hunter
83ce0480c7 wmllint: don't consider [special_note] tags, only NOTE macros
Fixes the warnings for Swordsman and Royal Guard units listed in #4494
2019-11-13 22:17:48 +01:00
Elvish_Hunter
8f52a49800 wmllint: removed a few asserts and postponed a few unit sanity checks
Fixes #4102
2019-11-10 10:45:46 +01:00
nemaara
173edb9648 Update dunefolk in wmllint 2019-11-08 03:46:09 -05:00
Elvish_Hunter
8c6e637b9d Make wmllint ignore race= inside filters in [unit_type]
Fixes #4105
2019-11-05 20:00:05 +01:00
Iris Morelle
c75b7c1681 wmllint: Ignore [load_resource] for unit id validation
Fixes #4538.

[ci skip]
2019-11-04 22:13:25 -03:00