62231 Commits

Author SHA1 Message Date
gfgtdf
fd2e513dc9 simplify user_choice_notifer_ingame 2015-09-20 22:32:28 +02:00
gfgtdf
c7c1b750fc fix compiler wanring. 2015-09-20 22:32:24 +02:00
gfgtdf
61fabacd36 fix compiler warnings. 2015-09-20 22:32:22 +02:00
gfgtdf
3ed4eed9fc wait dialog for user choices during prestart events
gna.org/bugs/?23297

If we are waiting for a synced user choice during a prestart events we
now show a gui2 dialog that informs the player about why the client is
waiting and also offers the player the option to quit the game.
2015-09-20 22:32:19 +02:00
gfgtdf
de3db53447 refactor get_user_choice
this prepares a patch to implement wait dialogs for user choices during
prestart events.
2015-09-20 21:52:48 +02:00
gfgtdf
3c11aa63f8 move get_user_choice function to a new file 2015-09-20 21:52:47 +02:00
gfgtdf
663db4f70f show notification when waiting for remote choices.
The game now shows a notification when waiting for a remove user choice
(like for example a unit advancement choice) for longer than 2 seconds.
This does not work during prestart events yet.
2015-09-20 21:47:37 +02:00
gfgtdf
cce53d5aa9 fix a compiler warning 2015-09-20 21:47:34 +02:00
gfgtdf
9c9f8f5a6e split wesnoth.synchronize_choice function
previously there was one function which sometimes returned a wml table
and sometimes a map integer to wml tables dependent on its parameters.

Now there are 2 different functions: wesnoth.synchronize_choice and
wesnoth.synchronize_choices. the first one handles the case where you just
want to get a choice from one side and thus it returns just one wml
table. The second function handles the case where you want to get
choices from multiple sides. that function retruns a table of wml
tables.

I also added an optional string parameter to that function specifying
the type of that choice (this is useful to make replays more robust and
readable)
2015-09-20 21:47:31 +02:00
Elias Pschernig
4c034d7705 Clean up wmlparser3.py a bit, fix json and xml output. 2015-09-20 14:53:49 -04:00
Charles Dang
00d96b3016 Fixed a variable typo pointed out by Elvish_Hunter 2015-09-20 23:49:06 +11:00
Ignacio R. Morelle
48def4ff0a Replace alphanumeric and operator spelling
Some (all?) versions of MSVC++ doesn't like it without including
<ciso646>, and we don't really want to use the alternate operator
spellings anyway.
2015-09-20 06:09:22 -03:00
Elvish_Hunter
e39f6376c8 wmllint-1.4: use string formatting or interpolation instead of concatenation 2015-09-20 10:27:37 +02:00
Charles Dang
45aa0d4ae8 Fixup 9ea9c88356fe 2015-09-20 10:23:34 +11:00
Charles Dang
9ea9c88356 Fixed bug where unit at x1,y1 would be considered for object even if filter failed
Note that this was only present the 1.13 Lua implementation of [object]
and as such does not affect 1.12
2015-09-20 10:19:10 +11:00
mattsc
6a3a346e41 Xcode project: do not warn about unused local typedefs
Otherwise Xcode 7 (and its version of clang) produce more than 100
boost related unused typedef warnings.
2015-09-19 15:27:17 -07:00
Charles Dang
205b82da69 Pluralize campaigns main menu item
This makes sense since there is no single campaign for the game
2015-09-20 08:25:03 +11:00
Charles Dang
bec40a3c39 Merge pull request #483 from Wedge009/Spelling_Corrections
Spelling and Grammar Corrections
2015-09-20 07:07:00 +11:00
Celtic Minstrel
e74c119b9b Merge pull request #488 from CelticMinstrel/backstab 2015-09-19 15:42:35 -04:00
Celtic Minstrel
7ca65c819e Clarify changelog 2015-09-19 15:41:23 -04:00
aquileia
6dd554c979 Update vcproj for 7875501, 20fafde & 0abde38 2015-09-19 21:31:58 +02:00
Charles Dang
660647f7d8 Strip newline whitespace 2015-09-20 04:46:34 +11:00
Charles Dang
e96f1c1bc1 Cleaned out implementation of legacy function 2015-09-20 03:36:15 +11:00
Celtic Minstrel
34b0a9ca6f Change direction rotation syntax to not be confused with variable substitution 2015-09-19 12:31:13 -04:00
Celtic Minstrel
4ca0aeb506 Expose the extra filter unit to the Lua API 2015-09-19 12:31:12 -04:00
Celtic Minstrel
fb1a84594a Enhance ability/weapon special [filter_adjacent] and [filter_adjacent_location]
- Now supports count=
- Now supports is_enemy= in [filter_adjacent]
2015-09-19 12:31:10 -04:00
CelticMinstrel
e841252f19 Merge pull request #492 from CelticMinstrel/lua-message-object
Port [message] and [object] ActionWML to Lua
2015-09-19 12:14:19 -04:00
Celtic Minstrel
907d527cc3 Lua API: Replace wesnoth.skipping_replay() with is_skipping_messages() and skip_messages() 2015-09-19 12:13:40 -04:00
Celtic Minstrel
03580ed9a9 Allow spaces in [object]id= and show error if invalid characters are present 2015-09-19 12:13:38 -04:00
Celtic Minstrel
a93ce122ff Add [found_item] ConditionalWML that checks if an [object] ActionWML has been taken 2015-09-19 12:13:36 -04:00
Celtic Minstrel
65256c61aa Convert used items from old saves 2015-09-19 12:13:31 -04:00
Celtic Minstrel
e3fc258ce9 Simplify wesnoth.show_message_dialog implementation 2015-09-19 12:13:27 -04:00
Celtic Minstrel
376020097f Port [object] ActionWML tag from C++ to Lua
Lua API additions:
- wesnoth.show_popup_dialog()
- optional write_to_mods parameter to wesnoth.add_modification
2015-09-19 12:13:25 -04:00
Celtic Minstrel
d4835b0157 Port [message] ActionWML tag from C++ to Lua
Lua API additions:
- wesnoth.skipping_replay()
- wesnoth.deselect_hex()

