Enable translation mark validation by the schema (#5800)
- The t_string type is now a schema built-in type and no longer attempts a regex match. - You can also specify that non-t_string types may be optionally-translatable; this case supports a regex match on the string (but note that the translation mark is not part of the match). - Error messages involving keys with very large values ( > 128 characters) will now truncate the value. - To account for occasional cases where the schema is intentionally violated, the --validate command-line option now automatically defines the SCHEMA_VALIDATION preprocessor define. A key validates as type t_string if one of the following is true: - The key is not present - The key has at least one segment with a translation mark - The key is blank (an empty string) Any type other than t_string is not allowed to be translatable by default, unless you specify allow_translatable=yes in the [type] tag. An optionally-translatable string could also be defined as a union of t_string and some other type.
This commit is contained in:
parent
08b65b2bd7
commit
0c42cdc038
94 changed files with 687 additions and 805 deletions
|
@ -342,7 +342,7 @@
|
|||
[message]
|
||||
speaker=narrator
|
||||
image=wesnoth-icon.png
|
||||
caption="Important Note"
|
||||
caption=_"Important Note"
|
||||
message= _ "<span color='#A00000'>Important:</span> The animal Micro AIs in this scenario are written for a number of animal unit types that do not exist in Wesnoth mainline, such as sheep, sheep dogs, or deer. In this test scenario, these units have been replaced by mainline units."
|
||||
[/message]
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
controller=human
|
||||
suppress_end_turn_confirmation=yes
|
||||
hidden=no
|
||||
name=Vaddan
|
||||
name=_"Vaddan"
|
||||
id=Vaddan
|
||||
type=Outlaw
|
||||
persistent=no
|
||||
|
@ -36,7 +36,7 @@
|
|||
controller=ai
|
||||
type=General
|
||||
id=leader2
|
||||
name=Minry
|
||||
name=_"Minry"
|
||||
persistent=no
|
||||
|
||||
team_name=humans,hum_wood
|
||||
|
@ -85,7 +85,7 @@
|
|||
side=5
|
||||
controller=ai
|
||||
type=Lieutenant
|
||||
name=Gadoc
|
||||
name=_"Gadoc"
|
||||
id=leader5
|
||||
persistent=no
|
||||
|
||||
|
@ -102,7 +102,7 @@
|
|||
side=6
|
||||
controller=ai
|
||||
type=Lieutenant
|
||||
name=Senvan
|
||||
name=_"Senvan"
|
||||
id=leader6
|
||||
persistent=no
|
||||
|
||||
|
@ -179,7 +179,7 @@
|
|||
{REPEAT 4 {UNIT 7 (Vampire Bat) 35 13 ()}}
|
||||
|
||||
# The River Fort commander
|
||||
{UNIT 5 Sergeant 12 30 (id,name=fort_commander,Aethubry)}
|
||||
{UNIT 5 Sergeant 12 30 (id,name=fort_commander,_"Aethubry")}
|
||||
|
||||
# Labels
|
||||
{SET_LABEL 7 3 _"General Minry"}
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
[unit]
|
||||
type=Elder Mage
|
||||
id=Rossauba
|
||||
name=Rossauba
|
||||
name=_"Rossauba"
|
||||
side=1
|
||||
x,y=20,9
|
||||
upkeep=loyal
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
controller=human
|
||||
suppress_end_turn_confirmation=yes
|
||||
hidden=no
|
||||
name=Rutburt
|
||||
name=_"Rutburt"
|
||||
id=Rutburt
|
||||
type=Outlaw
|
||||
max_moves=99
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
# wmllint: no translatables
|
||||
# wmllint: markcheck off
|
||||
#textdomain wesnoth-test
|
||||
# @file data/scenario-test.cfg
|
||||
|
||||
[test]
|
||||
name="Test scenario"
|
||||
name=_"Test scenario"
|
||||
map_data="
|
||||
Hh , Hh , Gg , Wwf , Wwf , Gs^Fp , Mm , Hh , Gg , Gs^Fp , Gg , Hh , Gg , Mm , Hh , Mm , Wwf , Wwf , Hh , Gs^Fp , Hh , Mm , Mm
|
||||
Hh , Hh , Gg^Ve , Wwf , Wwf , Gs^Fp , Mm , Hh , Gg , Gs^Fp , Gg , Hh , Gg , Mm , Hh , Mm , Wwf , Wwf , Hh , Gs^Fp , Hh , Mm , Mm
|
||||
|
@ -48,7 +47,7 @@ Gs^Fp , Gs^Fp , Wwf , Wwf , Mm , Rd
|
|||
[/side]
|
||||
|
||||
[side]
|
||||
name=FormulaAI
|
||||
name=_"FormulaAI"
|
||||
type=Lieutenant
|
||||
side=2
|
||||
canrecruit=yes
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
# wmllint: no translatables
|
||||
# wmllint: markcheck off
|
||||
#textdomain wesnoth-test
|
||||
# @file data/scenario-test.cfg
|
||||
|
||||
[test]
|
||||
name="Test scenario"
|
||||
name=_"Test scenario"
|
||||
map_data="
|
||||
Hh , Hh , Gg , Wwf , Wwf , Gs^Fp , Mm , Hh , Gg , Gs^Fp , Gg , Hh , Gg , Mm , Hh , Mm , Wwf , Wwf , Hh , Gs^Fp , Hh , Mm , Mm
|
||||
Hh , Hh , Gg^Ve , Wwf , Wwf , Gs^Fp , Mm , Hh , Gg , Gs^Fp , Gg , Hh , Gg , Mm , Hh , Mm , Wwf , Wwf , Hh , Gs^Fp , Hh , Mm , Mm
|
||||
|
@ -40,37 +39,37 @@ Gs^Fp , Gs^Fp , Wwf , Wwf , Mm , Rd
|
|||
|
||||
[label]
|
||||
x,y=16,5
|
||||
text="Patrol waypoint 1"
|
||||
text=_"Patrol waypoint 1"
|
||||
[/label]
|
||||
|
||||
[label]
|
||||
x,y=16,15
|
||||
text="Patrol waypoint 2"
|
||||
text=_"Patrol waypoint 2"
|
||||
[/label]
|
||||
|
||||
[label]
|
||||
x,y=3,14
|
||||
text="Formula priorities test"
|
||||
text=_"Formula priorities test"
|
||||
[/label]
|
||||
|
||||
[label]
|
||||
x,y=2,12
|
||||
text="first"
|
||||
text=_"first"
|
||||
[/label]
|
||||
|
||||
[label]
|
||||
x,y=3,11
|
||||
text="second"
|
||||
text=_"second"
|
||||
[/label]
|
||||
|
||||
[label]
|
||||
x,y=3,13
|
||||
text="third"
|
||||
text=_"third"
|
||||
[/label]
|
||||
|
||||
[label]
|
||||
x,y=8,5
|
||||
text="Location guarded (range = 3)"
|
||||
text=_"Location guarded (range = 3)"
|
||||
[/label]
|
||||
|
||||
[side]
|
||||
|
@ -116,7 +115,7 @@ Gs^Fp , Gs^Fp , Wwf , Wwf , Mm , Rd
|
|||
[side]
|
||||
#controller=human
|
||||
suppress_end_turn_confirmation=yes
|
||||
name=FormulaAI
|
||||
name=_"FormulaAI"
|
||||
type=Dark Sorcerer
|
||||
side=2
|
||||
canrecruit=yes
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
[test]
|
||||
id=high_xp_attack
|
||||
name="High XP Attack"
|
||||
name=_"High XP Attack"
|
||||
|
||||
map_file=ai/maps/scenario-high_xp_attack.map
|
||||
{DEFAULT_SCHEDULE}
|
||||
|
@ -13,14 +13,14 @@
|
|||
side=1
|
||||
controller=human
|
||||
id=player
|
||||
name="Sly Player"
|
||||
name=_"Sly Player"
|
||||
type=Necromancer
|
||||
x,y=17,58
|
||||
persistent=no
|
||||
facing=sw
|
||||
|
||||
team_name=player
|
||||
user_team_name="Sly Player"
|
||||
user_team_name=_"Sly Player"
|
||||
recruit=Skeleton,Skeleton Archer
|
||||
|
||||
gold=0
|
||||
|
@ -29,13 +29,13 @@
|
|||
[side]
|
||||
type=Dwarvish Steelclad
|
||||
id=dwarf
|
||||
name="Fearless AI Leader"
|
||||
name=_"Fearless AI Leader"
|
||||
side=2
|
||||
x,y=8,53
|
||||
facing=se
|
||||
|
||||
team_name=dwarves
|
||||
user_team_name="Fearless AI"
|
||||
user_team_name=_"Fearless AI"
|
||||
recruit=Dwarvish Fighter,Dwarvish Scout,Dwarvish Thunderer
|
||||
|
||||
gold=0
|
||||
|
@ -102,58 +102,58 @@
|
|||
|
||||
[message]
|
||||
id=player
|
||||
message="Hahaha! I have placed my units at strategic choke points and given them XP close to leveling. I am safe from the stupid Wesnoth AI."
|
||||
message=_"Hahaha! I have placed my units at strategic choke points and given them XP close to leveling. I am safe from the stupid Wesnoth AI."
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
id=dwarf
|
||||
message="You're in for a nasty surprise ..."
|
||||
message=_"You're in for a nasty surprise ..."
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker=narrator
|
||||
image="wesnoth-icon.png"
|
||||
caption="Note"
|
||||
message="This is a test scenario for a new AI algorithm that attacks units close to leveling. A few test cases are already set up on the map, but it is really expected that you add more units and/or change hitpoints and experience using debug commands to try out other situations."
|
||||
caption=_"Note"
|
||||
message=_"This is a test scenario for a new AI algorithm that attacks units close to leveling. A few test cases are already set up on the map, but it is really expected that you add more units and/or change hitpoints and experience using debug commands to try out other situations."
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
x,y=52,55
|
||||
message="Poisoned units are only attacked if there is a chance to kill them. Otherwise we simply wait and let the poison do its work."
|
||||
message=_"Poisoned units are only attacked if there is a chance to kill them. Otherwise we simply wait and let the poison do its work."
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
x,y=19,54
|
||||
message="The scout in the northwest is the better choice for forcing the skeleton to level up, so I'll move out of the way for him."
|
||||
message=_"The scout in the northwest is the better choice for forcing the skeleton to level up, so I'll move out of the way for him."
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
x,y=8,29
|
||||
message="Here we have a unit 2 XP from leveling with both L1 and L2 AI units in reach. In this case, we wait to see what the default AI does. After the default AI attacks with one of the L1 units and the enemy is 1 XP from leveling, we execute a level-up attack."
|
||||
message=_"Here we have a unit 2 XP from leveling with both L1 and L2 AI units in reach. In this case, we wait to see what the default AI does. After the default AI attacks with one of the L1 units and the enemy is 1 XP from leveling, we execute a level-up attack."
|
||||
[/message]
|
||||
[message]
|
||||
x,y=18,29
|
||||
message="This is an equivalent setup, except that the default AI chooses not to attack with the (weakened) L1 units. In this case, we execute the level-up attack with the L2 unit after the default AI is done."
|
||||
message=_"This is an equivalent setup, except that the default AI chooses not to attack with the (weakened) L1 units. In this case, we execute the level-up attack with the L2 unit after the default AI is done."
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
x,y=35,40
|
||||
message="There's a high chance that I will die in attacking that revenant, so the AI will not attack with aggression=0.4 (the default). By contrast, with aggression=1 (which you can set in a moment), it does attack."
|
||||
message=_"There's a high chance that I will die in attacking that revenant, so the AI will not attack with aggression=0.4 (the default). By contrast, with aggression=1 (which you can set in a moment), it does attack."
|
||||
[/message]
|
||||
[message]
|
||||
x,y=43,40
|
||||
message="I have a much lower chance to die and will attack even with the default setting for aggression."
|
||||
message=_"I have a much lower chance to die and will attack even with the default setting for aggression."
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker=narrator
|
||||
image=wesnoth-icon.png
|
||||
message="What value should we use for aggression for the AI side?"
|
||||
message=_"What value should we use for aggression for the AI side?"
|
||||
[option]
|
||||
label="aggression 0.4 (the default)"
|
||||
label=_"aggression 0.4 (the default)"
|
||||
[/option]
|
||||
[option]
|
||||
label="aggression 1.0"
|
||||
label=_"aggression 1.0"
|
||||
[command]
|
||||
[modify_side]
|
||||
side=2
|
||||
|
@ -167,7 +167,7 @@
|
|||
|
||||
[objectives]
|
||||
[note]
|
||||
description="Modify the units on the map as desired, then end the turn"
|
||||
description=_"Modify the units on the map as desired, then end the turn"
|
||||
[/note]
|
||||
[/objectives]
|
||||
[/event]
|
||||
|
|
|
@ -73,7 +73,7 @@ Gs^Fp , Gs^Fp , Wwf , Wwf , Mm , Rd
|
|||
side=2
|
||||
controller=ai
|
||||
id=LuaAI
|
||||
name=LuaAI
|
||||
name=_"LuaAI"
|
||||
type=Dark Sorcerer
|
||||
canrecruit=yes
|
||||
recruit=Skeleton,Skeleton Archer,Walking Corpse,Ghost,Vampire Bat,Dark Adept,Ghoul
|
||||
|
|
|
@ -74,7 +74,7 @@ Gs^Fp , Gs^Fp , Wwf , Wwf , Mm , Rd
|
|||
side=2
|
||||
controller=ai
|
||||
id=LuaAI
|
||||
name=LuaAI
|
||||
name=_"LuaAI"
|
||||
type=Dark Sorcerer
|
||||
canrecruit=yes
|
||||
recruit=Skeleton,Skeleton Archer,Walking Corpse,Ghost,Vampire Bat,Dark Adept,Ghoul
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
# wmllint: no translatables
|
||||
# wmllint: markcheck off
|
||||
#textdomain wesnoth-test
|
||||
# @file data/scenario-test.cfg
|
||||
|
||||
[test]
|
||||
name="Test scenario"
|
||||
name=_"Test scenario"
|
||||
map_data="
|
||||
Hh , Hh , Gg , Wwf , Wwf , Gs^Fp , Mm , Hh , Gg , Gs^Fp , Gg , Hh , Gg , Mm , Hh , Mm , Wwf , Wwf , Hh , Gs^Fp , Hh , Mm , Mm
|
||||
Hh , Hh , Gg^Ve , Wwf , Wwf , Gs^Fp , Mm , Hh , Gg , Gs^Fp , Gg , Hh , Gg , Mm , Hh , Mm , Wwf , Wwf , Hh , Gs^Fp , Hh , Mm , Mm
|
||||
|
@ -40,24 +39,24 @@ Gs^Fp , Gs^Fp , Wwf , Wwf , Mm , Rd
|
|||
|
||||
[label]
|
||||
x,y=3,8
|
||||
text="Target Choose test"
|
||||
text=_"Target Choose test"
|
||||
[/label]
|
||||
[label]
|
||||
x,y=17,3
|
||||
text="Weapon test with low hp target"
|
||||
text=_"Weapon test with low hp target"
|
||||
[/label]
|
||||
[label]
|
||||
x,y=13,8
|
||||
text="Regeneration attack Test"
|
||||
text=_"Regeneration attack Test"
|
||||
[/label]
|
||||
[label]
|
||||
x,y=7,3
|
||||
text="Undead Target Test"
|
||||
text=_"Undead Target Test"
|
||||
[/label]
|
||||
|
||||
[side]
|
||||
side=1
|
||||
name="Azalin"
|
||||
name=_"Azalin"
|
||||
type=Necromancer
|
||||
id=side_1_leader
|
||||
canrecruit=yes
|
||||
|
@ -105,7 +104,7 @@ Gs^Fp , Gs^Fp , Wwf , Wwf , Mm , Rd
|
|||
[/side]
|
||||
|
||||
[side]
|
||||
name=FormulaAı
|
||||
name=_"FormulaAı"
|
||||
type=Dark Sorcerer
|
||||
side=2
|
||||
canrecruit=yes
|
||||
|
|
|
@ -147,14 +147,14 @@
|
|||
[unit]
|
||||
type=Saurian Skirmisher
|
||||
ai_special=guardian
|
||||
name=Guardian
|
||||
name=_"Guardian"
|
||||
generate_name=yes
|
||||
x,y=22,27
|
||||
[/unit]
|
||||
[unit]
|
||||
type=Saurian Skirmisher
|
||||
ai_special=guardian
|
||||
name=Guardian
|
||||
name=_"Guardian"
|
||||
generate_name=yes
|
||||
x,y=24,26
|
||||
[/unit]
|
||||
|
@ -202,7 +202,7 @@
|
|||
[unit]
|
||||
type=Saurian Skirmisher
|
||||
ai_special=guardian
|
||||
name=Guardian
|
||||
name=_"Guardian"
|
||||
generate_name=yes
|
||||
x,y=23,18
|
||||
[/unit]
|
||||
|
@ -252,14 +252,14 @@
|
|||
[unit]
|
||||
type=Saurian Skirmisher
|
||||
ai_special=guardian
|
||||
name=Guardian
|
||||
name=_"Guardian"
|
||||
generate_name=yes
|
||||
x,y=14,9
|
||||
[/unit]
|
||||
[unit]
|
||||
type=Saurian Skirmisher
|
||||
ai_special=guardian
|
||||
name=Guardian
|
||||
name=_"Guardian"
|
||||
generate_name=yes
|
||||
x,y=19,8
|
||||
[/unit]
|
||||
|
|
|
@ -751,7 +751,8 @@
|
|||
|
||||
[floating_text]
|
||||
x,y=$x1,$y1
|
||||
text="<span color='#ff0000'>-1</span>" # wmllint: ignore
|
||||
color=255,0,0
|
||||
text=-1
|
||||
[/floating_text]
|
||||
|
||||
[remove_item]
|
||||
|
|
|
@ -370,9 +370,8 @@
|
|||
|
||||
[floating_text]
|
||||
x,y=$runit.x,$runit.y
|
||||
# wmllint: markcheck off - nothing to translate here
|
||||
text="<span color='#ff0000'>" + "5" + "</span>"
|
||||
# wmllint: markcheck on
|
||||
color=255,0,0
|
||||
text=5
|
||||
[/floating_text]
|
||||
|
||||
{VARIABLE counter 0}
|
||||
|
@ -714,9 +713,8 @@
|
|||
|
||||
[floating_text]
|
||||
x,y=$cunit.x,$cunit.y
|
||||
# wmllint: markcheck off - nothing to translate here
|
||||
text="<span color='#ff0000'>" + "2" + "</span>"
|
||||
# wmllint: markcheck on
|
||||
color=255,0,0
|
||||
text=2
|
||||
[/floating_text]
|
||||
[/then]
|
||||
[/if]
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
map_generation=lua
|
||||
[generator]
|
||||
id="cavegen"
|
||||
config_name="Lua Cave Generator"
|
||||
config_name=_"Sceptre of Fire Caves"
|
||||
create_map = << return wesnoth.require("cave_map_generator").generate_map(...) >>
|
||||
|
||||
map_width=50
|
||||
|
|
|
@ -1239,7 +1239,8 @@
|
|||
|
||||
[floating_text]
|
||||
x,y={_X},{_Y}
|
||||
text="<span color='#e1e119'>{_AMOUNT}</span>" # wmllint: ignore
|
||||
color=225,225,25
|
||||
text={_AMOUNT}
|
||||
[/floating_text]
|
||||
|
||||
[remove_item]
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
[generator]
|
||||
id="cavegen"
|
||||
config_name="Lua Cave Generator"
|
||||
config_name=_"Sceptre of Fire Mines"
|
||||
create_map = << return wesnoth.require("cave_map_generator").generate_map(...) >>
|
||||
|
||||
map_width=45
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
[side]
|
||||
side=4
|
||||
id=Grüü
|
||||
name=" "
|
||||
name=_"Grüü"
|
||||
type=Great Troll
|
||||
canrecruit=yes
|
||||
team_name=Kapoue
|
||||
|
|
|
@ -520,7 +520,9 @@ Unlike other forms of healing, the heals ability will not take effect on the hea
|
|||
[topic]
|
||||
id=license
|
||||
title= _ "License"
|
||||
#ifndef SCHEMA_VALIDATION
|
||||
text="{COPYING.txt}"
|
||||
#endif
|
||||
[/topic]
|
||||
|
||||
# wmllint: markcheck off
|
||||
|
|
|
@ -1310,7 +1310,9 @@ Occasionally caves are <italic>text='illuminated'</italic>."
|
|||
#editor_image=cave/earthy-wall-hewn-tile
|
||||
id=cavewall_earthy_hewn
|
||||
name= _ "Cave Wall"
|
||||
editor_name="Reinforced Earthy Cave Wall" # wmllint: ignore
|
||||
#ifndef SCHEMA_VALIDATION
|
||||
editor_name="Reinforced Earthy Cave Wall"
|
||||
#endif
|
||||
string=Xuce
|
||||
aliasof=Xt
|
||||
editor_group=cave,obstacle
|
||||
|
@ -2934,7 +2936,6 @@ For those who go by land or sea, a bridge is the best of both worlds — for gam
|
|||
symbol_image=off-map/border
|
||||
editor_image=off-map/border-editor
|
||||
id=off_map2
|
||||
name=""
|
||||
editor_name= _ "Fake Map Border"
|
||||
string=^_fme # wmllint: ignore
|
||||
editor_group=special, obstacle
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
id = "click_dismiss"
|
||||
definition = "default"
|
||||
|
||||
label = "Close"
|
||||
label = _ "Close"
|
||||
[/button]
|
||||
|
||||
[/column]
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
[window]
|
||||
id = "addon_auth"
|
||||
description =_ "Add-on upload authentication dialog"
|
||||
description = "Add-on upload authentication dialog"
|
||||
|
||||
[resolution]
|
||||
definition = "default"
|
||||
|
|
|
@ -76,7 +76,6 @@
|
|||
[scroll_label]
|
||||
id = "terms"
|
||||
definition = "description"
|
||||
label = "server terms placeholder"
|
||||
link_aware = true
|
||||
[/scroll_label]
|
||||
[/column]
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
[label]
|
||||
id = "title"
|
||||
definition = "title"
|
||||
label = "Epic Addon Of Awesomeness"
|
||||
use_markup = true
|
||||
[/label]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#textdomain wesnoth-lib
|
||||
#textdomain wesnoth-test
|
||||
###
|
||||
### Definition of the window to show the debug_clock for testing the drawing
|
||||
### timer.
|
||||
|
@ -13,7 +13,7 @@
|
|||
w = 30
|
||||
font_size = 10
|
||||
color = "255,255,255,255"
|
||||
text = "{TEXT}"
|
||||
text = {TEXT}
|
||||
[/text]
|
||||
#enddef
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
|||
[label]
|
||||
definition = "title"
|
||||
|
||||
label = "Debug drawing clock"
|
||||
label = _ "Debug drawing clock"
|
||||
[/label]
|
||||
|
||||
[/column]
|
||||
|
@ -69,8 +69,8 @@
|
|||
[progress_bar]
|
||||
id = "hour_percentage"
|
||||
|
||||
tooltip = "Hours in percent"
|
||||
help = "The full range of the bar is 24 hours."
|
||||
tooltip = _ "Hours in percent"
|
||||
help = _ "The full range of the bar is 24 hours."
|
||||
[/progress_bar]
|
||||
|
||||
[/column]
|
||||
|
@ -149,7 +149,7 @@
|
|||
minimum_value = 0
|
||||
maximum_value = 3599
|
||||
step_size = 1
|
||||
label = 3599
|
||||
label = _ "3599"
|
||||
[/slider]
|
||||
|
||||
[/column]
|
||||
|
@ -172,7 +172,7 @@
|
|||
minimum_value = 0
|
||||
maximum_value = 59
|
||||
step_size = 1
|
||||
label = 59
|
||||
label = _ "59"
|
||||
[/slider]
|
||||
|
||||
[/column]
|
||||
|
@ -254,30 +254,30 @@
|
|||
# placement on the radius 100 circle itself - without the leading space, aligning the center
|
||||
# of the single-digit texts correctly looks wrong.
|
||||
|
||||
{_GUI_TICK_MARK 15.0 ( 1)}
|
||||
{_GUI_TICK_MARK 30.0 ( 2)}
|
||||
{_GUI_TICK_MARK 45.0 ( 3)}
|
||||
{_GUI_TICK_MARK 60.0 ( 4)}
|
||||
{_GUI_TICK_MARK 75.0 ( 5)}
|
||||
{_GUI_TICK_MARK 90.0 ( 6)}
|
||||
{_GUI_TICK_MARK 105.0 ( 7)}
|
||||
{_GUI_TICK_MARK 120.0 ( 8)}
|
||||
{_GUI_TICK_MARK 135.0 ( 9)}
|
||||
{_GUI_TICK_MARK 150.0 (10)}
|
||||
{_GUI_TICK_MARK 165.0 (11)}
|
||||
{_GUI_TICK_MARK 180.0 (12)}
|
||||
{_GUI_TICK_MARK 195.0 (13)}
|
||||
{_GUI_TICK_MARK 210.0 (14)}
|
||||
{_GUI_TICK_MARK 225.0 (15)}
|
||||
{_GUI_TICK_MARK 240.0 (16)}
|
||||
{_GUI_TICK_MARK 255.0 (17)}
|
||||
{_GUI_TICK_MARK 270.0 (18)}
|
||||
{_GUI_TICK_MARK 285.0 (19)}
|
||||
{_GUI_TICK_MARK 300.0 (20)}
|
||||
{_GUI_TICK_MARK 315.0 (21)}
|
||||
{_GUI_TICK_MARK 330.0 (22)}
|
||||
{_GUI_TICK_MARK 345.0 (23)}
|
||||
{_GUI_TICK_MARK 360.0 (24)}
|
||||
{_GUI_TICK_MARK 15.0 (_ " 1")}
|
||||
{_GUI_TICK_MARK 30.0 (_ " 2")}
|
||||
{_GUI_TICK_MARK 45.0 (_ " 3")}
|
||||
{_GUI_TICK_MARK 60.0 (_ " 4")}
|
||||
{_GUI_TICK_MARK 75.0 (_ " 5")}
|
||||
{_GUI_TICK_MARK 90.0 (_ " 6")}
|
||||
{_GUI_TICK_MARK 105.0 (_ " 7")}
|
||||
{_GUI_TICK_MARK 120.0 (_ " 8")}
|
||||
{_GUI_TICK_MARK 135.0 (_ " 9")}
|
||||
{_GUI_TICK_MARK 150.0 (_ "10")}
|
||||
{_GUI_TICK_MARK 165.0 (_ "11")}
|
||||
{_GUI_TICK_MARK 180.0 (_ "12")}
|
||||
{_GUI_TICK_MARK 195.0 (_ "13")}
|
||||
{_GUI_TICK_MARK 210.0 (_ "14")}
|
||||
{_GUI_TICK_MARK 225.0 (_ "15")}
|
||||
{_GUI_TICK_MARK 240.0 (_ "16")}
|
||||
{_GUI_TICK_MARK 255.0 (_ "17")}
|
||||
{_GUI_TICK_MARK 270.0 (_ "18")}
|
||||
{_GUI_TICK_MARK 285.0 (_ "19")}
|
||||
{_GUI_TICK_MARK 300.0 (_ "20")}
|
||||
{_GUI_TICK_MARK 315.0 (_ "21")}
|
||||
{_GUI_TICK_MARK 330.0 (_ "22")}
|
||||
{_GUI_TICK_MARK 345.0 (_ "23")}
|
||||
{_GUI_TICK_MARK 360.0 (_ "24")}
|
||||
|
||||
# Add outer circle.
|
||||
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
|
||||
[label]
|
||||
definition = "default"
|
||||
label = "text is set by C++"
|
||||
id = "message"
|
||||
[/label]
|
||||
|
||||
|
@ -76,7 +75,6 @@
|
|||
|
||||
[scroll_label]
|
||||
id = "itemlist"
|
||||
label = "text set by c++"
|
||||
definition = "default"
|
||||
[/scroll_label]
|
||||
|
||||
|
|
|
@ -93,7 +93,6 @@
|
|||
[label]
|
||||
id = "side_number"
|
||||
definition = "default"
|
||||
label = "0"
|
||||
[/label]
|
||||
[/column]
|
||||
|
||||
|
|
|
@ -86,7 +86,6 @@
|
|||
[label]
|
||||
id = "old_width"
|
||||
definition = "default"
|
||||
label = "-1"
|
||||
[/label]
|
||||
[/column]
|
||||
[/row]
|
||||
|
@ -134,7 +133,6 @@
|
|||
[label]
|
||||
id = "old_height"
|
||||
definition = "default"
|
||||
label = "-1"
|
||||
[/label]
|
||||
[/column]
|
||||
[/row]
|
||||
|
|
|
@ -473,7 +473,6 @@
|
|||
[label]
|
||||
id = version
|
||||
definition = default_bold
|
||||
label = "Version X.XX.XX XXXXXXXXXXXXX"
|
||||
wrap = true
|
||||
[/label]
|
||||
|
||||
|
@ -491,7 +490,6 @@
|
|||
|
||||
[label]
|
||||
id = os
|
||||
label = "Running on XXXXXXXXXX"
|
||||
wrap = true
|
||||
[/label]
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
[label]
|
||||
definition = "default_tiny"
|
||||
label = "•"
|
||||
label = _ "inspector tree item^•"
|
||||
[/label]
|
||||
[/column]
|
||||
#enddef
|
||||
|
|
|
@ -50,8 +50,7 @@
|
|||
wrap = true
|
||||
characters_per_line = 70
|
||||
|
||||
# This isn't localizable because the final text is set from C++ code (in order to support singular and plural forms properly)
|
||||
label = "The selected add-on has the following dependencies, which are outdated or not currently installed. Do you wish to install them before continuing?"
|
||||
# Label value omitted because the text is set from C++ code (in order to support singular and plural forms properly)
|
||||
[/label]
|
||||
[/column]
|
||||
[/row]
|
||||
|
|
|
@ -143,7 +143,7 @@
|
|||
y = 0
|
||||
w = "(text_width)"
|
||||
h = "(height)"
|
||||
text = "•"
|
||||
text = "('•')"
|
||||
font_size = {GUI_FONT_SIZE_DEFAULT}
|
||||
color = {GUI__FONT_COLOR_ENABLED__DEFAULT}
|
||||
[/text]
|
||||
|
|
|
@ -221,7 +221,6 @@
|
|||
[label]
|
||||
id = "tree_view_node_label"
|
||||
definition = "default_small"
|
||||
label = "group"
|
||||
[/label]
|
||||
|
||||
[/column]
|
||||
|
@ -235,7 +234,6 @@
|
|||
[label]
|
||||
id = "player_count"
|
||||
definition = "default_small"
|
||||
label = "group"
|
||||
[/label]
|
||||
|
||||
[/column]
|
||||
|
@ -504,7 +502,7 @@
|
|||
[button]
|
||||
id = "view_profile"
|
||||
definition = "default"
|
||||
label = "Profile"
|
||||
label = _ "Profile"
|
||||
[/button]
|
||||
[/column]
|
||||
|
||||
|
@ -515,7 +513,7 @@
|
|||
[button]
|
||||
id = "view_match_history"
|
||||
definition = "default"
|
||||
label = "Match History"
|
||||
label = _ "Match History"
|
||||
[/button]
|
||||
[/column]
|
||||
[/row]
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
[window]
|
||||
id = "mp_login"
|
||||
description =_ "Multiplayer server login dialog"
|
||||
description = "Multiplayer server login dialog"
|
||||
|
||||
[resolution]
|
||||
definition = "default"
|
||||
|
|
|
@ -93,9 +93,6 @@
|
|||
[label]
|
||||
id = "numeric_progress"
|
||||
definition = "gold_small"
|
||||
# NOTE: needed to avoid explicit calls to invalidate_layout()
|
||||
# in network_transmission::pump_monitor::process()
|
||||
label = " "
|
||||
[/label]
|
||||
|
||||
[/column]
|
||||
|
|
|
@ -222,7 +222,6 @@
|
|||
[label]
|
||||
definition = "story_screen_title"
|
||||
id = "title"
|
||||
label = "Placeholder text"
|
||||
use_markup = true
|
||||
[/label]
|
||||
|
||||
|
|
|
@ -256,8 +256,10 @@ where
|
|||
{_GUI_BUTTON "preferences" _"Preferences" _"Configure the game’s settings"}
|
||||
{_GUI_BUTTON "credits" _"Credits" _"View the credits"}
|
||||
{_GUI_BUTTON "quit" _"Quit" _"Quit the game"}
|
||||
# This debug feature doesn't need to be translated.
|
||||
{_GUI_BUTTON "clock" "Clock" "Show debug clock"}
|
||||
# This debug feature doesn't need to be translated, so put it in the test textdomain.
|
||||
#textdomain wesnoth-test
|
||||
{_GUI_BUTTON "clock" _"Clock" _"Show debug clock"}
|
||||
#textdomain wesnoth-lib
|
||||
[/grid]
|
||||
|
||||
[/panel]
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
# wmllint: no translatables
|
||||
# wmllint: markcheck off
|
||||
#textdomain wesnoth-test
|
||||
|
||||
[test]
|
||||
name="Multiple leader test scenario"
|
||||
name=_"Multiple leader test scenario"
|
||||
map_data="
|
||||
Ww , Ww , Ww , Ww , Ww , Ww , Ww , Ww , Ww , Ww , Ww , Ww , Ww , Ww , Ww , Ww , Ww , Ww , Ww , Ww , Ww , Ww , Ww
|
||||
Ww , Ww , Wwr , Wwr , Ch , Wwr , Wwf , Ch , Kh , Ch , Wwf , Ch , Kh , Ch , Wwf , Wwr , Wwf , Ch , Kh , Ch , Wwr , Ww , Ww
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
# wmllint: no translatables
|
||||
# wmllint: markcheck off
|
||||
#textdomain wesnoth-test
|
||||
# @file data/scenario-test.cfg
|
||||
|
||||
[test]
|
||||
name="Test scenario"
|
||||
name=_"Test scenario"
|
||||
|
||||
victory_when_enemies_defeated=no
|
||||
|
||||
|
@ -61,10 +60,10 @@ Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu"
|
|||
[abilities]
|
||||
[hides]
|
||||
id=invisible
|
||||
name="invisible"
|
||||
female_name="female^invisible"
|
||||
name_inactive="invisible"
|
||||
female_name_inactive="female^invisible"
|
||||
name=_"invisible"
|
||||
female_name=_"female^invisible"
|
||||
name_inactive=_"invisible"
|
||||
female_name_inactive=_"female^invisible"
|
||||
affect_self=yes
|
||||
[/hides]
|
||||
[/abilities]
|
||||
|
@ -88,7 +87,7 @@ Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu"
|
|||
|
||||
[message]
|
||||
speaker=unit
|
||||
message="I triggered an enter hex event."
|
||||
message=_"I triggered an enter hex event."
|
||||
[/message]
|
||||
|
||||
[allow_undo]
|
||||
|
@ -106,7 +105,7 @@ Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu"
|
|||
|
||||
[message]
|
||||
speaker=unit
|
||||
message="I triggered an exit hex event."
|
||||
message=_"I triggered an exit hex event."
|
||||
[/message]
|
||||
|
||||
[allow_undo]
|
||||
|
@ -127,7 +126,7 @@ Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu"
|
|||
|
||||
[message]
|
||||
speaker=unit
|
||||
message="Get out of the way, $second_unit.name|!"
|
||||
message=_"Get out of the way, $second_unit.name|!"
|
||||
[/message]
|
||||
|
||||
[allow_undo]
|
||||
|
@ -176,7 +175,7 @@ Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu"
|
|||
[/terrain]
|
||||
[message]
|
||||
movement_cost={UNREACHABLE}
|
||||
message="The ground has collapsed beneath me!"
|
||||
message=_"The ground has collapsed beneath me!"
|
||||
[/message]
|
||||
[kill]
|
||||
movement_cost={UNREACHABLE}
|
||||
|
@ -237,7 +236,7 @@ Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu"
|
|||
|
||||
[message]
|
||||
speaker=unit
|
||||
message="I triggered a moveto event."
|
||||
message=_"I triggered a moveto event."
|
||||
[/message]
|
||||
[/event]
|
||||
|
||||
|
@ -252,15 +251,15 @@ Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu, Uu"
|
|||
|
||||
[message]
|
||||
speaker=second_unit
|
||||
message="I spy, with my little eye, something that starts with 'f'.
|
||||
message=_"I spy, with my little eye, something that starts with 'f'.
|
||||
|
||||
" + {ASIDE ("This is the first part of a sighted event.")}
|
||||
" + {ASIDE (_"This is the first part of a sighted event.")}
|
||||
[/message]
|
||||
[message]
|
||||
speaker=unit
|
||||
message="Um, ""friend""? (Hopefully not ""foe""....)
|
||||
message=_"Um, ""friend""? (Hopefully not ""foe""....)
|
||||
|
||||
" + {ASIDE ("This is the second part of a sighted event.")}
|
||||
" + {ASIDE (_"This is the second part of a sighted event.")}
|
||||
[/message]
|
||||
[allow_undo]
|
||||
[/allow_undo]
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#textdomain wesnoth-test
|
||||
[test]
|
||||
id=story
|
||||
[story]
|
||||
[part]
|
||||
music=elvish-theme.ogg
|
||||
background=story/grim-altar.jpg
|
||||
story= "SCALED"
|
||||
story= _ "SCALED"
|
||||
[/part]
|
||||
[part]
|
||||
music=elvish-theme.ogg
|
||||
|
@ -15,7 +16,7 @@
|
|||
tile_vertically=yes
|
||||
tile_horizontally=yes
|
||||
[/background_layer]
|
||||
story= "TILED"
|
||||
story= _ "TILED"
|
||||
[/part]
|
||||
[/story]
|
||||
map_data="Mm, Mm, Mm
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -11,7 +11,7 @@
|
|||
[tag]
|
||||
name="ais"
|
||||
min=1
|
||||
{SIMPLE_KEY default_ai_algorithm t_string}
|
||||
{SIMPLE_KEY default_ai_algorithm string}
|
||||
[tag]
|
||||
name="ai"
|
||||
max=infinite
|
||||
|
@ -42,7 +42,7 @@
|
|||
[tag]
|
||||
name="$generic_lua_component"
|
||||
{SIMPLE_KEY code string}
|
||||
{DATA_TAG args 0 1}
|
||||
{DATA_TAG args 0 1 any}
|
||||
[/tag]
|
||||
{./engine.cfg}
|
||||
{./aspect_complex.cfg}
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
{DEFAULT_KEY carryover_add s_bool no}
|
||||
{SIMPLE_KEY music string_list}
|
||||
{DEFAULT_KEY end_credits s_bool yes}
|
||||
{SIMPLE_KEY end_text t_string}
|
||||
{SIMPLE_KEY end_text s_t_string}
|
||||
{SIMPLE_KEY end_text_duration s_unsigned}
|
||||
{SIMPLE_KEY test_result string}
|
||||
[tag]
|
||||
|
@ -170,6 +170,7 @@
|
|||
super="units/$unit"
|
||||
{INSERT_TAG}
|
||||
{DEFAULT_KEY animate s_bool no}
|
||||
{SIMPLE_KEY name s_t_string}
|
||||
{SIMPLE_KEY to_variable string}
|
||||
[/tag]
|
||||
[tag]
|
||||
|
@ -237,9 +238,9 @@
|
|||
{REQUIRED_KEY variable string}
|
||||
{DEFAULT_KEY find_vacant s_bool no}
|
||||
{DEFAULT_KEY check_passability s_bool yes}
|
||||
{SIMPLE_KEY text t_string}
|
||||
{SIMPLE_KEY male_text t_string}
|
||||
{SIMPLE_KEY female_text t_string}
|
||||
{SIMPLE_KEY text s_t_string,int}
|
||||
{SIMPLE_KEY male_text s_t_string,int}
|
||||
{SIMPLE_KEY female_text s_t_string,int}
|
||||
{COLOR_KEYS s_unsigned} # TODO: These are probably deprecated?
|
||||
{SIMPLE_KEY color s_color}
|
||||
{DEFAULT_KEY advance s_bool yes}
|
||||
|
@ -272,8 +273,8 @@
|
|||
{SIMPLE_KEY income s_int}
|
||||
{SIMPLE_KEY recruit string_list}
|
||||
{SIMPLE_KEY team_name string}
|
||||
{SIMPLE_KEY side_name string}
|
||||
{SIMPLE_KEY user_team_name t_string}
|
||||
{SIMPLE_KEY side_name s_t_string}
|
||||
{SIMPLE_KEY user_team_name s_t_string}
|
||||
{SIMPLE_KEY gold s_int}
|
||||
{SIMPLE_KEY village_gold s_int}
|
||||
{SIMPLE_KEY controller controller}
|
||||
|
@ -313,7 +314,7 @@
|
|||
[tag]
|
||||
name="disallow_end_turn"
|
||||
max=infinite
|
||||
{DEFAULT_KEY reason t_string ""}
|
||||
{DEFAULT_KEY reason s_t_string ""}
|
||||
[/tag]
|
||||
[tag]
|
||||
name="capture_village"
|
||||
|
@ -388,9 +389,9 @@
|
|||
{DEFAULT_KEY delayed_variable_substitution s_bool no}
|
||||
{SIMPLE_KEY silent s_bool}
|
||||
{SIMPLE_KEY image string}
|
||||
{SIMPLE_KEY name t_string}
|
||||
{SIMPLE_KEY description t_string}
|
||||
{SIMPLE_KEY cannot_use_message t_string}
|
||||
{SIMPLE_KEY name s_t_string}
|
||||
{SIMPLE_KEY description s_t_string}
|
||||
{SIMPLE_KEY cannot_use_message s_t_string}
|
||||
{FILTER_TAG "filter" unit {INSERT_TAG}}
|
||||
{ACTION_TAG "then" ()}
|
||||
{ACTION_TAG "else" ()}
|
||||
|
@ -598,7 +599,7 @@
|
|||
name="custom_command"
|
||||
max=infinite
|
||||
{SIMPLE_KEY name string}
|
||||
{DATA_TAG "data" 1 1}
|
||||
{DATA_TAG "data" 1 1 string}
|
||||
[/tag]
|
||||
[/tag]
|
||||
[tag]
|
||||
|
@ -620,17 +621,17 @@
|
|||
super="$filter_unit"
|
||||
{INSERT_TAG}
|
||||
{SIMPLE_KEY speaker string}
|
||||
{SIMPLE_KEY message t_string}
|
||||
{SIMPLE_KEY male_message t_string}
|
||||
{SIMPLE_KEY female_message t_string}
|
||||
{SIMPLE_KEY wait_description t_string}
|
||||
{SIMPLE_KEY message s_t_string}
|
||||
{SIMPLE_KEY male_message s_t_string}
|
||||
{SIMPLE_KEY female_message s_t_string}
|
||||
{SIMPLE_KEY wait_description s_t_string}
|
||||
{SIMPLE_KEY side_for s_range_list}
|
||||
{SIMPLE_KEY image string}
|
||||
{SIMPLE_KEY mirror s_bool}
|
||||
{SIMPLE_KEY second_image string}
|
||||
{SIMPLE_KEY second_mirror s_bool}
|
||||
{SIMPLE_KEY image_pos image_pos}
|
||||
{SIMPLE_KEY caption t_string}
|
||||
{SIMPLE_KEY caption s_t_string}
|
||||
{DEFAULT_KEY scroll s_bool yes}
|
||||
{DEFAULT_KEY highlight s_bool yes}
|
||||
{SIMPLE_KEY sound string_list}
|
||||
|
@ -644,10 +645,10 @@
|
|||
name="option"
|
||||
max=infinite
|
||||
{INSERT_TAG}
|
||||
{DEPRECATED_KEY message t_string}
|
||||
{DEPRECATED_KEY message s_t_string}
|
||||
{SIMPLE_KEY image string}
|
||||
{SIMPLE_KEY label t_string}
|
||||
{SIMPLE_KEY description t_string}
|
||||
{SIMPLE_KEY label s_t_string}
|
||||
{SIMPLE_KEY description s_t_string}
|
||||
{SIMPLE_KEY default s_bool}
|
||||
{SIMPLE_KEY value string}
|
||||
{SHOW_IF_TAG}
|
||||
|
@ -656,7 +657,7 @@
|
|||
[tag]
|
||||
name="text_input"
|
||||
{SIMPLE_KEY variable string}
|
||||
{SIMPLE_KEY label t_string}
|
||||
{SIMPLE_KEY label s_t_string}
|
||||
{SIMPLE_KEY max_length s_unsigned}
|
||||
{SIMPLE_KEY text string}
|
||||
[/tag]
|
||||
|
@ -667,12 +668,12 @@
|
|||
super="$filter_side"
|
||||
{INSERT_TAG}
|
||||
{SIMPLE_KEY bullet string}
|
||||
{SIMPLE_KEY summary t_string}
|
||||
{SIMPLE_KEY note t_string}
|
||||
{SIMPLE_KEY victory_string t_string}
|
||||
{SIMPLE_KEY defeat_string t_string}
|
||||
{SIMPLE_KEY gold_carryover_string t_string}
|
||||
{SIMPLE_KEY notes_string t_string}
|
||||
{SIMPLE_KEY summary s_t_string}
|
||||
{SIMPLE_KEY note s_t_string}
|
||||
{SIMPLE_KEY victory_string s_t_string}
|
||||
{SIMPLE_KEY defeat_string s_t_string}
|
||||
{SIMPLE_KEY gold_carryover_string s_t_string}
|
||||
{SIMPLE_KEY notes_string s_t_string}
|
||||
{DEFAULT_KEY silent s_bool no}
|
||||
{DEFAULT_KEY delayed_variable_substitution s_bool no}
|
||||
[tag]
|
||||
|
@ -686,8 +687,8 @@
|
|||
name="objective"
|
||||
max=infinite
|
||||
super="$action_wml/objectives/objective~base"
|
||||
{SIMPLE_KEY description t_string}
|
||||
{SIMPLE_KEY caption t_string}
|
||||
{SIMPLE_KEY description s_t_string}
|
||||
{SIMPLE_KEY caption s_t_string}
|
||||
{SIMPLE_KEY condition objective_condition}
|
||||
{DEFAULT_KEY show_turn_counter s_bool no}
|
||||
[/tag]
|
||||
|
@ -702,7 +703,7 @@
|
|||
name="note"
|
||||
max=infinite
|
||||
super="$action_wml/objectives/objective~base"
|
||||
{SIMPLE_KEY description t_string}
|
||||
{SIMPLE_KEY description s_t_string}
|
||||
[/tag]
|
||||
[/tag]
|
||||
[tag]
|
||||
|
@ -710,7 +711,7 @@
|
|||
max=infinite
|
||||
{INSERT_TAG}
|
||||
{SIMPLE_KEY id string}
|
||||
{SIMPLE_KEY description t_string}
|
||||
{SIMPLE_KEY description s_t_string}
|
||||
{SIMPLE_KEY image string}
|
||||
{DEPRECATED_KEY needs_select s_bool}
|
||||
{DEFAULT_KEY synced s_bool yes}
|
||||
|
@ -760,7 +761,7 @@
|
|||
[tag]
|
||||
name="print"
|
||||
max=infinite
|
||||
{SIMPLE_KEY text t_string}
|
||||
{SIMPLE_KEY text s_t_string}
|
||||
{SIMPLE_KEY size s_unsigned}
|
||||
{SIMPLE_KEY duration s_unsigned}
|
||||
{COLOR_KEYS s_unsigned}
|
||||
|
@ -888,9 +889,9 @@
|
|||
max=infinite
|
||||
{REQUIRED_KEY flag string}
|
||||
{SIMPLE_KEY hits anim_hits}
|
||||
{SIMPLE_KEY text t_string}
|
||||
{SIMPLE_KEY male_text t_string}
|
||||
{SIMPLE_KEY female_text t_string}
|
||||
{SIMPLE_KEY text s_t_string,int}
|
||||
{SIMPLE_KEY male_text s_t_string,int}
|
||||
{SIMPLE_KEY female_text s_t_string,int}
|
||||
{COLOR_KEYS s_unsigned}
|
||||
{SIMPLE_KEY with_bars s_bool}
|
||||
{FILTER_TAG "filter" unit {INSERT_TAG}}
|
||||
|
@ -915,7 +916,7 @@
|
|||
max=infinite
|
||||
super="$filter_location"
|
||||
{INSERT_TAG}
|
||||
{REQUIRED_KEY text t_string}
|
||||
{REQUIRED_KEY text s_t_string,int}
|
||||
{SIMPLE_KEY color s_color}
|
||||
[/tag]
|
||||
[tag]
|
||||
|
@ -929,7 +930,7 @@
|
|||
[tag]
|
||||
name="wml_message"
|
||||
max=infinite
|
||||
{SIMPLE_KEY message string}
|
||||
{SIMPLE_KEY message any}
|
||||
{SIMPLE_KEY logger logger}
|
||||
{SIMPLE_KEY to_chat s_bool}
|
||||
[/tag]
|
||||
|
@ -972,11 +973,11 @@
|
|||
max=infinite
|
||||
{INSERT_TAG}
|
||||
{REQUIRED_KEY name string}
|
||||
{SIMPLE_KEY value string}
|
||||
{SIMPLE_KEY literal string}
|
||||
{SIMPLE_KEY value any}
|
||||
{SIMPLE_KEY literal any}
|
||||
{SIMPLE_KEY to_variable string}
|
||||
{SIMPLE_KEY suffix string}
|
||||
{SIMPLE_KEY prefix string}
|
||||
{SIMPLE_KEY suffix any}
|
||||
{SIMPLE_KEY prefix any}
|
||||
{SIMPLE_KEY add s_real}
|
||||
{SIMPLE_KEY sub s_real}
|
||||
{SIMPLE_KEY multiply s_real}
|
||||
|
@ -1012,8 +1013,8 @@
|
|||
[/not]
|
||||
[then]
|
||||
{SIMPLE_KEY mode set_variables_mode}
|
||||
{DATA_TAG value 0 infinite}
|
||||
{DATA_TAG literal 0 infinite}
|
||||
{DATA_TAG value 0 infinite any}
|
||||
{DATA_TAG literal 0 infinite any}
|
||||
[tag]
|
||||
name="split"
|
||||
max=infinite
|
||||
|
@ -1512,7 +1513,7 @@
|
|||
[else]
|
||||
# For unknown ai_type, accept anything
|
||||
any_tag=yes
|
||||
{ANY_KEY string}
|
||||
{ANY_KEY any}
|
||||
[/else]
|
||||
[/switch]
|
||||
[/then]
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
[/then]
|
||||
[/if]
|
||||
{SIMPLE_KEY terrain_liked terrain_list}
|
||||
{DATA_TAG "world_conquest_data" 0 1}
|
||||
{DATA_TAG "world_conquest_data" 0 1 any}
|
||||
[/tag]
|
||||
|
||||
[tag]
|
||||
|
@ -160,7 +160,7 @@
|
|||
{SIMPLE_KEY remove_advancement string}
|
||||
{SIMPLE_KEY set_experience int}
|
||||
[/tag]
|
||||
{DATA_TAG "world_conquest_data" 0 1}
|
||||
{DATA_TAG "world_conquest_data" 0 1 any}
|
||||
[/tag]
|
||||
[tag]
|
||||
name="campaign"
|
||||
|
@ -328,7 +328,7 @@
|
|||
[tag]
|
||||
name="story"
|
||||
max=infinite
|
||||
{SIMPLE_KEY title string}
|
||||
{SIMPLE_KEY title t_string}
|
||||
{INSERT_TAG}
|
||||
[tag]
|
||||
name="part"
|
||||
|
@ -437,8 +437,8 @@
|
|||
max=infinite
|
||||
{SIMPLE_KEY x s_range_list}
|
||||
{SIMPLE_KEY y s_range_list}
|
||||
{SIMPLE_KEY text t_string}
|
||||
{SIMPLE_KEY tooltip t_string} # Is this documented?
|
||||
{SIMPLE_KEY text s_t_string}
|
||||
{SIMPLE_KEY tooltip s_t_string} # Is this documented?
|
||||
{SIMPLE_KEY immutable s_bool}
|
||||
{SIMPLE_KEY visible_in_fog s_bool}
|
||||
{SIMPLE_KEY visible_in_shroud s_bool}
|
||||
|
@ -543,7 +543,7 @@
|
|||
[/then]
|
||||
[/elseif]
|
||||
[/if]
|
||||
{DATA_TAG variables 0 1}
|
||||
{DATA_TAG variables 0 1 any}
|
||||
# TODO: These are needed here for MP campaigns... can we work around that somehow?
|
||||
{SIMPLE_KEY new_game_title t_string}
|
||||
{BASE_COMPATIBILITY_KEYS}
|
||||
|
|
|
@ -25,17 +25,17 @@
|
|||
max=infinite
|
||||
{INSERT_TAG}
|
||||
{SIMPLE_KEY name string}
|
||||
{SIMPLE_KEY contains string}
|
||||
{SIMPLE_KEY equals string}
|
||||
{SIMPLE_KEY not_equals string}
|
||||
{SIMPLE_KEY numerical_equals string}
|
||||
{SIMPLE_KEY numerical_not_equals string}
|
||||
{SIMPLE_KEY greater_than string}
|
||||
{SIMPLE_KEY greater_than_equal_to string}
|
||||
{SIMPLE_KEY less_than string}
|
||||
{SIMPLE_KEY less_than_equal_to string}
|
||||
{SIMPLE_KEY boolean_equals string}
|
||||
{SIMPLE_KEY boolean_not_equals string}
|
||||
{SIMPLE_KEY contains any}
|
||||
{SIMPLE_KEY equals any}
|
||||
{SIMPLE_KEY not_equals any}
|
||||
{SIMPLE_KEY numerical_equals s_int}
|
||||
{SIMPLE_KEY numerical_not_equals s_int}
|
||||
{SIMPLE_KEY greater_than s_int}
|
||||
{SIMPLE_KEY greater_than_equal_to s_int}
|
||||
{SIMPLE_KEY less_than s_int}
|
||||
{SIMPLE_KEY less_than_equal_to s_int}
|
||||
{SIMPLE_KEY boolean_equals s_bool}
|
||||
{SIMPLE_KEY boolean_not_equals s_bool}
|
||||
{SIMPLE_KEY formula formula}
|
||||
[/tag]
|
||||
[tag]
|
||||
|
|
|
@ -215,7 +215,7 @@
|
|||
[tag]
|
||||
name="entry"
|
||||
max=infinite
|
||||
{SIMPLE_KEY name string}
|
||||
{SIMPLE_KEY name any}
|
||||
{SIMPLE_KEY comment string}
|
||||
{SIMPLE_KEY email string}
|
||||
{SIMPLE_KEY wikiuser string}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
{SIMPLE_KEY create_map string}
|
||||
{SIMPLE_KEY create_scenario string}
|
||||
{SIMPLE_KEY user_config string}
|
||||
{SIMPLE_KEY config_name string}
|
||||
{SIMPLE_KEY config_name t_string}
|
||||
# Additional contents for Lua cave map generator
|
||||
[if]
|
||||
glob_on_create_map=*cave_map_generator*
|
||||
|
|
|
@ -75,9 +75,11 @@
|
|||
name="label"
|
||||
max=infinite
|
||||
super="theme/~content~/~element~"
|
||||
{REQUIRED_KEY text t_string}
|
||||
{SIMPLE_KEY text t_string}
|
||||
{SIMPLE_KEY prefix t_string}
|
||||
{SIMPLE_KEY postfix t_string}
|
||||
{SIMPLE_KEY prefix_literal string}
|
||||
{SIMPLE_KEY postfix_literal string}
|
||||
{SIMPLE_KEY icon string}
|
||||
{SIMPLE_KEY font_size int}
|
||||
{SIMPLE_KEY font_rgb color}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
max=infinite
|
||||
{REQUIRED_KEY id string}
|
||||
{SIMPLE_KEY name t_string}
|
||||
{SIMPLE_KEY icon t_string}
|
||||
{SIMPLE_KEY icon string}
|
||||
{SIMPLE_KEY core bool}
|
||||
[/tag]
|
||||
|
||||
|
|
|
@ -453,7 +453,7 @@
|
|||
max=infinite
|
||||
{SIMPLE_KEY name string}
|
||||
{SIMPLE_KEY code string}
|
||||
{DATA_TAG args 0 1}
|
||||
{DATA_TAG args 0 1 any}
|
||||
[/tag]
|
||||
[/tag]
|
||||
[/wml_schema]
|
|
@ -78,9 +78,9 @@
|
|||
name="widget"
|
||||
min="0"
|
||||
max="infinite"
|
||||
{DEFAULT_KEY "id" t_string ""}
|
||||
{DEFAULT_KEY "id" string ""}
|
||||
{DEFAULT_KEY "icon" t_string ""}
|
||||
{DEFAULT_KEY "label" t_string ""}
|
||||
{DEFAULT_KEY "label" any ""}
|
||||
{DEFAULT_KEY "tooltip" t_string ""}
|
||||
{DEFAULT_KEY "help" t_string ""}
|
||||
[/tag]
|
||||
|
@ -231,7 +231,7 @@
|
|||
{DEFAULT_KEY "window_height" unsigned 0}
|
||||
{DEFAULT_KEY "window_width" unsigned 0}
|
||||
[/tag]
|
||||
{REQUIRED_KEY "description" t_string}
|
||||
{REQUIRED_KEY "description" string}
|
||||
{REQUIRED_KEY "id" string}
|
||||
[/tag]
|
||||
[tag]
|
||||
|
@ -999,10 +999,10 @@
|
|||
name = "option"
|
||||
min="0"
|
||||
max="infinite"
|
||||
{DEFAULT_KEY "label" string ""}
|
||||
{DEFAULT_KEY "tooltip" string ""}
|
||||
{DEFAULT_KEY "label" t_string ""}
|
||||
{DEFAULT_KEY "tooltip" t_string ""}
|
||||
{DEFAULT_KEY "icon" string ""}
|
||||
{DEFAULT_KEY "details" string ""}
|
||||
{DEFAULT_KEY "details" t_string ""}
|
||||
[/tag]
|
||||
[/tag]
|
||||
[tag]
|
||||
|
@ -1015,10 +1015,10 @@
|
|||
name = "option"
|
||||
min="0"
|
||||
max="infinite"
|
||||
{DEFAULT_KEY "label" string ""}
|
||||
{DEFAULT_KEY "tooltip" string ""}
|
||||
{DEFAULT_KEY "label" t_string ""}
|
||||
{DEFAULT_KEY "tooltip" t_string ""}
|
||||
{DEFAULT_KEY "checkbox" bool ""}
|
||||
{DEFAULT_KEY "details" string ""}
|
||||
{DEFAULT_KEY "details" t_string ""}
|
||||
[/tag]
|
||||
[/tag]
|
||||
[tag]
|
||||
|
@ -1080,6 +1080,8 @@
|
|||
min="0"
|
||||
max="infinite"
|
||||
super="generic/widget_instance"
|
||||
# Override parent label key to be non-translatable
|
||||
{DEFAULT_KEY "label" string ""}
|
||||
[/tag]
|
||||
[tag]
|
||||
name="instance"
|
||||
|
@ -1496,7 +1498,7 @@
|
|||
{DEFAULT_KEY "x" f_unsigned 0}
|
||||
{DEFAULT_KEY "y" f_unsigned 0}
|
||||
[/tag]
|
||||
{REQUIRED_KEY "description" t_string}
|
||||
{REQUIRED_KEY "description" string}
|
||||
{REQUIRED_KEY "id" string}
|
||||
[/tag]
|
||||
[tag]
|
||||
|
@ -1514,7 +1516,7 @@
|
|||
{LINK_TAG "gui/window/resolution/grid"}
|
||||
[/tag]
|
||||
[/tag]
|
||||
{REQUIRED_KEY "description" t_string}
|
||||
{REQUIRED_KEY "description" string}
|
||||
{REQUIRED_KEY "id" string}
|
||||
[/tag]
|
||||
[/tag]
|
||||
|
|
|
@ -48,13 +48,13 @@
|
|||
#enddef
|
||||
|
||||
# Defines a tag that can contain any arbitrary content
|
||||
#define DATA_TAG NAME MIN MAX
|
||||
#define DATA_TAG NAME MIN MAX TYPE
|
||||
[tag]
|
||||
name="{NAME}"
|
||||
min={MIN}
|
||||
max={MAX}
|
||||
any_tag=yes
|
||||
{SIMPLE_KEY * string}
|
||||
{SIMPLE_KEY * {TYPE}}
|
||||
[/tag]
|
||||
#enddef
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
max=infinite
|
||||
super="wml_schema/type"
|
||||
{REQUIRED_KEY name id}
|
||||
{SIMPLE_KEY allow_translatable bool}
|
||||
[if]
|
||||
[union]
|
||||
[/union]
|
||||
|
|
|
@ -29,10 +29,10 @@
|
|||
value=".*"
|
||||
[/type]
|
||||
[type]
|
||||
name=t_string
|
||||
value="_?.*"
|
||||
name=any
|
||||
value=".*"
|
||||
allow_translatable=yes
|
||||
[/type]
|
||||
|
||||
[type]
|
||||
name=char
|
||||
value="."
|
||||
|
|
|
@ -27,3 +27,4 @@
|
|||
{SUBST_TYPE real}
|
||||
{SUBST_TYPE color}
|
||||
{SUBST_TYPE point}
|
||||
{SUBST_TYPE t_string}
|
||||
|
|
|
@ -200,7 +200,7 @@
|
|||
[/case]
|
||||
[else]
|
||||
any_tag=yes
|
||||
{ANY_KEY string}
|
||||
{ANY_KEY any}
|
||||
[/else]
|
||||
[/switch]
|
||||
{WML_MERGE_KEYS}
|
||||
|
@ -240,5 +240,5 @@
|
|||
super="units/$modifications/base"
|
||||
{SIMPLE_KEY duration object_duration}
|
||||
{FILTER_TAG "filter" unit ()}
|
||||
{ANY_KEY string}
|
||||
{ANY_KEY any}
|
||||
[/tag]
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
{SIMPLE_KEY description t_string} # Not documented
|
||||
{SIMPLE_KEY flag_icon string} # Not documented
|
||||
{FILTER_TAG "filter_recall" unit ()}
|
||||
{DATA_TAG variables 0 1}
|
||||
{DATA_TAG variables 0 1 any}
|
||||
[tag]
|
||||
name="special_note"
|
||||
max="infinite"
|
||||
|
@ -55,7 +55,7 @@
|
|||
{SIMPLE_KEY formula formula}
|
||||
{SIMPLE_KEY priority formula}
|
||||
{SIMPLE_KEY loop_formula formula}
|
||||
{DATA_TAG vars 0 1}
|
||||
{DATA_TAG vars 0 1 any}
|
||||
[/tag]
|
||||
{LINK_TAG "event"}
|
||||
{LINK_TAG "units/movetype/movement_costs"}
|
||||
|
|
|
@ -111,6 +111,6 @@
|
|||
super="units/unit_type~core"
|
||||
{DEFAULT_KEY inherit bool yes}
|
||||
{REQUIRED_KEY variation_id string}
|
||||
{SIMPLE_KEY variation_name string}
|
||||
{SIMPLE_KEY variation_name t_string}
|
||||
[/tag]
|
||||
[/tag]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#textdomain wesnoth
|
||||
#textdomain wesnoth-test
|
||||
#define RETURN X
|
||||
[if]
|
||||
[variable]
|
||||
|
@ -71,7 +71,7 @@ human#endarg
|
|||
Elvish Archer#endarg
|
||||
|
||||
[test]
|
||||
name = "Unit Test " + {NAME}
|
||||
name = _ "Unit Test " + {NAME}
|
||||
map_file=test/maps/generic_unit_test.map
|
||||
turns = {TURNS}
|
||||
id = {NAME}
|
||||
|
@ -85,7 +85,7 @@ Elvish Archer#endarg
|
|||
recruit={SIDE1_RECRUIT}
|
||||
gold={SIDE1_GOLD}
|
||||
[leader]
|
||||
name = "Alice"
|
||||
name = _ "Alice"
|
||||
type = {SIDE1_LEADER}
|
||||
id=alice
|
||||
[/leader]
|
||||
|
@ -94,7 +94,7 @@ Elvish Archer#endarg
|
|||
side=2
|
||||
controller={SIDE2_CONTROLLER}
|
||||
[leader]
|
||||
name = "Bob"
|
||||
name = _ "Bob"
|
||||
type = Orcish Grunt
|
||||
id=bob
|
||||
[/leader]
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
|||
|
||||
#textdomain wesnoth-test
|
||||
#define AI_NOTIFICATION_STAGE CODE
|
||||
[ai]
|
||||
ai_algorithm=idle_ai
|
||||
|
@ -41,7 +41,7 @@ end
|
|||
|
||||
#define AI_UNIT_TEST NAME TEST_CODE TEST_ATTRIBUTE EXPECTED AIWML CONTENT
|
||||
[test]
|
||||
name = "AI Unit Test " + {NAME}
|
||||
name = _ "AI Unit Test " + {NAME}
|
||||
map_file=test/maps/generic_unit_test.map
|
||||
turns = -1
|
||||
id = {NAME}
|
||||
|
@ -52,7 +52,7 @@ end
|
|||
[side]
|
||||
side=1
|
||||
controller=computer
|
||||
name = "Alice"
|
||||
name = _ "Alice"
|
||||
type = Elvish Archer
|
||||
id=alice
|
||||
{AI_NOTIFICATION_STAGE {TEST_CODE}}
|
||||
|
@ -61,7 +61,7 @@ end
|
|||
[side]
|
||||
side=2
|
||||
controller=computer
|
||||
name = "Bob"
|
||||
name = _ "Bob"
|
||||
type = Orcish Grunt
|
||||
id=bob
|
||||
[ai]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#textdomain wesnoth-test
|
||||
### Change GENERATE_ANSWERS to 1 in the next line to generate the correct answers for the characterization test.
|
||||
### The list of answers will appear in console when you run wesnoth, after debug: messages.
|
||||
### wesnoth --nocache --log-debug=wml --noreplaycheck --unit characterize_pathfinding_reach_1
|
||||
|
@ -146,7 +147,7 @@
|
|||
|
||||
#define MAKE_TEST ID MACRO INIT_MACRO
|
||||
[test]
|
||||
name="Unit Test {ID}"
|
||||
name=_"Unit Test" + {ID}
|
||||
id={ID}
|
||||
is_unit_test = yes
|
||||
{test/maps/pathfind_1.cfg}
|
||||
|
@ -364,7 +365,7 @@
|
|||
|
||||
#define MAKE_TEST_INIT_ONLY ID MACRO INIT_MACRO
|
||||
[test]
|
||||
name="Unit Test {ID}"
|
||||
name=_"Unit Test " + {ID}
|
||||
id={ID}
|
||||
is_unit_test = yes
|
||||
{test/maps/pathfind_1.cfg}
|
||||
|
@ -402,7 +403,7 @@
|
|||
|
||||
#define MAKE_SHORT_TEST ID MACRO INIT_MACRO INIT_COUNTER
|
||||
[test]
|
||||
name="Unit Test {ID}"
|
||||
name=_"Unit Test " + {ID}
|
||||
id={ID}
|
||||
is_unit_test = yes
|
||||
{test/maps/pathfind_1.cfg}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#textdomain wesnoth-test
|
||||
# unit placed
|
||||
# prerecruit
|
||||
# recruit
|
||||
|
@ -19,7 +20,7 @@
|
|||
# ensure attacker/defender hits/misses events are triggered
|
||||
[modify_unit]
|
||||
[filter]
|
||||
name="Alice"
|
||||
id=alice
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to=defense
|
||||
|
@ -31,7 +32,7 @@
|
|||
[/modify_unit]
|
||||
[modify_unit]
|
||||
[filter]
|
||||
name="Bob"
|
||||
id=bob
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to=max_experience
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#textdomain wesnoth-test
|
||||
# petrified
|
||||
{GENERIC_UNIT_TEST "events-test_filterable2" (
|
||||
[event]
|
||||
|
@ -5,7 +6,7 @@
|
|||
# ensure the petrifying attack hits
|
||||
[modify_unit]
|
||||
[filter]
|
||||
name="Alice"
|
||||
id=alice
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to=defense
|
||||
|
@ -23,7 +24,7 @@
|
|||
[/modify_unit]
|
||||
[modify_unit]
|
||||
[filter]
|
||||
name="Bob"
|
||||
id=bob
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to=max_experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# wmllint: no translatables
|
||||
#textdomain wesnoth-test
|
||||
# This unit test defines a WML object based implementation of the "feeding" ability
|
||||
# and checks that it works. What is being tested here, beyond what is tested in
|
||||
# test_unit_map and other scenarios that test the attack pathway, is that
|
||||
|
@ -9,16 +9,13 @@
|
|||
# - this impl of feeding works
|
||||
|
||||
#define STR_FEEDING
|
||||
foo
|
||||
#enddef
|
||||
_"foo"#enddef
|
||||
|
||||
#define STR_FEEDING_EFFECT
|
||||
bar
|
||||
#enddef
|
||||
_"bar"#enddef
|
||||
|
||||
#define STR_FEEDING_DESCRIPTION
|
||||
baz
|
||||
#enddef
|
||||
_"baz"#enddef
|
||||
|
||||
#define TEST_FEEDING ID EXPECTED_INCREASE
|
||||
[store_unit]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#textdomain wesnoth-test
|
||||
# This test scenario checks unit filter [filter_vision],
|
||||
# and terrain_filter [filter_vision]. It tests what happens
|
||||
# when there is a single, there are multiple, or there are
|
||||
|
@ -5,7 +6,7 @@
|
|||
|
||||
#define TEST_FILTER_VISION_SCEN ID EVENTS
|
||||
[test]
|
||||
name = "Unit Test {ID}"
|
||||
name = _ "Unit Test " + {ID}
|
||||
map_file=test/maps/move_skip_sighted.map
|
||||
turns = 3
|
||||
id = {ID}
|
||||
|
@ -17,7 +18,7 @@
|
|||
[side]
|
||||
side=1
|
||||
controller=human
|
||||
name = "Alice"
|
||||
name = _ "Alice"
|
||||
type = Elvish Archer
|
||||
id=alice
|
||||
fog=yes
|
||||
|
@ -27,7 +28,7 @@
|
|||
[side]
|
||||
side=2
|
||||
controller=human
|
||||
name = "Bob"
|
||||
name = _ "Bob"
|
||||
type = Orcish Grunt
|
||||
id=bob
|
||||
fog=yes
|
||||
|
@ -37,7 +38,7 @@
|
|||
[side]
|
||||
side=3
|
||||
controller=human
|
||||
name = "Dave"
|
||||
name = _ "Dave"
|
||||
type = Dwarvish Fighter
|
||||
id=dave
|
||||
fog=yes
|
||||
|
@ -47,7 +48,7 @@
|
|||
[side]
|
||||
side=4
|
||||
controller=human
|
||||
name = "Charlie"
|
||||
name = _ "Charlie"
|
||||
type = Chocobone
|
||||
id=charlie
|
||||
fog=yes
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#textdomain wesnoth-test
|
||||
# This test checks that the [has_ally] tag is working as expected.
|
||||
|
||||
#define TEST_HAS_ALLY_SCEN ID EVENTS
|
||||
[test]
|
||||
name = "Unit Test {ID}"
|
||||
name = _ "Unit Test" + {ID}
|
||||
map_file=test/maps/move_skip_sighted.map
|
||||
turns = 3
|
||||
id = {ID}
|
||||
|
@ -14,7 +15,7 @@
|
|||
[side]
|
||||
side=1
|
||||
controller=human
|
||||
name = "Alice"
|
||||
name = _ "Alice"
|
||||
type = Elvish Archer
|
||||
id=alice
|
||||
fog=no
|
||||
|
@ -23,7 +24,7 @@
|
|||
[side]
|
||||
side=2
|
||||
controller=human
|
||||
name = "Bob"
|
||||
name = _ "Bob"
|
||||
type = Orcish Grunt
|
||||
id=bob
|
||||
fog=no
|
||||
|
@ -32,7 +33,7 @@
|
|||
[side]
|
||||
side=3
|
||||
controller=human
|
||||
name = "Dave"
|
||||
name = _ "Dave"
|
||||
type = Dwarvish Fighter
|
||||
id=dave
|
||||
fog=no
|
||||
|
@ -41,7 +42,7 @@
|
|||
[side]
|
||||
side=4
|
||||
controller=human
|
||||
name= "Charlie"
|
||||
name= _ "Charlie"
|
||||
type = Chocobone
|
||||
id=charlie
|
||||
fog=no
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#textdomain wesnoth-test
|
||||
# This series of tests checks that the skip_sighted option of
|
||||
# [move] is being implemented correctly.
|
||||
|
||||
#define MOVE_SKIP_SIGHTED_SCEN ID STOP_X STOP_Y SKIP_SIGHTED SHARE_VIEW
|
||||
[test]
|
||||
name = "Unit Test {ID}"
|
||||
name = _ "Unit Test " + {ID}
|
||||
map_file=test/maps/move_skip_sighted.map
|
||||
turns = 3
|
||||
id = {ID}
|
||||
|
@ -15,7 +16,7 @@
|
|||
[side]
|
||||
side=1
|
||||
controller=human
|
||||
name = "Alice"
|
||||
name = _ "Alice"
|
||||
type = Elvish Archer
|
||||
id=alice
|
||||
fog=yes
|
||||
|
@ -24,7 +25,7 @@
|
|||
[side]
|
||||
side=2
|
||||
controller=human
|
||||
name = "Bob"
|
||||
name = _ "Bob"
|
||||
type = Orcish Grunt
|
||||
id=bob
|
||||
fog=yes
|
||||
|
@ -34,7 +35,7 @@
|
|||
[side]
|
||||
side=3
|
||||
controller=human
|
||||
name = "Dave"
|
||||
name = _ "Dave"
|
||||
type = Dwarvish Fighter
|
||||
id=dave
|
||||
fog=yes
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# wmllint: no translatables
|
||||
#textdomain wesnoth-test
|
||||
|
||||
# This test checks that sighted events are being triggered
|
||||
# correctly due to units moving - whether that's the viewer
|
||||
# moving and revealing hexes in the fog, or whether that's
|
||||
# the enemy units moving into the already-revealed hexes.
|
||||
[test]
|
||||
name = "Unit Test sighted_on_move"
|
||||
name = _ "Unit Test sighted_on_move"
|
||||
map_file=test/maps/sighted_events.map
|
||||
turns = 4
|
||||
id = sighted_on_move
|
||||
|
@ -17,7 +17,7 @@
|
|||
[side]
|
||||
side=1
|
||||
controller=human
|
||||
name = "Alice"
|
||||
name = _ "Alice"
|
||||
type = Elvish Archer
|
||||
id=alice
|
||||
fog=yes
|
||||
|
@ -25,7 +25,7 @@
|
|||
[side]
|
||||
side=2
|
||||
controller=human
|
||||
name = "Bob"
|
||||
name = _ "Bob"
|
||||
type = Orcish Grunt
|
||||
id=bob
|
||||
# For simplicity of counting the triggered events, disable fog so that
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#textdomain wesnoth-test
|
||||
# This test is called "simple" find_path because the expected values are hand-coded by
|
||||
# the developer. This is in contrast to the characterize_pathfinding_* tests, which
|
||||
# need the expected answers to be generated automatically.
|
||||
|
@ -40,7 +41,7 @@
|
|||
#enddef
|
||||
|
||||
[test]
|
||||
name = "Unit Test simple_find_path"
|
||||
name = _ "Unit Test simple_find_path"
|
||||
map_file=test/maps/simple_find_path.map
|
||||
turns = 1
|
||||
id = simple_find_path
|
||||
|
@ -52,7 +53,7 @@
|
|||
[side]
|
||||
side=1
|
||||
controller=human
|
||||
name = "Alice"
|
||||
name = _ "Alice"
|
||||
type = Elvish Archer
|
||||
id=alice
|
||||
fog=no
|
||||
|
@ -62,7 +63,7 @@
|
|||
[side]
|
||||
side=2
|
||||
controller=human
|
||||
name = "Bob"
|
||||
name = _ "Bob"
|
||||
type = Orcish Grunt
|
||||
id=bob
|
||||
fog=no
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# wmllint: no translatables
|
||||
#textdomain wesnoth-test
|
||||
|
||||
#define ASSERT_ALICE_VISION COUNT
|
||||
[store_reachable_locations]
|
||||
|
@ -38,7 +38,7 @@
|
|||
# Cave Hills
|
||||
# a few others that aren't reached during this test
|
||||
[test]
|
||||
name = "Unit Test store_reachable_locations_vision"
|
||||
name = _ "Unit Test store_reachable_locations_vision"
|
||||
map_file=test/maps/test_movetype.map
|
||||
turns = 1
|
||||
id = store_reachable_locations_vision
|
||||
|
@ -50,7 +50,7 @@
|
|||
[side]
|
||||
side=1
|
||||
controller=human
|
||||
name = "Alice"
|
||||
name = _ "Alice"
|
||||
type = Elvish Archer
|
||||
id=alice
|
||||
fog=no
|
||||
|
@ -60,7 +60,7 @@
|
|||
[side]
|
||||
side=2
|
||||
controller=human
|
||||
name = "Bob"
|
||||
name = _ "Bob"
|
||||
type = Orcish Grunt
|
||||
id=bob
|
||||
fog=no
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#textdomain wesnoth-test
|
||||
# This unit test is used for verify the work of abilities used like weapons, but also of special_id_active attribute.
|
||||
# Here, the teacher and student are different units for verify what abilities was applied to adjacent units but also what special_id_active checking to student unit work.
|
||||
|
||||
|
@ -37,14 +38,14 @@ affect_allies=yes
|
|||
name=start
|
||||
[unit]
|
||||
id=alex
|
||||
name="Alex"
|
||||
name=_"Alex"
|
||||
x,y=12,4
|
||||
type=Elvish Hero
|
||||
side=1
|
||||
[/unit]
|
||||
[unit]
|
||||
id=ben
|
||||
name="Ben"
|
||||
name=_"Ben"
|
||||
x,y=14,3
|
||||
type=Orcish Warrior
|
||||
side=2
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#textdomain wesnoth-test
|
||||
# This unit test is used for verify the work of abilities used like weapons, but also of special_id_active attribute.
|
||||
# Here, the teacher and student are different units for verify what abilities was applied to adjacent units but also what special_id_active checking to student unit work,
|
||||
# and what a without a weapon specials with id match special_id_active, then it will be a fail in work of ability filtered.
|
||||
|
@ -38,14 +39,14 @@ affect_allies=yes
|
|||
name=start
|
||||
[unit]
|
||||
id=alex
|
||||
name="Alex"
|
||||
name=_"Alex"
|
||||
x,y=12,4
|
||||
type=Elvish Hero
|
||||
side=1
|
||||
[/unit]
|
||||
[unit]
|
||||
id=ben
|
||||
name="Ben"
|
||||
name=_"Ben"
|
||||
x,y=14,3
|
||||
type=Orcish Warrior
|
||||
side=2
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#textdomain wesnoth-test
|
||||
# This unit test is used for verify the work of abilities used like weapons, but also what leadership can be filtered by special_id_active attribute
|
||||
# like weapons specials and abilities used like weapons.
|
||||
|
||||
|
@ -40,14 +41,14 @@ affect_allies=yes
|
|||
name=start
|
||||
[unit]
|
||||
id=alex
|
||||
name="Alex"
|
||||
name=_"Alex"
|
||||
x,y=12,4
|
||||
type=Elvish Hero
|
||||
side=1
|
||||
[/unit]
|
||||
[unit]
|
||||
id=ben
|
||||
name="Ben"
|
||||
name=_"Ben"
|
||||
x,y=14,3
|
||||
type=Orcish Warrior
|
||||
side=2
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#textdomain wesnoth-test
|
||||
# This unit test is used for verify the work of abilities used like weapons, but also what leadership can be filtered by special_id_active attribute
|
||||
# like weapons specials and abilities used like weapons. Here [leadership] id tested is different of name checked by special_id_active attribute
|
||||
# and must be cause a fail.
|
||||
|
@ -41,14 +42,14 @@ affect_allies=yes
|
|||
name=start
|
||||
[unit]
|
||||
id=alex
|
||||
name="Alex"
|
||||
name=_"Alex"
|
||||
x,y=12,4
|
||||
type=Elvish Hero
|
||||
side=1
|
||||
[/unit]
|
||||
[unit]
|
||||
id=ben
|
||||
name="Ben"
|
||||
name=_"Ben"
|
||||
x,y=14,3
|
||||
type=Orcish Warrior
|
||||
side=2
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#textdomain wesnoth-test
|
||||
# This series of tests checks that scenarios are ending as appropriate.
|
||||
|
||||
#define TEST_CHECK_VICTORY_SCEN ID DC1 DC2 DC3 DC4 TWO_THREE_CONTROLLER VWED EVENTS
|
||||
[test]
|
||||
name = "Unit Test {ID}"
|
||||
name = _ "Unit Test " + {ID}
|
||||
map_file=test/maps/move_skip_sighted.map
|
||||
turns = 3
|
||||
id = {ID}
|
||||
|
@ -15,7 +16,7 @@
|
|||
[side]
|
||||
side=1
|
||||
controller=human
|
||||
name = "Alice"
|
||||
name = _ "Alice"
|
||||
type = Elvish Archer
|
||||
id=alice
|
||||
fog=no
|
||||
|
@ -26,7 +27,7 @@
|
|||
[side]
|
||||
side=2
|
||||
controller={TWO_THREE_CONTROLLER}
|
||||
name = "Bob"
|
||||
name = _ "Bob"
|
||||
type = Orcish Grunt
|
||||
id=bob
|
||||
fog=no
|
||||
|
@ -37,7 +38,7 @@
|
|||
[side]
|
||||
side=3
|
||||
controller={TWO_THREE_CONTROLLER}
|
||||
name = "Dave"
|
||||
name = _ "Dave"
|
||||
type = Dwarvish Fighter
|
||||
id=dave
|
||||
fog=no
|
||||
|
@ -48,7 +49,7 @@
|
|||
[side]
|
||||
side=4
|
||||
controller=human
|
||||
name= "Charlie"
|
||||
name= _ "Charlie"
|
||||
type = Chocobone
|
||||
id=charlie
|
||||
fog=no
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#textdomain wesnoth-test
|
||||
{GENERIC_UNIT_TEST "test_create_side" (
|
||||
[event]
|
||||
name=start
|
||||
|
@ -19,7 +20,7 @@
|
|||
# Try making some modifications to the side
|
||||
[unit]
|
||||
side=3
|
||||
name="Charlie"
|
||||
name=_"Charlie"
|
||||
type=Chocobone
|
||||
id=charlie
|
||||
canrecruit=yes
|
||||
|
@ -45,7 +46,7 @@
|
|||
[/modify_side]
|
||||
[unit]
|
||||
side=4
|
||||
name="Dave"
|
||||
name=_"Dave"
|
||||
type=Dwarvish Fighter
|
||||
id=dave
|
||||
canrecruit=yes
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#textdomain wesnoth-test
|
||||
# This test checks the total damage of grunts with no traits vs 0% defense
|
||||
# elvish archers, at various times of day.
|
||||
#
|
||||
|
@ -35,7 +36,7 @@
|
|||
#enddef
|
||||
|
||||
[test]
|
||||
name = "Unit Test test_grunt_tod_damage"
|
||||
name = _ "Unit Test test_grunt_tod_damage"
|
||||
map_file=test/maps/test_grunt_tod_damage.map
|
||||
turns = 7
|
||||
id = test_grunt_tod_damage
|
||||
|
@ -47,14 +48,14 @@
|
|||
[side]
|
||||
side=1
|
||||
controller=human
|
||||
name = "Alice"
|
||||
name = _ "Alice"
|
||||
type = Elvish Archer
|
||||
id=alice
|
||||
[/side]
|
||||
[side]
|
||||
side=2
|
||||
controller=human
|
||||
name = "Bob"
|
||||
name = _ "Bob"
|
||||
type = Orcish Grunt
|
||||
id=bob
|
||||
[/side]
|
||||
|
@ -97,7 +98,7 @@
|
|||
#
|
||||
|
||||
[test]
|
||||
name = "Unit Test test_time_area_damage"
|
||||
name = _ "Unit Test test_time_area_damage"
|
||||
map_file=test/maps/test_grunt_tod_damage.map
|
||||
turns = 7
|
||||
id = test_time_area_damage
|
||||
|
@ -109,14 +110,14 @@
|
|||
[side]
|
||||
side=1
|
||||
controller=human
|
||||
name = "Alice"
|
||||
name = _ "Alice"
|
||||
type = Elvish Archer
|
||||
id=alice
|
||||
[/side]
|
||||
[side]
|
||||
side=2
|
||||
controller=human
|
||||
name = "Bob"
|
||||
name = _ "Bob"
|
||||
type = Orcish Grunt
|
||||
id=bob
|
||||
[/side]
|
||||
|
@ -169,7 +170,7 @@
|
|||
# Test a time area declared in prestart event
|
||||
|
||||
[test]
|
||||
name = "Unit Test test_time_area_prestart"
|
||||
name = _ "Unit Test test_time_area_prestart"
|
||||
map_file=test/maps/test_grunt_tod_damage.map
|
||||
turns = 7
|
||||
id = test_time_area_prestart
|
||||
|
@ -181,14 +182,14 @@
|
|||
[side]
|
||||
side=1
|
||||
controller=human
|
||||
name = "Alice"
|
||||
name = _ "Alice"
|
||||
type = Elvish Archer
|
||||
id=alice
|
||||
[/side]
|
||||
[side]
|
||||
side=2
|
||||
controller=human
|
||||
name = "Bob"
|
||||
name = _ "Bob"
|
||||
type = Orcish Grunt
|
||||
id=bob
|
||||
[/side]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#textdomain wesnoth-test
|
||||
{GENERIC_UNIT_TEST "test_max_menu_items" (
|
||||
[event]
|
||||
name=side 1 turn
|
||||
|
@ -13,18 +14,18 @@
|
|||
name=start
|
||||
[set_menu_item]
|
||||
id=bar1
|
||||
description=foo1
|
||||
description=_"foo1"
|
||||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar2
|
||||
description=foo2
|
||||
description=_"foo2"
|
||||
[show_if]
|
||||
{VARIABLE_CONDITIONAL current_side equals 1}
|
||||
[/show_if]
|
||||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar3
|
||||
description=foo3
|
||||
description=_"foo3"
|
||||
[command]
|
||||
[chat]
|
||||
message="ASDFSAASDF"
|
||||
|
@ -33,51 +34,51 @@
|
|||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar4
|
||||
description=foo4
|
||||
description=_"foo4"
|
||||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar5
|
||||
description=foo5
|
||||
description=_"foo5"
|
||||
[show_if]
|
||||
{VARIABLE_CONDITIONAL current_side equals 1}
|
||||
[/show_if]
|
||||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar6
|
||||
description=foo6
|
||||
description=_"foo6"
|
||||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar7
|
||||
description=foo7
|
||||
description=_"foo7"
|
||||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar8
|
||||
description=foo8
|
||||
description=_"foo8"
|
||||
[/set_menu_item]
|
||||
[clear_menu_item]
|
||||
id=bar5
|
||||
[/clear_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar9
|
||||
description=foo9
|
||||
description=_"foo9"
|
||||
[show_if]
|
||||
{VARIABLE_CONDITIONAL current_side equals 1}
|
||||
[/show_if]
|
||||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar10
|
||||
description=foo10
|
||||
description=_"foo10"
|
||||
[show_if]
|
||||
{VARIABLE_CONDITIONAL current_side equals 1}
|
||||
[/show_if]
|
||||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar12
|
||||
description=foo12
|
||||
description=_"foo12"
|
||||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar13
|
||||
description=foo13
|
||||
description=_"foo13"
|
||||
[command]
|
||||
[chat]
|
||||
message="ASDFSAASDF"
|
||||
|
@ -86,35 +87,35 @@
|
|||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar14
|
||||
description=foo14
|
||||
description=_"foo14"
|
||||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar15
|
||||
description=foo15
|
||||
description=_"foo15"
|
||||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar16
|
||||
description=foo16
|
||||
description=_"foo16"
|
||||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar17
|
||||
description=foo17
|
||||
description=_"foo17"
|
||||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar18
|
||||
description=foo18
|
||||
description=_"foo18"
|
||||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar19
|
||||
description=foo19
|
||||
description=_"foo19"
|
||||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar20
|
||||
description=foo20
|
||||
description=_"foo20"
|
||||
[/set_menu_item]
|
||||
[set_menu_item]
|
||||
id=bar21
|
||||
description=foo21
|
||||
description=_"foo21"
|
||||
[/set_menu_item]
|
||||
[/event]
|
||||
)}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#textdomain wesnoth-test
|
||||
#
|
||||
# Test if wml menu items are working
|
||||
#
|
||||
|
@ -8,7 +9,7 @@
|
|||
|
||||
[set_menu_item]
|
||||
id=test1
|
||||
description="store location"
|
||||
description=_"store location"
|
||||
[command]
|
||||
{VARIABLE mx $x1}
|
||||
{VARIABLE my $y1}
|
||||
|
@ -38,7 +39,7 @@
|
|||
|
||||
[set_menu_item]
|
||||
id=test2
|
||||
description="spawn a unit"
|
||||
description=_"spawn a unit"
|
||||
[filter_location]
|
||||
[not]
|
||||
[filter]
|
||||
|
@ -74,7 +75,7 @@
|
|||
|
||||
[set_menu_item]
|
||||
id=test3
|
||||
description="Summon Troll"
|
||||
description=_"Summon Troll"
|
||||
[show_if]
|
||||
[not]
|
||||
[have_unit]
|
||||
|
@ -85,7 +86,7 @@
|
|||
[filter_location]
|
||||
[/filter_location]
|
||||
[command]
|
||||
{NAMED_LOYAL_UNIT $side_number (Troll) $x1 $y1 (MagicTroll) ("Magic Troll")}
|
||||
{NAMED_LOYAL_UNIT $side_number (Troll) $x1 $y1 (MagicTroll) (_"Magic Troll")}
|
||||
[fire_event]
|
||||
name=apply_troll_skin
|
||||
[primary_unit]
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#textdomain wesnoth-test
|
||||
# This series of tests checks that [move] handles malformed x,y lists correctly.
|
||||
|
||||
#define MOVE_MALFORMED_SCEN ID PX PY
|
||||
[test]
|
||||
name = "Unit Test {ID}"
|
||||
name = _ "Unit Test " +{ID}
|
||||
map_file=test/maps/move_skip_sighted.map
|
||||
turns = 3
|
||||
id = {ID}
|
||||
|
@ -14,7 +15,7 @@
|
|||
[side]
|
||||
side=1
|
||||
controller=human
|
||||
name = "Alice"
|
||||
name = _ "Alice"
|
||||
type = Elvish Archer
|
||||
id=alice
|
||||
fog=yes
|
||||
|
@ -23,7 +24,7 @@
|
|||
[side]
|
||||
side=2
|
||||
controller=human
|
||||
name = "Bob"
|
||||
name = _ "Bob"
|
||||
type = Orcish Grunt
|
||||
id=bob
|
||||
fog=yes
|
||||
|
@ -33,7 +34,7 @@
|
|||
[side]
|
||||
side=3
|
||||
controller=human
|
||||
name = "Dave"
|
||||
name = _ "Dave"
|
||||
type = Dwarvish Fighter
|
||||
id=dave
|
||||
fog=yes
|
||||
|
@ -65,7 +66,7 @@
|
|||
{MOVE_MALFORMED_SCEN test_move_fail_2 (16,15,14,13,12,11) (3,3,3,3,3,3,3)}
|
||||
{MOVE_MALFORMED_SCEN test_move_fail_3 (16,15,14,13,12,11) (3,3,3,3,3)}
|
||||
{MOVE_MALFORMED_SCEN test_move_fail_4 (16,15,14,13,12) (3,3,3,3,3,3)}
|
||||
#ifndef SCHEMA_SHOULD_SKIP_THIS
|
||||
#ifndef SCHEMA_VALIDATION
|
||||
{MOVE_MALFORMED_SCEN test_move_fail_5 (16,15,chicken,13,12,11) (3,3,3,3,3,3)}
|
||||
{MOVE_MALFORMED_SCEN test_move_fail_6 (16,15,14,13,12,11) (3,3,3,3,3,bock)}
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#textdomain wesnoth-test
|
||||
# This series of tests checks that the C++ movetype class handles changes to movetypes correctly.
|
||||
|
||||
# The map defines a location_id "destination", and from both start points the path to it is
|
||||
|
@ -29,7 +30,7 @@
|
|||
|
||||
#define MOVETYPE_MOVE_SCEN ID ALICE_TYPE ALICE_MOVE_COSTS BOB_MOVE_COSTS ALICE_MODIFICATION
|
||||
[test]
|
||||
name = "Unit Test {ID}"
|
||||
name = _ "Unit Test " +{ID}
|
||||
map_file=test/maps/test_movetype.map
|
||||
turns = 1
|
||||
id = {ID}
|
||||
|
@ -41,7 +42,7 @@
|
|||
[side]
|
||||
side=1
|
||||
controller=human
|
||||
name = "Alice"
|
||||
name = _ "Alice"
|
||||
type = {ALICE_TYPE}
|
||||
id=alice
|
||||
fog=no
|
||||
|
@ -51,7 +52,7 @@
|
|||
[side]
|
||||
side=2
|
||||
controller=human
|
||||
name = "Bob"
|
||||
name = _ "Bob"
|
||||
type = Orcish Grunt
|
||||
id=bob
|
||||
fog=no
|
||||
|
@ -155,7 +156,7 @@
|
|||
# tests.
|
||||
#define MOVETYPE_VISION_SCEN ID ALICE_TYPE ALICE_VISION_COSTS ALICE_MODIFICATION
|
||||
[test]
|
||||
name = "Unit Test {ID}"
|
||||
name = _ "Unit Test " + {ID}
|
||||
map_file=test/maps/test_movetype.map
|
||||
turns = 1
|
||||
id = {ID}
|
||||
|
@ -167,7 +168,7 @@
|
|||
[side]
|
||||
side=1
|
||||
controller=human
|
||||
name = "Alice"
|
||||
name = _ "Alice"
|
||||
type = {ALICE_TYPE}
|
||||
id=alice
|
||||
fog=yes
|
||||
|
@ -177,7 +178,7 @@
|
|||
[side]
|
||||
side=2
|
||||
controller=human
|
||||
name = "Bob"
|
||||
name = _ "Bob"
|
||||
type = Orcish Grunt
|
||||
id=bob
|
||||
fog=yes
|
||||
|
|
|
@ -115,7 +115,7 @@ Hh, Hh"#enddef
|
|||
{TERRAIN_MASK_TEST align_raw_on_even {HILLS_SQUARE} (POS=10,1) (ALIGNMENT=raw) (POST_MASK={ASSERT_LOCATION_TERRAIN_SQUARE_2X2 10 1 10 2 11 1 11 2 Hh})}
|
||||
|
||||
# The deprecated alignment modes work
|
||||
#ifndef SCHEMA_SHOULD_SKIP_THIS
|
||||
#ifndef SCHEMA_VALIDATION
|
||||
{TERRAIN_MASK_TEST deprecated_border_no {HILLS_SQUARE} (POS=1,1) (POST_MASK=
|
||||
[+terrain_mask]
|
||||
border=no
|
||||
|
|
|
@ -179,7 +179,6 @@
|
|||
[label]
|
||||
id=gold-icon
|
||||
icon=themes/gold.png
|
||||
text= ""
|
||||
ref=gold-box-center
|
||||
rect="=+1,=-1,+17,+17"
|
||||
xanchor=fixed
|
||||
|
@ -188,7 +187,6 @@
|
|||
[label]
|
||||
id=villages-icon
|
||||
icon=themes/villages.png
|
||||
text= ""
|
||||
ref=villages-box-center
|
||||
rect="=+1,=-1,+17,+17"
|
||||
xanchor=fixed
|
||||
|
@ -197,7 +195,6 @@
|
|||
[label]
|
||||
id=units-icon
|
||||
icon=themes/units.png
|
||||
text= ""
|
||||
ref=units-box-center
|
||||
rect="=+1,=-1,+17,+17"
|
||||
xanchor=fixed
|
||||
|
@ -206,7 +203,6 @@
|
|||
[label]
|
||||
id=upkeep-icon
|
||||
icon=themes/upkeep.png
|
||||
text= ""
|
||||
ref=upkeep-box-center
|
||||
rect="=+1,=-1,+25,+17"
|
||||
xanchor=fixed
|
||||
|
@ -215,7 +211,6 @@
|
|||
[label]
|
||||
id=income-icon
|
||||
icon=themes/income.png
|
||||
text= ""
|
||||
ref=income-box-center
|
||||
rect="=+1,=-1,+25,+17"
|
||||
xanchor=fixed
|
||||
|
@ -297,8 +292,6 @@
|
|||
rect="+4,=-2,+65,+16"
|
||||
xanchor=fixed
|
||||
yanchor=fixed
|
||||
prefix="" #wmllint: ignore
|
||||
prefix_literal=""
|
||||
[/turn]
|
||||
[gold]
|
||||
id=gold
|
||||
|
@ -307,8 +300,6 @@
|
|||
rect="+4,=-2,+55,+16"
|
||||
xanchor=fixed
|
||||
yanchor=fixed
|
||||
prefix="" #wmllint: ignore
|
||||
prefix_literal=""
|
||||
[/gold]
|
||||
[villages]
|
||||
id=villages
|
||||
|
@ -317,8 +308,6 @@
|
|||
rect="+4,=-2,+55,+16"
|
||||
xanchor=fixed
|
||||
yanchor=fixed
|
||||
prefix="" #wmllint: ignore
|
||||
prefix_literal=""
|
||||
[/villages]
|
||||
[num_units]
|
||||
id=num-units
|
||||
|
@ -327,8 +316,6 @@
|
|||
rect="+4,=-2,+55,+16"
|
||||
xanchor=fixed
|
||||
yanchor=fixed
|
||||
prefix="" #wmllint: ignore
|
||||
prefix_literal=""
|
||||
[/num_units]
|
||||
[upkeep]
|
||||
id=status-upkeep
|
||||
|
@ -337,8 +324,6 @@
|
|||
rect="+4,=-2,+50,+16"
|
||||
xanchor=fixed
|
||||
yanchor=fixed
|
||||
prefix="" #wmllint: ignore
|
||||
prefix_literal=""
|
||||
[/upkeep]
|
||||
[income]
|
||||
id=status-income
|
||||
|
@ -347,8 +332,6 @@
|
|||
rect="+4,=-2,+60,+16"
|
||||
xanchor=fixed
|
||||
yanchor=fixed
|
||||
prefix="" #wmllint: ignore
|
||||
prefix_literal=""
|
||||
[/income]
|
||||
[battery]
|
||||
id=status-battery
|
||||
|
@ -357,8 +340,6 @@
|
|||
rect="=+5,=-3,+80,+18"
|
||||
xanchor=fixed
|
||||
yanchor=fixed
|
||||
prefix="" #wmllint: ignore
|
||||
prefix_literal=""
|
||||
[/battery]
|
||||
|
||||
{COUNTDOWN_THEME_STATUS {DEFAULT_FONT_SMALL}}
|
||||
|
@ -413,7 +394,7 @@
|
|||
yanchor=fixed
|
||||
[/unit_level]
|
||||
[unit_alignment]
|
||||
prefix= " "
|
||||
prefix_literal=" "
|
||||
font_rgb={FONT_RGB_LEVEL1}
|
||||
ref=unit-type
|
||||
id=unit-alignment
|
||||
|
@ -423,7 +404,7 @@
|
|||
yanchor=fixed
|
||||
[/unit_alignment]
|
||||
[unit_abilities]
|
||||
prefix= " "
|
||||
prefix_literal=" "
|
||||
# prefix_literal=" "
|
||||
font_rgb={FONT_RGB_LEVEL1}
|
||||
id=unit-abilities
|
||||
|
@ -442,7 +423,7 @@
|
|||
[unit_traits]
|
||||
#ref=unit-type
|
||||
id=unit-traits
|
||||
prefix= " "
|
||||
prefix_literal=" "
|
||||
font_size={DEFAULT_FONT_SMALL}
|
||||
font_rgb={FONT_RGB_LEVEL1}
|
||||
rect="=,+0,1022,+18"
|
||||
|
|
|
@ -815,8 +815,6 @@
|
|||
# rect="+4,=,+55,+16"
|
||||
# xanchor=fixed
|
||||
# yanchor=fixed
|
||||
# prefix="" #wmllint: ignore
|
||||
# prefix_literal=""
|
||||
# [/turn]
|
||||
|
||||
# TODO maybe enable for the high resolution version
|
||||
|
@ -835,8 +833,6 @@
|
|||
rect="+4,=,+55,+16"
|
||||
xanchor=fixed
|
||||
yanchor=fixed
|
||||
prefix="" #wmllint: ignore
|
||||
prefix_literal=""
|
||||
[/villages]
|
||||
[num_units]
|
||||
id=num-units
|
||||
|
@ -845,8 +841,6 @@
|
|||
rect="+4,=-2,+55,+16"
|
||||
xanchor=fixed
|
||||
yanchor=fixed
|
||||
prefix="" #wmllint: ignore
|
||||
prefix_literal=""
|
||||
[/num_units]
|
||||
[/status]
|
||||
[/resolution]
|
||||
|
|
|
@ -113,6 +113,9 @@ void network_transmission::pre_show(window& window)
|
|||
subtitle_label.set_use_markup(true);
|
||||
}
|
||||
|
||||
// NOTE: needed to avoid explicit calls to invalidate_layout()
|
||||
// in network_transmission::pump_monitor::process()
|
||||
find_widget<label>(&window, "numeric_progress", false).set_label(" ");
|
||||
pump_monitor_.window_ = window;
|
||||
}
|
||||
|
||||
|
|
|
@ -344,7 +344,7 @@ void parser::parse_variable()
|
|||
}
|
||||
|
||||
if(validator_) {
|
||||
validator_->validate_key(cfg, *curvar, buffer.value(), tok_.get_start_line(), tok_.get_file());
|
||||
validator_->validate_key(cfg, *curvar, cfg[*curvar], tok_.get_start_line(), tok_.get_file());
|
||||
}
|
||||
|
||||
buffer = t_string_base();
|
||||
|
@ -427,7 +427,7 @@ finish:
|
|||
}
|
||||
|
||||
if(validator_) {
|
||||
validator_->validate_key(cfg, *curvar, buffer.value(), tok_.get_start_line(), tok_.get_file());
|
||||
validator_->validate_key(cfg, *curvar, cfg[*curvar], tok_.get_start_line(), tok_.get_file());
|
||||
}
|
||||
|
||||
while(++curvar != variables.end()) {
|
||||
|
|
|
@ -22,6 +22,29 @@
|
|||
#include "config.hpp"
|
||||
#include <optional>
|
||||
|
||||
struct is_translatable
|
||||
{
|
||||
bool empty;
|
||||
is_translatable(bool b) : empty(b) {}
|
||||
bool operator()(const std::string& str) const
|
||||
{
|
||||
return str.empty() ? empty : false;
|
||||
}
|
||||
bool operator()(const t_string&) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
bool operator()(const std::monostate&) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
template<typename T>
|
||||
bool operator()(const T&) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
namespace schema_validation
|
||||
{
|
||||
|
||||
|
@ -43,7 +66,9 @@ std::shared_ptr<wml_type> wml_type::from_config(const config& cfg)
|
|||
type = std::make_shared<wml_type_list>(cfg["name"], list_cfg["split"].str("\\s*,\\s*"), list_min, list_max);
|
||||
composite_range.emplace(list_cfg.child_range("element"));
|
||||
} else if(cfg.has_attribute("value")) {
|
||||
type = std::make_shared<wml_type_simple>(cfg["name"], cfg["value"]);
|
||||
auto t = std::make_shared<wml_type_simple>(cfg["name"], cfg["value"]);
|
||||
if(cfg["allow_translatable"].to_bool()) t->allow_translatable();
|
||||
type = t;
|
||||
} else if(cfg.has_attribute("link")) {
|
||||
type = std::make_shared<wml_type_alias>(cfg["name"], cfg["link"]);
|
||||
}
|
||||
|
@ -56,13 +81,14 @@ std::shared_ptr<wml_type> wml_type::from_config(const config& cfg)
|
|||
return type;
|
||||
}
|
||||
|
||||
bool wml_type_simple::matches(const std::string& value, const map&) const
|
||||
bool wml_type_simple::matches(const config_attribute_value& value, const map&) const
|
||||
{
|
||||
if(!allow_translatable_ && value.apply_visitor(is_translatable(false))) return false;
|
||||
boost::smatch sub;
|
||||
return boost::regex_match(value, sub, pattern_);
|
||||
return boost::regex_match(value.str(), sub, pattern_);
|
||||
}
|
||||
|
||||
bool wml_type_alias::matches(const std::string& value, const map& type_map) const
|
||||
bool wml_type_alias::matches(const config_attribute_value& value, const map& type_map) const
|
||||
{
|
||||
if(!cached_) {
|
||||
auto it = type_map.find(link_);
|
||||
|
@ -75,7 +101,7 @@ bool wml_type_alias::matches(const std::string& value, const map& type_map) cons
|
|||
return cached_->matches(value, type_map);
|
||||
}
|
||||
|
||||
bool wml_type_union::matches(const std::string& value, const map& type_map) const
|
||||
bool wml_type_union::matches(const config_attribute_value& value, const map& type_map) const
|
||||
{
|
||||
for(const auto& type : subtypes_) {
|
||||
if(type->matches(value, type_map)) {
|
||||
|
@ -85,7 +111,7 @@ bool wml_type_union::matches(const std::string& value, const map& type_map) cons
|
|||
return false;
|
||||
}
|
||||
|
||||
bool wml_type_intersection::matches(const std::string& value, const map& type_map) const
|
||||
bool wml_type_intersection::matches(const config_attribute_value& value, const map& type_map) const
|
||||
{
|
||||
for(const auto& type : subtypes_) {
|
||||
if(!type->matches(value, type_map)) {
|
||||
|
@ -95,17 +121,25 @@ bool wml_type_intersection::matches(const std::string& value, const map& type_ma
|
|||
return true;
|
||||
}
|
||||
|
||||
bool wml_type_list::matches(const std::string& value, const map& type_map) const
|
||||
bool wml_type_list::matches(const config_attribute_value& value_attr, const map& type_map) const
|
||||
{
|
||||
auto value = value_attr.str();
|
||||
boost::sregex_token_iterator it(value.begin(), value.end(), split_, -1), end;
|
||||
int n = 0;
|
||||
bool result = std::all_of(it, end, [this, &type_map, &n](const boost::ssub_match& match){
|
||||
// Not sure if this is necessary?
|
||||
if(!match.matched) return true;
|
||||
n++;
|
||||
return this->wml_type_union::matches(std::string(match.first, match.second), type_map);
|
||||
config_attribute_value elem;
|
||||
elem = std::string(match.first, match.second);
|
||||
return this->wml_type_union::matches(elem, type_map);
|
||||
});
|
||||
return result && n >= min_ && n <= max_;
|
||||
}
|
||||
|
||||
bool wml_type_tstring::matches(const config_attribute_value& value, const map&) const
|
||||
{
|
||||
return value.apply_visitor(is_translatable(true));
|
||||
}
|
||||
|
||||
} // namespace schema_validation
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <boost/regex.hpp>
|
||||
|
||||
class config;
|
||||
class config_attribute_value;
|
||||
|
||||
namespace schema_validation
|
||||
{
|
||||
|
@ -39,7 +40,7 @@ public:
|
|||
explicit wml_type(const std::string& name) : name_(name) {}
|
||||
using ptr = std::shared_ptr<wml_type>;
|
||||
using map = std::map<std::string, ptr>;
|
||||
virtual bool matches(const std::string& value, const map& type_map) const = 0;
|
||||
virtual bool matches(const config_attribute_value& value, const map& type_map) const = 0;
|
||||
static std::shared_ptr<wml_type> from_config(const config& cfg);
|
||||
virtual ~wml_type() {}
|
||||
};
|
||||
|
@ -50,9 +51,11 @@ public:
|
|||
*/
|
||||
class wml_type_simple : public wml_type {
|
||||
boost::regex pattern_;
|
||||
bool allow_translatable_ = false;
|
||||
public:
|
||||
wml_type_simple(const std::string& name, const std::string& pattern) : wml_type(name), pattern_(pattern) {}
|
||||
bool matches(const std::string& value, const map& type_map) const override;
|
||||
bool matches(const config_attribute_value& value, const map& type_map) const override;
|
||||
void allow_translatable() {allow_translatable_ = true;}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -64,7 +67,7 @@ class wml_type_alias : public wml_type {
|
|||
std::string link_;
|
||||
public:
|
||||
wml_type_alias(const std::string& name, const std::string& link) : wml_type(name), link_(link) {}
|
||||
bool matches(const std::string& value, const map& type_map) const override;
|
||||
bool matches(const config_attribute_value& value, const map& type_map) const override;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -89,7 +92,7 @@ public:
|
|||
class wml_type_union : public wml_type_composite {
|
||||
public:
|
||||
explicit wml_type_union(const std::string& name) : wml_type_composite(name) {}
|
||||
bool matches(const std::string& value, const map& type_map) const override;
|
||||
bool matches(const config_attribute_value& value, const map& type_map) const override;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -99,7 +102,7 @@ public:
|
|||
class wml_type_intersection : public wml_type_composite {
|
||||
public:
|
||||
explicit wml_type_intersection(const std::string& name) : wml_type_composite(name) {}
|
||||
bool matches(const std::string& value, const map& type_map) const override;
|
||||
bool matches(const config_attribute_value& value, const map& type_map) const override;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -116,6 +119,13 @@ public:
|
|||
, min_(min)
|
||||
, max_(max)
|
||||
{}
|
||||
bool matches(const std::string& value, const map& type_map) const override;
|
||||
bool matches(const config_attribute_value& value, const map& type_map) const override;
|
||||
};
|
||||
|
||||
class wml_type_tstring : public wml_type {
|
||||
public:
|
||||
wml_type_tstring() : wml_type("t_string") {}
|
||||
bool matches(const config_attribute_value& value, const map& type_map) const override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -109,10 +109,15 @@ static void wrong_value_error(const std::string& file,
|
|||
const std::string& tag,
|
||||
const std::string& key,
|
||||
const std::string& value,
|
||||
const std::string& expected,
|
||||
bool flag_exception)
|
||||
{
|
||||
std::ostringstream ss;
|
||||
ss << "Invalid value '" << value << "' in key '" << key << "=' in tag [" << tag << "]\n" << at(file, line) << "\n";
|
||||
ss << "Invalid value '";
|
||||
if(value.length() > 128)
|
||||
ss << value.substr(0, 128) << "...";
|
||||
else ss << value;
|
||||
ss << "' in key '" << key << "=' in tag [" << tag << "]\n" << " (expected value of type " << expected << ") " << at(file, line) << "\n";
|
||||
print_output(ss.str(), flag_exception);
|
||||
}
|
||||
|
||||
|
@ -209,6 +214,7 @@ bool schema_validator::read_config_file(const std::string& filename)
|
|||
root_ = wml_tag(schema);
|
||||
}
|
||||
}
|
||||
types_["t_string"] = std::make_shared<wml_type_tstring>();
|
||||
for(const config& type : g.child_range("type")) {
|
||||
try {
|
||||
types_[type["name"].str()] = wml_type::from_config(type);
|
||||
|
@ -318,7 +324,7 @@ void schema_validator::validate(const config& cfg, const std::string& name, int
|
|||
}
|
||||
|
||||
void schema_validator::validate_key(
|
||||
const config& cfg, const std::string& name, const std::string& value, int start_line, const std::string& file)
|
||||
const config& cfg, const std::string& name, const config_attribute_value& value, int start_line, const std::string& file)
|
||||
{
|
||||
if(have_active_tag() && !active_tag().get_name().empty() && is_valid()) {
|
||||
// checking existing keys
|
||||
|
@ -334,7 +340,7 @@ void schema_validator::validate_key(
|
|||
}
|
||||
}
|
||||
if(!matched) {
|
||||
queue_message(cfg, WRONG_VALUE, file, start_line, 0, active_tag().get_name(), name, value);
|
||||
queue_message(cfg, WRONG_VALUE, file, start_line, 0, active_tag().get_name(), name, value, key->get_type());
|
||||
}
|
||||
} else {
|
||||
queue_message(cfg, EXTRA_KEY, file, start_line, 0, active_tag().get_name(), name);
|
||||
|
@ -391,7 +397,7 @@ void schema_validator::print(message_info& el)
|
|||
extra_key_error(el.file, el.line, el.tag, el.key, create_exceptions_);
|
||||
break;
|
||||
case WRONG_VALUE:
|
||||
wrong_value_error(el.file, el.line, el.tag, el.key, el.value, create_exceptions_);
|
||||
wrong_value_error(el.file, el.line, el.tag, el.key, el.value, el.expected, create_exceptions_);
|
||||
break;
|
||||
case MISSING_KEY:
|
||||
missing_key_error(el.file, el.line, el.tag, el.key, create_exceptions_);
|
||||
|
@ -403,7 +409,10 @@ schema_self_validator::schema_self_validator()
|
|||
: schema_validator(filesystem::get_wml_location("schema/schema.cfg"), false)
|
||||
, type_nesting_()
|
||||
, condition_nesting_()
|
||||
{}
|
||||
{
|
||||
defined_types_.insert("t_string");
|
||||
}
|
||||
|
||||
|
||||
void schema_self_validator::open_tag(const std::string& name, const config& parent, int start_line, const std::string& file, bool addition)
|
||||
{
|
||||
|
@ -560,7 +569,7 @@ void schema_self_validator::validate(const config& cfg, const std::string& name,
|
|||
schema_validator::validate(cfg, name, start_line, file);
|
||||
}
|
||||
|
||||
void schema_self_validator::validate_key(const config& cfg, const std::string& name, const std::string& value, int start_line, const std::string& file)
|
||||
void schema_self_validator::validate_key(const config& cfg, const std::string& name, const config_attribute_value& value, int start_line, const std::string& file)
|
||||
{
|
||||
schema_validator::validate_key(cfg, name, value, start_line, file);
|
||||
if(have_active_tag() && !active_tag().get_name().empty() && is_valid()) {
|
||||
|
@ -581,7 +590,7 @@ void schema_self_validator::validate_key(const config& cfg, const std::string& n
|
|||
derivations_.emplace(current_path(), super);
|
||||
}
|
||||
} else if(condition_nesting_ == 0 && tag_name == "tag" && name == "name") {
|
||||
tag_stack_.top() = value;
|
||||
tag_stack_.top() = value.str();
|
||||
defined_tag_paths_.insert(current_path());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
virtual void open_tag(const std::string& name, const config& parent, int start_line = 0, const std::string& file = "", bool addition = false) override;
|
||||
virtual void close_tag() override;
|
||||
virtual void validate(const config& cfg, const std::string& name, int start_line, const std::string& file) override;
|
||||
virtual void validate_key(const config& cfg, const std::string& name, const std::string& value, int start_line, const std::string& file) override;
|
||||
virtual void validate_key(const config& cfg, const std::string& name, const config_attribute_value& value, int start_line, const std::string& file) override;
|
||||
|
||||
private:
|
||||
// types section
|
||||
|
@ -98,8 +98,9 @@ protected:
|
|||
std::string tag;
|
||||
std::string key;
|
||||
std::string value;
|
||||
std::string expected;
|
||||
|
||||
message_info(message_type t, const std::string& file, int line = 0, int n = 0, const std::string& tag = "", const std::string& key = "", const std::string& value = "")
|
||||
message_info(message_type t, const std::string& file, int line = 0, int n = 0, const std::string& tag = "", const std::string& key = "", const std::string& value = "", const std::string& expected = "")
|
||||
: type(t)
|
||||
, file(file)
|
||||
, line(line)
|
||||
|
@ -107,6 +108,7 @@ protected:
|
|||
, tag(tag)
|
||||
, key(key)
|
||||
, value(value)
|
||||
, expected(expected)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -165,7 +167,7 @@ public:
|
|||
virtual void open_tag(const std::string& name, const config& parent, int start_line = 0, const std::string& file = "", bool addition = false) override;
|
||||
virtual void close_tag() override;
|
||||
virtual void validate(const config& cfg, const std::string& name, int start_line, const std::string& file) override;
|
||||
virtual void validate_key(const config& cfg, const std::string& name, const std::string& value, int start_line, const std::string& file) override;
|
||||
virtual void validate_key(const config& cfg, const std::string& name, const config_attribute_value& value, int start_line, const std::string& file) override;
|
||||
private:
|
||||
struct reference {
|
||||
reference(const std::string& value, const std::string& file, int line, const std::string& tag)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <string>
|
||||
|
||||
class config;
|
||||
|
||||
class config_attribute_value;
|
||||
extern bool strict_validation_enabled;
|
||||
|
||||
/**
|
||||
|
@ -84,7 +84,7 @@ public:
|
|||
|
||||
virtual void validate_key(const config & cfg,
|
||||
const std::string & name,
|
||||
const std::string & value,
|
||||
const config_attribute_value & value,
|
||||
int start_line,
|
||||
const std::string &file) = 0;
|
||||
/**
|
||||
|
|
|
@ -431,7 +431,7 @@ theme::label::label()
|
|||
|
||||
theme::label::label(std::size_t sw, std::size_t sh, const config& cfg)
|
||||
: object(sw, sh, cfg)
|
||||
, text_(cfg["prefix"].str() + cfg["text"].str() + cfg["postfix"].str())
|
||||
, text_(cfg["prefix"].str() + cfg["prefix_literal"].str() + cfg["text"].str() + cfg["postfix_literal"].str() + cfg["postfix"].str())
|
||||
, icon_(cfg["icon"])
|
||||
, font_(cfg["font_size"])
|
||||
, font_rgb_set_(false)
|
||||
|
|
|
@ -339,6 +339,7 @@ static int handle_validate_command(const std::string& file, abstract_validator&
|
|||
preproc_map defines_map;
|
||||
// add the WESNOTH_VERSION define
|
||||
defines_map["WESNOTH_VERSION"] = preproc_define(game_config::wesnoth_version.str());
|
||||
defines_map["SCHEMA_VALIDATION"] = preproc_define();
|
||||
for(const std::string& define : defines) {
|
||||
if(define.empty()) {
|
||||
std::cerr << "empty define supplied\n";
|
||||
|
|
|
@ -109,7 +109,7 @@ validate_schema "WML Diff" "diff" || RET=1
|
|||
validate_core "Core" || RET=1
|
||||
validate_misc "Editor" "EDITOR" || RET=1
|
||||
validate_misc "Multiplayer" "MULTIPLAYER,MULTIPLAYER_A_NEW_LAND_LOAD" || RET=1
|
||||
validate_misc "Test" "TEST,SCHEMA_SHOULD_SKIP_THIS" || RET=1
|
||||
validate_misc "Test" "TEST" || RET=1
|
||||
validate_misc "World_Conquest" "MULTIPLAYER,LOAD_WC2,LOAD_WC2_EVEN_THOUGH_IT_NEEDS_A_NEW_MAINTAINER" || RET=1
|
||||
validate_campaign "Dead_Water" "CAMPAIGN_DEAD_WATER" "EASY" "NORMAL" "HARD" "NIGHTMARE" || RET=1
|
||||
validate_campaign "Delfadors_Memoirs" "CAMPAIGN_DELFADORS_MEMOIRS" "EASY" "NORMAL" "HARD" || RET=1
|
||||
|
@ -125,7 +125,7 @@ validate_campaign "Son_Of_The_Black_Eye" "CAMPAIGN_SON_OF_THE_BLACK_EYE" "
|
|||
validate_campaign "The_Hammer_of_Thursagan" "CAMPAIGN_THE_HAMMER_OF_THURSAGAN" "EASY" "NORMAL" "HARD" || RET=1
|
||||
validate_campaign "The_Rise_Of_Wesnoth" "CAMPAIGN_THE_RISE_OF_WESNOTH" "EASY" "NORMAL" "HARD" || RET=1
|
||||
validate_campaign "The_South_Guard" "CAMPAIGN_THE_SOUTH_GUARD" "EASY" "NORMAL" "HARD" || RET=1
|
||||
validate_campaign "tutorial" "TUTORIAL" "EASY" "NORMAL" "HARD" || RET=1
|
||||
validate_campaign "tutorial" "TUTORIAL" "EASY" || RET=1
|
||||
validate_campaign "Two_Brothers" "CAMPAIGN_TWO_BROTHERS" "EASY" "HARD" || RET=1
|
||||
validate_campaign "Under_the_Burning_Suns" "CAMPAIGN_UNDER_THE_BURNING_SUNS" "EASY" "NORMAL" "HARD" || RET=1
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue