Commit graph

2674 commits

Author SHA1 Message Date
Alexander van Gessel
cd4e2554cd Merge pull request #2053 from AI0867/wmlscope-durations
Teach wmlscope to ignore frame durations. Fixes #2045
2017-10-15 20:40:11 +02:00
Alexander van Gessel
c5b19ed66d Make 'bailout' a valid Python3 exception 2017-10-14 23:19:51 +02:00
Ignacio R. Morelle
cd23596993 wam: Add --datadir option to set the path to the Wesnoth data dir
[ci skip]

This is needed to use the 1.13.x WAM with older versions without messing
up icons due to files that have been moved or deleted over time.
2017-10-10 14:54:08 -03:00
Paŭlo Ebermann
02907ebe75 Fix the output by --progress.
Previously, this just printed the last file name again and again.
Now we are printing the file name we are currently looking at.

This can be observed e.g. by `wmlscope --progress`.
2017-10-05 19:35:38 +03:00
Alexander van Gessel
abd18e58bf Require period before extension, make previous chargroup non-greedy
This reduced the number of false positives by filtering out things like Grogg, editor-map, png and water/wav
2017-10-03 14:20:06 +02:00
Alexander van Gessel
baeabbd605 Make character-presence checks more pythonic 2017-10-02 23:30:34 +02:00
Elvish_Hunter
f6fbd6351a Added missing Python shebangs to several scripts 2017-10-02 21:30:00 +02:00
Elvish_Hunter
aa4024fda9 wmllint: remove UTF-8 BOM characters from cfg files 2017-10-02 21:30:00 +02:00
Alexander van Gessel
ca87ef4597 Fix crash for [/attack] without [attack]. Fixes #2052 2017-09-29 12:41:33 +02:00
Alexander van Gessel
3b203cbc12 Teach wmlscope to ignore frame durations. Fixes #2045 2017-09-29 12:07:49 +02:00
Charles Dang
7dcb9d09f9 wmlindent: don't inednt #arg/#endarg preprocessor tags
[ci ski[]
2017-09-12 21:25:22 +11:00
Ignacio R. Morelle
3eafff0d7d wmlunits: Use the unit type id on the id tooltip, not the name
Fixes #1978.

[ci skip]
2017-09-11 19:06:16 -03:00
Ignacio R. Morelle
3b1083f4e7 wesmere: status.w.o supports secure connections
[ci skip]
2017-09-06 13:04:50 -03:00
Ignacio R. Morelle
3fec145351 wmlunits: Avoid an unneeded list swap
[ci skip]
2017-09-05 15:12:33 -03:00
Ignacio R. Morelle
a62ee3930e wmlunits: Sort unit types on the side bar menus by name
[ci skip]
2017-09-05 15:12:33 -03:00
Ignacio R. Morelle
49bf9debbf wam: Add forum links provided by the add-ons server to the web index
[ci skip]
2017-09-04 16:48:02 -03:00
Ignacio R. Morelle
10b175a73f wam: Percent-encode add-on tarball names
This is *not* really necessary right now because of the limited
character set we allow for add-on names (currently [A-Za-z0-9_-]), but
it doesn't hurt to future-proof this since odds that someone will change
the limitations in the C++ code at some point without remembering to
update this script are staggeringly high these days.

[ci skip]
2017-09-04 16:06:47 -03:00
Ignacio R. Morelle
5124b2b626 wam: Full refactor/reformatting of the HTML writer module
This is primarily a code clean-up and there are no known behavior
changes. Some of the code changes follow:

 * The add-on type labels and explanations are now part of a dictionary
   rather than embedded in the program logic so it's easier to change
   them in the future if more add-on types get added.
 * The full URL to each add-on tarball is HTML-escaped, instead of just
   the add-on id.
 * The list of HTML/CSS resources that need to be copied into the output
   dir is somewhere more visible.
 * Some indentation issues have been fixed.
 * html.escape is used instead of cgi.escaped

[ci skip]
2017-09-04 16:06:47 -03:00
Ignacio R. Morelle
de721f38ad wmlunits: Do not use column layout for short race menus
[ci skip]
2017-08-30 15:02:34 -03:00
Ignacio R. Morelle
8139eab19e wmlunits: Exclude races consisting only of hidden units from the sidebar
[ci skip]
2017-08-30 14:29:36 -03:00
Ignacio R. Morelle
ddbc614312 wmlunits: Bump Wesmere CSS version
[ci skip]
2017-08-29 21:59:22 -03:00
Ignacio R. Morelle
2bb3e791cc wesmere: Don't use explicit tabindex (see wesnoth/wesmere#8)
[ci skip]
2017-08-29 21:55:41 -03:00
Ignacio R. Morelle
290cb4c2d2 wmlunits: Use transparent/ portraits where available, and omit sprite bg
We don't need the upscaled sprite background behind portraits, whether
they are transparent or not (for transparent portraits it just looks
bad).

[ci skip]
2017-08-29 17:26:30 -03:00
Ignacio R. Morelle
c0223cd7c0 wmlunits: Redo some bizarre bogus maths I did for the language menu 2017-08-28 19:55:03 -03:00
Ignacio R. Morelle
065d17b0c9 wmlunits: Major structural rearrangement of the unit details view page
Turns the unit description section into a flex container with the unit
portraits on the right, wherever flex is supported.

Fixes wesnoth/wesmere#4 and wesnoth/wesmere#3.
2017-08-27 20:48:11 -03:00
Ignacio R. Morelle
f28dafa7a4 wmlunits: Partial re-design of the navigation menu implementation
Needed in order to be able to style things better, especially for the
column layout popups.
2017-08-27 20:48:11 -03:00
Ignacio R. Morelle
f1eb040c76 wmlunits: Skip writing attack list sections when a unit has no attacks 2017-08-27 20:48:11 -03:00
Ignacio R. Morelle
769565b59c wmlunits: Don't format the abilities placeholder dash as bold 2017-08-27 20:48:11 -03:00
Ignacio R. Morelle
32169bfd2f wmlunits: Skip race names consisting of nothing but whitespace
They mess the markup up and aren't usually intended to be included in
the unit tree in the first place.
2017-08-27 20:48:11 -03:00
Ignacio R. Morelle
5985754786 wmlunits: Allow detecting wmlunits with the __WMLUNITS__ preprocessor symbol
This is an experimental attempt at enabling add-ons to either
voluntarily decrease unit tree bloat by defining a single campaign for
wmlunits (for multi-campaign add-ons), or disable unit tree generation
altogether by emiting an #error early.
2017-08-15 16:20:46 -03:00
Ignacio R. Morelle
5a675ec25d wmlunits: Psyco is a defunct project and it never supported Python 3 2017-08-15 16:02:55 -03:00
Ignacio R. Morelle
6cdfe9a7d2 wmlunits: "Language" hasn't been in the main textdomain for two stable series 2017-08-15 16:02:55 -03:00
Ignacio R. Morelle
3ba7c64010 wmlunits: Mark terrains with high movement costs properly 2017-08-15 01:31:36 -03:00
Ignacio R. Morelle
73857622fc wmlunits: Do not list abilities without name attributes
This reflects the in-game behavior, which is used to build compound
abilities with only one help entry.
2017-08-15 01:05:50 -03:00
Ignacio R. Morelle
abc0eb5d16 wmlunits: Get menu.js from the execution path, not the Wesnoth data dir
Otherwise we end-up with an obsolete version of menu.js from 1.12 when
reading 1.12 data.
2017-08-14 14:42:17 -03:00
Ignacio R. Morelle
a4172bddc1 wmlunits: Fix issue where the process name becomes "w" instead of "wmlunits"
The basic string type in Python 3 is equivalent to a wchar_t array,
which means that the second byte of every ASCII string is always zero,
causing the string to appear truncated after the first character when
calling C library functions that expect a single or multibyte encoding
(e.g. UTF-8). Just using a byte array does the trick to get a proper
single-byte ASCII string.
2017-08-14 13:59:09 -03:00
Ignacio R. Morelle
1fe8ed3a13 wmlunits: Include the build timestamp in the main panel (closes #5) 2017-08-14 03:03:17 -03:00
Ignacio R. Morelle
9099cb484b wmlunits: Fix some translation issues caused by textdomain breakage in master
People moved strings around when refactoring parts of the help system in
1.13.x and didn't make sure to carry the textdomain symbol around, so a
bunch of strings that used to be in wesnoth-help in 1.12.x are now in
the main wesnoth textdomain. Sad!
2017-08-13 22:31:35 -03:00
Ignacio R. Morelle
ef406b6938 wmlunits: Update menu markup to allow for CSS column layouts 2017-08-13 21:40:58 -03:00
Ignacio R. Morelle
b96dc224d0 wmlunits: Set up popup menu events ASAP
Fixes having to wait until the page is fully loaded before using the
popup menus, which takes quite a while for the unit tree pages.
2017-08-13 04:27:19 -03:00
Ignacio R. Morelle
667f9a2f11 wmlunits: Fix portrait logic
[portrait] was an implementation detail of an early version of the GUI2
[message] dialog back in 1.5.x and it was supposed to go away shortly
after the experimentation stage, according to mordante, and especially
after ~RIGHT() was implemented.

For some bizarre reason, units.w.o has been relying on this tag all
along, meaning that many UMC unit portraits, and all mainline portraits
since a 1.13.x release are no longer displayed because they are
specified using the standard profile= attribute instead.
2017-08-12 23:02:07 -04:00
Ignacio R. Morelle
3746925eab wmlunits: Handle TypeError on int_fallback() (in particular to deal with None) 2017-08-12 22:22:57 -04:00
Ignacio R. Morelle
0f171cd364 wam: Drop inline image dimensions as they force small images to be scaled up 2017-08-12 20:35:44 -04:00
Ignacio R. Morelle
086de4a897 Merge branch 'staging/wesmere-wmlunits' 2017-08-12 02:27:18 -04:00
Ignacio R. Morelle
5bcaaaf9f7 wmlunits: style.css is not used anymore 2017-08-12 02:24:43 -04:00
Ignacio R. Morelle
9db2ed630c wmlunits: More code clean-up 2017-08-12 02:24:07 -04:00
Ignacio R. Morelle
fcba9f498d wmlunits: Refactoring and quote clean-up 2017-08-11 03:41:44 -04:00
Ignacio R. Morelle
743d8c2278 wmlunits: More cleanup 2017-08-11 02:01:48 -04:00
Ignacio R. Morelle
b7b4efcf76 wmlunits: pylint pass 2 2017-08-11 01:46:40 -04:00
Ignacio R. Morelle
b660be8fd7 wmlunits: Refactor + pylint pass 1 2017-08-11 00:44:27 -04:00