bugfix newline problems in output
I had noticed that the line replacing the get_hit_sound with DEFENSE_ANIM didn't have a newline, but assumed that it was part of 'comment'. Nope! There are also two lines where a misplaced quotation mark led to an extraneous space being added to the end of a line.
This commit is contained in:
parent
441854d2ac
commit
7ac9e55a8d
1 changed files with 3 additions and 3 deletions
6
data/tools/wmllint
Executable file → Normal file
6
data/tools/wmllint
Executable file → Normal file
|
@ -1026,7 +1026,7 @@ def hack_syntax(filename, lines):
|
|||
(key, prefix, val, comment) = parse_attribute(lines[get_hit_sound])
|
||||
print 'wmllint: "%s", line %d: unit%s gets %s'%(filename, get_hit_sound+1, unit_id, new_anim)
|
||||
lines[get_hit_sound] = leader(lines[get_hit_sound]) \
|
||||
+ new_anim + comment
|
||||
+ new_anim + comment + "\n"
|
||||
modcount += 1
|
||||
in_unit = None
|
||||
unit_id = ""
|
||||
|
@ -1252,7 +1252,7 @@ def hack_syntax(filename, lines):
|
|||
+ outer + "[effect]\n" \
|
||||
+ ws + "apply_to=new_animation\n"
|
||||
after = ws + baseindent + "[attack_filter]\n" \
|
||||
+ ws + baseindent*2 + "name=" + attackname +" \n" \
|
||||
+ ws + baseindent*2 + "name=" + attackname + "\n" \
|
||||
+ ws + baseindent + "[/attack_filter]\n"
|
||||
lines[i] = before \
|
||||
+ lines[i].replace("animation", "attack_anim") \
|
||||
|
@ -1286,7 +1286,7 @@ def hack_syntax(filename, lines):
|
|||
insertion = outer + "[/attack]\n" \
|
||||
+ outer + "[attack_anim]\n" \
|
||||
+ ws + "[attack_filter]\n" \
|
||||
+ ws + baseindent + "name=" + attackname +" \n" \
|
||||
+ ws + baseindent + "name=" + attackname + "\n" \
|
||||
+ ws + "[/attack_filter]\n"
|
||||
lines[i] = insertion + lines[i]
|
||||
if soundpath:
|
||||
|
|
Loading…
Add table
Reference in a new issue