18071 Commits

Author SHA1 Message Date
mattsc
2139c84188 Zone guardian MAI: add optional station_x,station_y= keys 2013-06-06 19:24:13 -07:00
groggydice
89673c9672 regex sub to remove 'userdata/' from paths
The misguided authors who put userdata/ in their paths cause problems not just for non-Windows users, but fellow Windows users who chose not to put userdata in the install directory. This error can be removed by an approach similar to that just used to purge backslashes:

* if 'userdata': A basic filter to cut down the number of lines being run through complicated regex speeds up performance.
* while: It is possible, though rare, for a line to contain more than one path with userdata. Points about the regex: a) We continue to use precomment, though it would be well to correct commented-out old paths also, lest they mislead any more UMC writers.  b) In case you're wondering why I made one 'data/' string optional, there's a set of add-ons in 1.4 that use "userdata/campaigns" instead of "userdata/data/campaigns".  c) The '[ac]' at the end is something of an artifact of the time before I excluded comments, but it provides another safety measure insuring that the string is actually a value.
* regex object: This splits precomment into groups. Notes: a) Some authors begin with an unnecessary "../", might as well get rid of it as well. (As far as I can tell, this prefix has no effect anywhere I've seen it used, but I'd want to be positive that it ALWAYS does nothing before having wmllint replace it everywhere.) b) The first two groups have been made non-capturing; we will not need to refer to them.  c) For reporting to stdout, group(1) is extended to the next '/', though this part of the match is optional, to insure that there's no way to get trapped in a while loop.
* precomment: Here, we reconstruct precomment based on the regex object, except we simply drop what's outside group(1).
* print: In case designers don't get the point from seeing the elimination logged in stdout, I include an all-caps admonition against "userdata/". This is a really irritating bug.
* This code was inserted before the reconstruction of lines[i] from precomment and comment.
2013-06-06 19:34:07 -04:00
groggydice
8b01e0b19c code to change Windows-style backslashes in file paths to frontslashes
The task is to replace Windows backslashes in paths, without indiscriminately replacing backslashes in legitimate use as escapes (or bridge terrain).

Breaking this down:

* "no-syntax-rewrite": I don't think this is really necessary, but I will follow the practice of the hack_syntax section.
* if lines[i].lstrip().startswith("#"): Excludes lines that are only comments or defines.
* precomment: Originally, I simply excluded "#" during the while statement, but I realized that this could wrongly mistake a Pango color code (or old-style markup for green) as a comment. I now look for whitespace before "#", and rewrote this section to operate on precomment rather than the whole line.
* comment: Simply going with the second field would exclude the separator itself, so I use len.
* if '\\': Technically, this code worked going straight to the while statement, but running every line through the complicated regex made it sluggish. Faster to make sure the line meets a simple filter first.
* while: It is possible, though very uncommon, that a line could contain more than one file path. Looking at the regex test: a) Match the backslash itself, then be on the lookout for a character used to set apart a file path from other text. By excluding these, we ensure that there is an unbroken chain from the backslash to the file extension.  b) Then we have a list of file extensions, bracketed on the left by a period and the right by \b, to make sure they do not coincidentally match a string. These are the file types that might be referenced by a value (for instance, translation files are not referred to directly, so their extensions are not included). As a practical matter, EVERY instance in the wild I know of involves png, not counting one commented-out path in an ancient campaign.  c) File extensions can include capitals, particularly on Windows, where the effects of DOS unicase linger. So we make the search case-insensitive.
* regex object: This splits the line into groups. The differences from the regex used in the while statement: a) We also look for a non-pathbreaking string to the left of the backslash as well as the right. This means that group(1) will match the entire file path except the extension. b) The \b boundary has been made a non-consuming look-ahead assertion, to simplify future references to the regex object and its groups.
* fronted: The regex object, except all backslashes in group(1) are replaced by frontslashes.
* precomment: Here, we simply reconstruct precomment with the modified regex object.
* print: Besides reporting the substitution to stdout, I include a plea for cross-platform compatibility.
* lines[i]: Now it's time to rebuild the whole line.
2013-06-06 19:34:01 -04:00
mattsc
3fadf4cc31 Goto Micro AI: do not exclude leaders by default
The MAI accidentally excluded units with canrecruit=yes.  Thanks H-Hour.
2013-06-06 13:20:00 -07:00
Charles Dang
beb177e09b Made repeating button use opacity IPF for transparent versions (value set to 65%).
Thanks to bumbadadabum for pointing out I had forgot to do this
2013-06-07 02:48:41 +11:00
Charles Dang
5bcc6f0c1b Removed Dfool and Experimental themes 2013-06-05 19:42:57 +11:00
fendrin
643009c62a Render the global time of day beyond the local one. 2013-06-04 22:42:42 +02:00
fendrin
e82a16e09b Fixed an image path. 2013-06-04 22:42:41 +02:00
fendrin
53b3e303d3 UnitBox experimental theme. 2013-06-04 22:42:41 +02:00
fendrin
d7f3b5426e Correct indentation. 2013-06-04 22:42:41 +02:00
fendrin
16dd13cab4 Put the new custom tod dialog into use. 2013-06-04 22:42:41 +02:00
Charles Dang
6daa64099b Updated menu button image paths 2013-06-04 23:17:32 +11:00
Charles Dang
ca06fe62d5 Made dfool them use correct images (non menu image for End Turn button and H20 menu buttons for menu buttons) 2013-06-04 22:05:41 +11:00
Charles Dang
f8761a7064 Fixed path to low-res tools editor theme image 2013-06-04 21:23:24 +11:00
Charles Dang
ea56778b8f Use opacity IPF for transparent button images. Value set to 65% 2013-06-04 20:28:43 +11:00
Charles Dang
5211a99b1b Used regular as opposed to copper button variation images for default button 2013-06-04 20:18:04 +11:00
Charles Dang
b32ca5c390 Updated path for transparent version of default buttons 2013-06-03 05:33:21 +11:00
groggydice
4de6d2b0af insert lstrip() into instances of 'if lines[i].startswith("#"):' in hack_syntax
Surely the intent here would also cover indented comments.
2013-06-01 23:41:15 -04:00
groggydice
c10959f8d5 remove files on Windows so --revert and second conversions can proceed
Windows won't allow a rename to overwrite an existing file (Error 183, file already exists).
2013-06-01 22:59:50 +02:00
flix
2965da1731 Add comments to data/ai/formula/new_recruitment.fai 2013-06-01 23:41:27 +03:00
flix/Felix Bauer
29e8584738 Add new aspect 'advancements'
As part of a GSoC proposal I added a new aspect so a scenario editor can control advancements in two ways:
1. Define a aspect with a string-value like "Swordsman, Knight", so the units of interesst will always advance to this
2. Use the LUA-Engine and return a function of the form advance(x, y) which will itself return a string-value
    like "Swordsman, Knight". Everytime a ai-unit advances advance(x, y) will be called.
