62423 Commits

Author SHA1 Message Date
Celtic Minstrel
bda61536b0 Use [do] subtags with [repeat] 2015-09-20 00:31:47 -04:00
Celtic Minstrel
d895b18659 [foreach] now raises error if array length changes during iteration 2015-09-20 00:31:28 -04:00
Celtic Minstrel
65263bfc32 Propagate modifications to item_var back into the array 2015-09-20 00:31:09 -04:00
Celtic Minstrel
6c5cf1eb88 Implement [foreach] tag, based on Elvish_Hunter's implementation 2015-09-20 00:30:18 -04:00
Celtic Minstrel
f5bd414b69 New WML tags to replace macro loop constructs
- [for] can replace {FOREACH} ... {NEXT}, but it's really intended for running over an integral range
- [repeat] can replace {REPEAT}
2015-09-20 00:30:08 -04: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
Elvish_Hunter
2877a6a489 wmllint-1.4: use enumerate() to iterate over lines 2015-09-16 21:03:33 +02:00
Elvish_Hunter
ac31185083 wmllint-1.4: use 'with' statement when handling files 2015-09-16 21:03:33 +02:00
gfgtdf
17b3c98a5e fix side_for in [message]s with input
the previous impleentation could casue OOS.
2015-09-16 16:16:55 +02:00
Ignacio R. Morelle
0a8abb8328 Remove unneeded temporary copy of a variable 2015-09-16 05:59:13 -03:00
Ignacio R. Morelle
e8caf1fac4 Remove unnecessary y scrolling offset from [message] implementation
The problem this tried to solve was solved long ago, when the new GUI2
[message] dialog was introduced in 1.5.x. Formerly, [message] was
displayed at the top of the screen, so with sufficiently long messages
and a small screen resolution, the viewport could be scrolled in such a
way that the target unit was covered by the dialog.

Nowadays [message] is displayed at the bottom and the scrolling
algorithm is more or less sane, so this hack is completely unneeded.

(For reference, this was originally introduced in commit
83a332a8692260f50ab76bb7f0ae754baf6507d7. For a reference screenshot of
what it would do back in the day, see
<http://www.wesnoth.org/images/sshots/wesnoth-1.1.9-shot3.jpg>.)

Thanks to celticminstrel and vultraz for bringing this up on IRC.
2015-09-16 05:52:52 -03:00
Ignacio R. Morelle
928b6e8008 Comment spelling fixes 2015-09-15 23:22:37 -03:00
Ignacio R. Morelle
b2900a310a Comment spelling or formatting fixes 2015-09-15 23:20:13 -03:00
Ignacio R. Morelle
7dd1963273 Doxygen or code formatting fixes 2015-09-15 23:16:40 -03:00