Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/wesnoth/wesnoth
Browse files Browse the repository at this point in the history
Conflicts:
	src/unit.cpp

Header conflict
  • Loading branch information
cbeck88 committed Jun 25, 2014
2 parents 39f02ae + e47e66e commit 67f1fc2
Show file tree
Hide file tree
Showing 160 changed files with 2,239 additions and 2,355 deletions.
3 changes: 2 additions & 1 deletion changelog
Expand Up @@ -43,7 +43,7 @@ Version 1.13.0-dev:
* Purge "human_ai" controller type. This is a fixup of bugfix #18829 below.
* Language and i18n:
* Updated translations: Czech, French, German, Greek, Hungarian, Italian,
Lithuanian, Scottish Gaelic, Slovak
Lithuanian, Scottish Gaelic, Slovak, Vietnamese
* Lua API:
* Fix bug #21761: wesnoth.synchronize_choice will now give a warning when
the table returned by the user-specified function is not completely valid,
Expand Down Expand Up @@ -87,6 +87,7 @@ Version 1.13.0-dev:
* Added support for [elseif] tags inside [if]
* Schema validator messages now conform better to the new WML
parser/preprocessor diagnostics format introduced in version 1.11.10.
* Added define= functionality to scenarios, eras, and modifications.
* Miscellaneous and bug fixes:
* replace 'fight_on_without_leader'=yes/no with defeat_condition=no_leader/
no_units/always/never which allows the wml developer to decide when a side
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
4 changes: 4 additions & 0 deletions data/core/about.cfg
Expand Up @@ -1174,6 +1174,10 @@
email = "greywhind_AT_users.sourceforge.net"
wikiuser = "Greywhind"
[/entry]
[entry]
name = "Nathan Walker (RiftWalker)"
email = "nathan.b.walker@vanderbilt.edu"
[/entry]
[entry]
name = "Oleg Tsarev"
email = "zabivator@gmail.com"
Expand Down
7 changes: 7 additions & 0 deletions data/multiplayer/scenarios/2p_Dark_Forecast.cfg
Expand Up @@ -10,7 +10,9 @@ Note: You need to use the default map settings for the scenario to work right."
experience_modifier="100"
map_data="{multiplayer/maps/Dark_Forecast.map}"
victory_when_enemies_defeated=no
define=MULTIPLAYER_2P_DARK_FORECAST_LOAD

#ifdef MULTIPLAYER_2P_DARK_FORECAST_LOAD
#define RANDOMIZE NUMBER
{VARIABLE_OP random rand 1..{NUMBER}}
#enddef
Expand Down Expand Up @@ -1006,6 +1008,7 @@ Note: You need to use the default map settings for the scenario to work right."
{FIRST_WATCH}
{SECOND_WATCH}

#endif
[side]
side=1
team_name="revolt"
Expand All @@ -1015,6 +1018,7 @@ Note: You need to use the default map settings for the scenario to work right."
no_leader=yes
controller="ai"
village_gold=1
#ifdef MULTIPLAYER_2P_DARK_FORECAST_LOAD
[unit]
type=Ancient Lich
canrecruit=yes
Expand All @@ -1033,6 +1037,7 @@ Note: You need to use the default map settings for the scenario to work right."
[/object]
[/modifications]
[/unit]
#endif
[/side]

[side]
Expand Down Expand Up @@ -1088,6 +1093,7 @@ Note: You need to use the default map settings for the scenario to work right."
share_view="yes"
[/side]

#ifdef MULTIPLAYER_2P_DARK_FORECAST_LOAD
[event]
name=prestart
{SET_TIMID_AI_AND_BOLD_AI 2 1}
Expand Down Expand Up @@ -1406,4 +1412,5 @@ The weather will also change randomly, affecting the layout of the map.
#undef WEATHER_ALERT
#undef ADJUST_WEATHER
#undef INIT_WEATHER
#endif
[/multiplayer]
7 changes: 7 additions & 0 deletions data/multiplayer/scenarios/2p_Hornshark_Island.cfg
@@ -1,5 +1,6 @@
#textdomain wesnoth-multiplayer

#ifdef MULTIPLAYER_HORNSHARK_ISLAND_LOAD
#define MODIFY_BOWMAN X Y
[object]
silent=yes
Expand All @@ -18,6 +19,7 @@
[/effect]
[/object]
#enddef
#endif

[multiplayer]
id=multiplayer_Hornshark_Island
Expand All @@ -26,10 +28,13 @@
description= _ "Players must forge strange alliances with the local inhabitants, in order to survive on this most unusual of islands. Designed by Doc Paterson."
map_data="{multiplayer/maps/2p_Hornshark_Island.map}"
random_start_time="no"
define=MULTIPLAYER_HORNSHARK_ISLAND_LOAD

