ThemeWML: [unit_description] -> [unit_name]
NOTE: the backward compatibility code is broken, i'll try to find after diner why
This commit is contained in:
parent
84a3a4843c
commit
28983b04ad
7 changed files with 21 additions and 10 deletions
|
@ -37,7 +37,10 @@ Version 1.5.0-svn:
|
|||
* In SingleUnitWML and SideWML, the geneate_description= attribute is
|
||||
now generate_name=. generate_description= will still be accepted for
|
||||
backwards compatibility. wmllint can safely do this up-conversion.
|
||||
* it's now possible to specify with loop= how many times a sample
|
||||
* In ThemeWML, the unit_description= attribute is now unit_name=.
|
||||
unit_description= will still be accepted for backwards compatibility.
|
||||
wmllint can safely do this up-conversion.
|
||||
* it's now possible to specify with loop= how many times a sample
|
||||
associated with a sound source should be played
|
||||
* new [switch] conditional command
|
||||
* new [unit_side] theme element : this is the side of the current unit (flag)
|
||||
|
|
|
@ -399,14 +399,14 @@
|
|||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_image]
|
||||
[unit_description]
|
||||
[unit_name]
|
||||
id=unit-description
|
||||
font_size={DEFAULT_FONT_NORMAL}
|
||||
ref=middle-right-panel
|
||||
rect="=+9,=+3,=-2,+18"
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_description]
|
||||
[/unit_name]
|
||||
[unit_type]
|
||||
id=unit-type
|
||||
font_size={DEFAULT_FONT_SMALL}
|
||||
|
|
|
@ -418,14 +418,14 @@
|
|||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_image]
|
||||
[unit_description]
|
||||
[unit_name]
|
||||
id=unit-description
|
||||
font_size=14
|
||||
ref=middle-right-panel
|
||||
rect="=+9,=+3,+72,+18"
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_description]
|
||||
[/unit_name]
|
||||
[unit_traits]
|
||||
id=unit-traits
|
||||
font_size=12
|
||||
|
|
|
@ -339,14 +339,14 @@
|
|||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_image]
|
||||
[unit_description]
|
||||
[unit_name]
|
||||
id=unit-description
|
||||
font_size={EXPERIMENTAL_FONT_NORMAL}
|
||||
ref=middle-right-panel
|
||||
rect="=+9,=+3,=-2,+18"
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_description]
|
||||
[/unit_name]
|
||||
[unit_type]
|
||||
id=unit-type
|
||||
font_size={EXPERIMENTAL_FONT_SMALL}
|
||||
|
|
|
@ -59,6 +59,11 @@ report generate_report(TYPE type,
|
|||
std::stringstream str;
|
||||
|
||||
switch(type) {
|
||||
// this one is for backward compatibility (should be removed in v1.5.3)
|
||||
case UNIT_NAME_OLD: {
|
||||
std::cerr << "warning: ThemeWML [unit_description] tag will be removed in 1.5.3, run wmllint on WML defining ";
|
||||
return report(u->second.name(),"",u->second.name());
|
||||
}
|
||||
case UNIT_NAME:
|
||||
return report(u->second.name(),"",u->second.name());
|
||||
case UNIT_TYPE:
|
||||
|
|
|
@ -20,7 +20,9 @@
|
|||
#include <map>
|
||||
|
||||
namespace {
|
||||
const std::string report_names[] = { "unit_description", "unit_type",
|
||||
// the first one is for backward compatibility (should be removed in v1.5.3)
|
||||
const std::string report_names[] = { "unit_description",
|
||||
"unit_name", "unit_type",
|
||||
"unit_race", "unit_level", "unit_side", "unit_amla",
|
||||
"unit_traits", "unit_status", "unit_alignment", "unit_abilities",
|
||||
"unit_hp", "unit_xp", "unit_advancement_options", "unit_moves",
|
||||
|
|
|
@ -25,8 +25,9 @@
|
|||
//this module is responsible for outputting textual reports of
|
||||
//various game and unit statistics
|
||||
namespace reports {
|
||||
|
||||
enum TYPE { UNIT_NAME, UNIT_TYPE, UNIT_RACE, UNIT_LEVEL,
|
||||
// the first one is for backward compatibility (should be removed in v1.5.3)
|
||||
enum TYPE { UNIT_NAME_OLD,
|
||||
UNIT_NAME, UNIT_TYPE, UNIT_RACE, UNIT_LEVEL,
|
||||
UNIT_SIDE, UNIT_AMLA, UNIT_TRAITS, UNIT_STATUS,
|
||||
UNIT_ALIGNMENT, UNIT_ABILITIES, UNIT_HP, UNIT_XP,
|
||||
UNIT_ADVANCEMENT_OPTIONS, UNIT_MOVES, UNIT_WEAPONS,
|
||||
|
|
Loading…
Add table
Reference in a new issue