246 Commits

Author SHA1 Message Date
Elvish_Hunter
77eed10a09 wmlunits: fixed an error on [female] tags without image= key 2021-12-06 17:52:25 +01:00
Gunter Labes
6c9813af8e
Update deprecated path options 2021-06-27 11:11:19 +02:00
Iris Morelle
8a2faf24e3 wmlunits: Units may have movement cost == max mp and be able to move
This applies to the Walking Corpse in particular, which has 4 MP and 4
movement cost to enter shallow water. In practice this means that it can
move into shallow water only if it's not slowed and hasn't spent any
movement points this turn, and then it cannot move any further until the
next turn.

Closes #5689.
2021-04-08 18:05:54 -04:00
Iris Morelle
e03ebed407 website: New Year copyright update
[ci skip]
2021-02-13 23:08:03 -03:00
Iris Morelle
9a8bb8fb6e website: New Year copyright update
[ci skip]
2020-01-10 00:03:52 -03:00
Zaal Tonia
9c6dcb6a63 Use damage type and range icons
Fixes issue #3949
2019-05-14 18:13:03 +02:00
Iris Morelle
674beb3502 website: New Year copyright update
[ci skip]
2019-03-12 23:21:20 -03:00
Allefant
f117a41646 fix for #3965 2019-03-06 11:47:47 -05:00
elias-pschernig
a7e65de2de fix wmlunits crash (#3931)
* fix wmlunits crash
2019-02-25 10:29:42 +01:00
Michał Janiszewski
9d333bc95a Compare to None using identity is operator
This is a trivial change that replaces `==` operator with `is` operator, following PEP 8 guideline:

> Comparisons to singletons like None should always be done with is or is not, never the equality operators.

https://legacy.python.org/dev/peps/pep-0008/#programming-recommendations
2018-10-31 12:21:01 +11:00
Charles Dang
471c9e876a Addressed a large chunk of the whitespace issues from #2613
[ci skip]
2018-03-09 11:37:00 +11:00
Iris Morelle
8413b1014e wesmere: Copyright/attribution update
[ci skip]
2018-02-16 19:56:31 -03:00
Gregory A Lundberg
b5f76eff79
Bump copyright to 2018 2018-01-19 00:02:20 -06:00
Gunter Labes
03b6ad568c
Continue if there is an old executable
Chances are that the previous build works just as well.
We just need it for config file parsing which does not change often.
2018-01-12 19:14:41 +01:00
Gunter Labes
7cdec04c7f
only keep env vars upper case, add missing quotes 2018-01-09 02:06:04 +01:00
Gunter Labes
a535a3140c
Use a more generic default value 2018-01-08 23:36:10 +01:00
Elvish_Hunter
f6fbd6351a Added missing Python shebangs to several scripts 2017-10-02 21:30:00 +02: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
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
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
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
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
Ignacio R. Morelle
400d419b54 wmlunits: New pop-up menu implementation
The new code has a smaller markup fingerprint (no more inline event
Javascript attributes) and it also ports the outer-click-dismiss
functionality over from the wiki. It raises the Javascript engine
requirements to IE 9 and later, though, which is inline with the home
page code.
2017-08-11 00:02:04 -04:00
Ignacio R. Morelle
a0029c06d1 wmlunits: Couple of cosmetic fixes 2017-08-09 03:10:07 -04:00
Ignacio R. Morelle
4d5a4fc4c6 wmlunits: Escape generated URLs and WML-defined output
Some refactoring and a lot of code changes are involved in this.
Basically, wmlunits has always fully trusted its WML input. This has
several implications:

 * URLs such as the ones for unit detail views tend to contain
   unescaped characters which are forbidden in URLs, such as spaces.
   While browsers generally tolerate this well, the result is still
   invalid HTML. The same applies to URLs used for inline CSS (e.g.
   background-image).

 * Most information read from WML such as unit names, descriptions,
   campaign names, era names, and so on, was blindly trusted and could
   allow an attacker to inject malicious HTML into units.wesnoth.org by
   uploading an add-on that would pass the units.wesnoth.org build
   process.

The resulting code might not be extent of regressions, but hopefully
we'll identify them quickly. This commit contains some additional noise
in the form of style fixes around offending lines as well. Backporting
to 1.12 is, as far as I understand, unnecessary since units.wesnoth.org
uses the master branch version of wmlunits, but it might be worth
evaluating whether to issue a warning for the 1 person in the world who
might be running the 1.12 version of the units.wesnoth.org toolchain on
their own facilities (okay, let's face it, nobody would ever do that).
2017-08-09 02:51:57 -04:00