#ifdef MULTIPLAYER_HORNSHARK_ISLAND_LOAD
{DEFAULT_SCHEDULE_MORNING}

{DEFAULT_MUSIC_PLAYLIST}
#endif

[side]
[ai]
Expand All @@ -56,6 +61,7 @@
fog=yes
[/side]

#ifdef MULTIPLAYER_HORNSHARK_ISLAND_LOAD
[event]
name=prestart

Expand Down Expand Up @@ -1011,4 +1017,5 @@
{MODIFY_BOWMAN 1 1}
{MODIFY_BOWMAN 28 24}
[/event]
#endif
[/multiplayer]
13 changes: 13 additions & 0 deletions data/multiplayer/scenarios/4p_A_New_Land.cfg
Expand Up @@ -6,7 +6,9 @@
description= _ "This 4p survival scenario allows you to construct buildings and terraform the land. Use map settings. The recommended starting gold is 100."
experience_modifier=70%
turns=unlimited
define=MULTIPLAYER_A_NEW_LAND_LOAD

#ifdef MULTIPLAYER_A_NEW_LAND_LOAD
{DEFAULT_SCHEDULE}
{DEFAULT_MUSIC_PLAYLIST}
# ------------------------------------------------------
Expand Down Expand Up @@ -36,6 +38,7 @@
[/objective]
[/objectives]
[/event]
#endif

# ------------------------------------------------------
# Side Definitions
Expand Down Expand Up @@ -120,6 +123,7 @@
income_lock=yes
type=Death Knight
allow_player=no
#ifdef MULTIPLAYER_A_NEW_LAND_LOAD
[modifications]
{MOVEMENT_RESTRICTION flat shallow_water}
[/modifications]
Expand All @@ -130,6 +134,7 @@
[village]
x,y=10,25
[/village]
#endif
[/side]

[side]
Expand All @@ -147,6 +152,7 @@
income_lock=yes
type=Orcish Sovereign
allow_player=no
#ifdef MULTIPLAYER_A_NEW_LAND_LOAD
[modifications]
{MOVEMENT_RESTRICTION flat shallow_water}
[/modifications]
Expand All @@ -157,6 +163,7 @@
[village]
x,y=50,25
[/village]
#endif
[/side]

[side]
Expand All @@ -174,6 +181,7 @@
income_lock=yes
type=Orcish Sovereign
allow_player=no
#ifdef MULTIPLAYER_A_NEW_LAND_LOAD
[modifications]
{MOVEMENT_RESTRICTION flat shallow_water}
[/modifications]
Expand All @@ -184,6 +192,7 @@
[village]
x,y=10,30
[/village]
#endif
[/side]

[side]
Expand All @@ -201,6 +210,7 @@
income_lock=yes
type=Death Knight
allow_player=no
#ifdef MULTIPLAYER_A_NEW_LAND_LOAD
[modifications]
{MOVEMENT_RESTRICTION flat shallow_water}
[/modifications]
Expand All @@ -211,6 +221,7 @@
[village]
x,y=50,30
[/village]
#endif
[/side]

# This side is for trapped units. It is allied to the AI so they don't attack it.
Expand All @@ -233,6 +244,7 @@
[/ai]
[/side]

#ifdef MULTIPLAYER_A_NEW_LAND_LOAD
# ------------------------------------------------------
# ANL Building Logic
# ------------------------------------------------------
Expand Down Expand Up @@ -840,4 +852,5 @@
type=Necrophage,Bone Shooter,Revenant
[/allow_recruit]
[/event]
#endif
[/multiplayer]
9 changes: 9 additions & 0 deletions data/multiplayer/scenarios/6p_Team_Survival.cfg
Expand Up @@ -49,6 +49,7 @@ _s , _s , _s , _s , _s , _s
_s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s
_s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s , _s
#enddef
#ifdef 6P_TEAM_SURVIVAL_LOAD
#define TS_WALL_MASK_NORTH
usage=mask

Expand Down Expand Up @@ -311,6 +312,7 @@ usage=mask
{TS_SPAWN2 "Goblin Rouser"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}
[/event]
#enddef
#endif

[multiplayer]
id=multiplayer_6p_Team_Survival
Expand All @@ -321,9 +323,12 @@ usage=mask
turns=32
victory_when_enemies_defeated=yes
random_start_time="no"
define=6P_TEAM_SURVIVAL_LOAD

#ifdef 6P_TEAM_SURVIVAL_LOAD
{DEFAULT_MUSIC_PLAYLIST}
{DEFAULT_SCHEDULE}
#endif

[side]
user_team_name=_ "Attacker"
Expand Down Expand Up @@ -420,6 +425,7 @@ usage=mask
[/ai]
[/side]

#ifdef 6P_TEAM_SURVIVAL_LOAD
[event]
name=prestart