Note: vultraz and aetheryn deserve partial credit for the Lua implementation
2015-09-19 12:13:23 -04:00
Celtic Minstrel
6200f60c79 Split some utility functions from wml-tags.lua into a new file 2015-09-19 12:13:21 -04:00
Celtic Minstrel
421b34d04a Add deprecation warning for backstab= 2015-09-19 02:14:59 -04:00
Celtic Minstrel
f54d6b5d28 Rewrite leadership ability as a single macro using $other_unit
Note: It's no longer supported to use the macro in a unit with a non-matching level,
for example giving a 2nd-level unit 4th-level leadership.
2015-09-19 02:14:38 -04:00
Celtic Minstrel
9940ee4036 New rotate operators for directions 2015-09-19 01:04:51 -04:00
Celtic Minstrel
12c96a94d2 New autostored WML variable $other_unit for [filter_adjacent]
Also accessible in:
- Weapon specials ([filter_self], [filter_opponent], [filter_attacker], [filter_defender])
- Abilities ([affect_adjacent][filter])

The backstab weapon special is now implemented using this.
(In a weapon special filter, units are guaranteed to be facing each other.)
2015-09-19 00:55:19 -04:00
Celtic Minstrel
a5184181df Fix SUF $this_unit only working within [filter_wml] 2015-09-19 00:19:26 -04:00
Celtic Minstrel
edce9ac64a run_wml_tests: Add some fallback cases and a few more options
- If timeout is missing, it disables timeout and skips any tests that expect it
- Pass -t0 to get the above behaviour even if timeout is present
- Detect if timeout doesn't support --kill-after
- Mac users: Pass -pxcode to automatically find the Wesnoth binary in XCode's DerivedProducts folder
- In non-verbose mode, give progress report by printing a dot before each test
  This only happens in non-verbose mode because this method of reporting progress makes most sense
  if nothing else is printed.
2015-09-19 00:18:31 -04:00
Celtic Minstrel
617fb26238 Add debug command :unit status=list,of,statuses,to,add,or,-remove 2015-09-18 00:53:16 -04:00
Celtic Minstrel
2fd07684f2 Update changelog 2015-09-18 00:29:19 -04:00
Celtic Minstrel
91ac90db11 Lua API: Add wesnoth.show_message_dialog() 2015-09-18 00:23:54 -04:00
Celtic Minstrel
af2e16f842 Add sanity-checking for WML attribute/tag/variable names to prevent invalid save files
- It's now an error to set an invalid variable
- If an invalid key or tag is somehow set, it won't be written to the file (with an error message in the log)
- There's an API function config::valid_id() which can be used to catch issues earlier.
2015-09-17 21:43:25 -04:00
Nils Kneuper
e9be2324b5 updated Hungarian translation 2015-09-16 22:18:23 +02:00
Charles Dang
bce13542b1 Fixup 17b3c98a5e12 2015-09-17 06:13:22 +11:00
Elvish_Hunter
53ee364bab wmllint-1.4: renamed two variables
Used 'r' instead of 'm' if the code refers to ranged attacks (instead of melee); also, ensure that the regexps check the modified versions of the line.
2015-09-16 21:03:34 +02:00
Elvish_Hunter
3afe74b5de wmllint-1.4: renamed a variable
'i' wasn't used in places visible from within the cycle, so using 'j' was pointless.
2015-09-16 21:03:33 +02:00
Elvish_Hunter
f4f11c03fc wmllint-1.4: simplify a line modification 2015-09-16 21:03:33 +02:00