The corresponding wikipage (http://wiki.wesnoth.org/AiWML) is going to be updated soon.
2013-06-01 17:21:12 +03:00
Emilien Rotival
2dbcdda8fa Renamed the folder for consistency with the editor theme 2013-05-31 01:10:08 +02:00
Emilien Rotival
3f0360365a Placeholder artwork for experimental GUI theme 2013-05-31 00:51:36 +02:00
Charles Dang
c8e8ca4a09 Use new images for end turn button on low resolutions 2013-05-31 07:52:05 +11:00
Charles Dang
929b07dc87 Bumped size by 1 for normal icon toggle button, tiny res, for consistency 2013-05-30 23:00:40 +11:00
Charles Dang
1bb0b4e28f Increased size of nornal icon toggle button a little. Prevents scaling on normal resolutions. 2013-05-30 22:51:29 +11:00
Charles Dang
8ee955a096 Replaced refs to old lite_small image with one to new image 2013-05-30 22:23:02 +11:00
Charles Dang
7f8964d854 Used new images for end turn button in expirimental theme
The button goes off the side of the screen a bit, but that doesn't
really matter at no one uses Experimental anyway
2013-05-30 21:41:31 +11:00
Charles Dang
a33b3fd3d9 Made replay controls use new images 2013-05-30 21:06:22 +11:00
Charles Dang
bc63985554 Made icon toggle button/resize map dialog use new images 2013-05-30 17:20:30 +11:00
Charles Dang
09c899515d Made use of pressed and active overlay variations 2013-05-30 04:40:24 +11:00
Charles Dang
485eef1f7c Used grayscale imagepathfunction on disabled state overlays in absence of specific image 2013-05-30 04:18:45 +11:00
Charles Dang
6186222165 Made repeating button use new images 2013-05-30 03:04:40 +11:00
Charles Dang
55a5331967 Fixed typos 2013-05-29 22:05:13 +11:00
Emilien Rotival
ea27d2e85f Placeholder artwork for experimental "unit_box" feature 2013-05-29 12:09:48 +02:00
Charles Dang
a4b9d59e87 Used Add and Delete definitions for New/Delete ToD buttons 2013-05-29 19:55:02 +11:00
Charles Dang
9e423a50cf New 25x25 button defnitions: Add and Delete 2013-05-29 19:54:16 +11:00
Charles Dang
582764730c Made 25x25 buttons use new images 2013-05-29 19:39:44 +11:00
Charles Dang
9e0d6c6c25 Added files for new editor custom tod dialog 2013-05-29 18:47:34 +11:00
fendrin
50682aa251 Adds the indoors schedule. 2013-05-28 22:18:46 +02:00
fendrin
c345286087 Added more ToD schedules. 2013-05-28 21:41:01 +02:00
fendrin
455ca10889 Adjusted the 1024x768 resolution to the last art commit. 2013-05-28 03:12:03 +02:00
Elias Pschernig
60dbb25d5e [wmlunits] use set -e -u when running the units script 2013-05-27 23:10:47 +02:00
Allefant
d35daca000 [wmlunits] added the webserver cron script 2013-05-27 14:03:17 +02:00
fendrin
3b86a00756 Made use of lipkab's new full playlist. 2013-05-26 22:26:20 +02:00
Boldizsár Lipka
efd2abdc08 Macro documentation for FULL_MUSIC_PLAYLIST. 2013-05-26 15:14:50 +02:00
Boldizsár Lipka
e72dd524c9 New playlist FULL_MUSIC_PLAYLIST, containing all tracks. 2013-05-26 14:52:05 +02:00
Emilien Rotival
be7516c8e0 revised slicing for the 800x600 editor theme 2013-05-26 10:37:46 +02:00
Emilien Rotival
378d760d39 merged the tools + tools options palettes in the editor theme artwork 2013-05-26 10:18:19 +02:00
Richard Kettering
daf200f564 New portrait for old-delfador in tutorial. 2013-05-26 02:07:32 -05:00