Expand Down Expand Up @@ -600,9 +606,11 @@ usage=mask
image=portraits/undead/transparent/spectre.png
[/message]
[/event]
#endif
[/multiplayer]

#undef TS_MAP_DATA
#ifdef 6P_TEAM_SURVIVAL_LOAD
#undef TS_WALL_MASK_NORTH
#undef TS_WALL_MASK_NORTH_EAST
#undef TS_WALL_MASK_NORTH_WEST
Expand All @@ -622,3 +630,4 @@ usage=mask
#undef TS_LAKE_SPAWN
#undef TS_HOME_SPAWN
#undef TS_SPAWNS
#endif
44 changes: 27 additions & 17 deletions data/tools/GUI.pyw
Expand Up @@ -71,22 +71,16 @@ def run_tool(tool,queue,command):
output=subprocess.check_output(' '.join(wrapped_line),stderr=subprocess.STDOUT,startupinfo=si)
queue.put_nowait(output)
except subprocess.CalledProcessError as error:
# post the precise message
showerror("Error","""There was an error while executing {0}.
Error code: {1}""".format(tool,error.returncode))
queue.put_nowait(error.output)
# post the precise message and the remaining output as a tuple
queue.put_nowait((tool,error.returncode,error.output))
else: # STARTUPINFO is not available, nor needed, outside of Windows
queue.put_nowait(' '.join(command)+"\n")
try:
output=subprocess.check_output(command,stderr=subprocess.STDOUT)
queue.put_nowait(output)
except subprocess.CalledProcessError as error:
# post the precise message
showerror("Error","""There was an error while executing {0}.
Error code: {1}""".format(tool,error.returncode))
queue.put_nowait(error.output)
# post the precise message and the remaining output as a tuple
queue.put_nowait((tool,error.returncode,error.output))

def is_wesnoth_tools_path(path):
"""Checks if the supplied path may be a wesnoth/data/tools directory"""
Expand Down Expand Up @@ -807,7 +801,8 @@ class MainFrame(Frame):
sticky=N+E+S+W)
self.text=Text(self.output_frame,
wrap=WORD,
state=DISABLED)
state=DISABLED,
takefocus=True)
self.text.grid(row=0,
column=0,
sticky=N+E+S+W)
Expand All @@ -832,6 +827,9 @@ class MainFrame(Frame):
self.columnconfigure(0,weight=1)
self.rowconfigure(3,weight=1)
self.notebook.bind("<<NotebookTabChanged>>",self.tab_callback)
# this allows using the mouse wheel even on the disabled Text widget
# without the need to clic on said widget
self.tk_focusFollowsMouse()

def tab_callback(self,event):
# we check the ID of the active tab and ask its position
Expand Down Expand Up @@ -982,13 +980,25 @@ wmlindent will be run on the Wesnoth core directory""")
dialog=Popup(self.parent,"wmlindent",wmlindent_thread)

def update_text(self):
"""Checks periodically if the queue is empty, and pushes its content in the Text widget if it isn't"""
"""Checks periodically if the queue is empty.
If it contains a string, pushes it into the Text widget.
If it contains an error in form of a tuple, displays a message and pushes the remaining output in the Text widget"""
if not self.queue.empty():
text_to_push=self.queue.get_nowait()
self.text.configure(state=NORMAL)
self.text.insert(END,text_to_push)
self.text.configure(state=DISABLED)
self.text.after(100,self.update_text)
queue_item=self.queue.get_nowait()
# I tried posting directly the error in the queue, but for some reason
# isinstance(queue_item,subprocess.CalledProcessError) is ignored
if isinstance(queue_item,tuple):
showerror("Error","""There was an error while executing {0}.
Error code: {1}""".format(queue_item[0],queue_item[1]))
self.text.configure(state=NORMAL)
self.text.insert(END,queue_item[2])
self.text.configure(state=DISABLED)
elif isinstance(queue_item,str):
self.text.configure(state=NORMAL)
self.text.insert(END,queue_item)
self.text.configure(state=DISABLED)
self.after(100,self.update_text)

def on_save(self):
fn=asksaveasfilename(defaultextension=".txt",filetypes=[("Text file","*.txt")],initialdir=".")
Expand Down
6 changes: 3 additions & 3 deletions data/tools/README
Expand Up @@ -38,10 +38,10 @@ easy.
This tool lifts WML from older dialects to current and performs sanity checks.
See the header comment of wmllint for a description and invocation options.

=== wmllint_gui ===
=== GUI.pyw ===

A simple GUI interface for wmllint, to aid WML developers frightened of
the command line.
A Tkinter based GUI interface for wmllint, wmlscope and wmllint, to aid WML
developers frightened of the command line.

=== wmlscope ===

Expand Down

0 comments on commit 67f1fc2

Please sign in to comment.