Make WML match C++ reality,

...which is that object takes a "description" attribute rather than a
"user_description" attribute.  I think this error was a fossil from an
experiment just after 1.4.
This commit is contained in:
Eric S. Raymond 2008-03-15 22:40:47 +00:00
parent 787e438af2
commit c70a1064b3
14 changed files with 19 additions and 16 deletions

View file

@ -211,7 +211,7 @@
name= _ "Holy Amulet"
image=items/ankh-necklace.png
duration=forever
user_description= _ "Wearing this amulet will cause every blow you deal to inflict arcane damage!"
description= _ "Wearing this amulet will cause every blow you deal to inflict arcane damage!"
cannot_use_message= _ "I am not suited to using this item! Let another take it."
[then]
[removeitem]

View file

@ -423,7 +423,7 @@
name= _ "Holy Amulet"
image=items/ankh-necklace.png
duration=forever
user_description= _ "Wearing this amulet will cause every blow you deal to inflict arcane damage!"
description= _ "Wearing this amulet will cause every blow you deal to inflict arcane damage!"
cannot_use_message= _ "I am not suited to using this item! Let another take it."
[then]
[removeitem]

View file

@ -311,7 +311,7 @@
name= _ "Holy Amulet"
image=items/ankh-necklace.png
duration=forever
user_description= _ "Wearing this amulet will cause every blow you deal to inflict arcane damage!"
description= _ "Wearing this amulet will cause every blow you deal to inflict arcane damage!"
cannot_use_message= _ "I am not suited to using this item! Let another take it."
[then]
[removeitem]

View file

@ -410,7 +410,7 @@
name= _ "Holy Amulet"
image=items/ankh-necklace.png
duration=forever
user_description= _ "Wearing this amulet will cause every blow you deal to inflict arcane damage!"
description= _ "Wearing this amulet will cause every blow you deal to inflict arcane damage!"
cannot_use_message= _ "I am not suited to using this item! Let another take it."
[then]
[removeitem]

View file

@ -578,7 +578,7 @@
name=Amulet of Strength
image=attacks/staff-elven.png
duration=forever
user_description= _ "Showing signs of ancient elvish manufacture, this amulet grants whomever is wearing it increased strength, stamina and protection against fire and holy attacks."
description= _ "Showing signs of ancient elvish manufacture, this amulet grants whomever is wearing it increased strength, stamina and protection against fire and holy attacks."
[effect]
apply_to=attack

View file

@ -211,7 +211,7 @@
# wmllint: recognize Southbay Guard 1
[object]
user_description= _ "The Ruby of Fire was imbued with magic in the distant west, and can be used to scorch enemies into submission."
description= _ "The Ruby of Fire was imbued with magic in the distant west, and can be used to scorch enemies into submission."
silent=yes
duration=forever
[filter]

View file

@ -654,7 +654,7 @@
id=Travelring
name= _ "Traveler's Ring"
image=items/ring-white.png
user_description= _ "At the end of each turn, this unit takes no damage from the desert."
description= _ "At the end of each turn, this unit takes no damage from the desert."
[filter]
x={X}
y={Y}
@ -1866,7 +1866,7 @@
id=PureWater
name= _ "Pure Water"
image=items/holy-water.png
user_description= _ "This water will make your melee weapons arcane, and thus especially powerful against the undead."
description= _ "This water will make your melee weapons arcane, and thus especially powerful against the undead."
[effect]
apply_to=attack

View file

@ -1130,7 +1130,7 @@
id=SpeedyRing
name= _ "Ring of Speed"
image=items/ring-gold.png
user_description= _ "This ring will increase your maximum speed by 1."
description= _ "This ring will increase your maximum speed by 1."
[filter]
x=$ring_x
y=$ring_y
@ -1348,7 +1348,7 @@
id=ColdBlade
name= _ "Cold Blade"
user_description= _ "The unit who wields this blade will deal cold damage with its melee attack."
description= _ "The unit who wields this blade will deal cold damage with its melee attack."
[effect]
apply_to=attack

View file

@ -2419,7 +2419,7 @@
id=Troll Wand
name= _ "Emerald Wand of Poison"
user_description= _ "This wand make this unit's melee attacks deal poison damage."
description= _ "This wand makes this unit's melee attacks deal poison damage."
[effect]
apply_to=attack

View file

@ -2312,7 +2312,7 @@
id=DwarvenBelt
name= _ "Dwarven Belt"
user_description= _ "The maximum hit points of the unit who wears this belt will increase by 12."
description= _ "The maximum hit points of the unit who wears this belt will increase by 12."
[effect]
apply_to=hitpoints

View file

@ -785,7 +785,7 @@
id=FlamingSword
image=flame-sword.png
name= _ "Flaming Sword"
user_description= _ "This sword will make all your melee attacks do fire damage."
description= _ "This sword will make all your melee attacks do fire damage."
[effect]
apply_to=attack

View file

@ -784,7 +784,7 @@
id=FlamingSword
image=items/flame-sword.png
name= _ "Flaming Sword"
user_description= _ "This sword will make all your melee attacks do fire damage."
description= _ "This sword will make all your melee attacks do fire damage."
[effect]
apply_to=attack

View file

@ -2363,7 +2363,7 @@
[/filter]
silent=yes
user_description=_"The user feels much better."
description=_"The user feels much better."
duration="level"
[effect]

View file

@ -864,7 +864,7 @@ def sanity_check(filename, lines):
pass
elif key == 'name': # FIXME: check this someday
pass
elif key in ("message", "name", "description", "user_description", "story", "note", "text", "summary", "caption", "label", "unit_description", "cannot_use_message", "set_description") and not value.startswith("$"):
elif key in ("message", "name", "description", "story", "note", "text", "summary", "caption", "label", "unit_description", "cannot_use_message", "set_description") and not value.startswith("$"):
if not has_tr_mark:
print '"%s", line %d: %s needs translation mark' \
% (filename, i+1, key)
@ -2131,6 +2131,9 @@ if __name__ == '__main__':
transformed = re.sub(r"\bdescription\s*=", "id=", line)
if "name" not in tagstack[-1][1]:
transformed = re.sub(r"user_description\s*=", "name=", line)
# Now, inside objects...
if under("object") and "description" not in tagstack[-1][1]:
transformed = re.sub(r"user_description\s*=", "description=", line)
# Alas, WML variable references cannod be converted so
# automatically.
if ".description" in line: