57238 Commits

Author SHA1 Message Date
Chris Beck
853768ce85 Merge branch 'refactor_play_turn_to_avoid_string_literals' 2014-05-25 20:58:14 -04:00
Chris Beck
28c6dbfa2b Refactor, since this logic is in MAKE_ENUM now for team:controller 2014-05-25 20:57:19 -04:00
gfgtdf
387017d6d2 add a check_victory after init side 2014-05-26 01:23:35 +02:00
Chris Beck
b2ac9c5b31 Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-05-25 16:23:22 -04:00
Chris Beck
9ac310e191 team::controller enum to use MAKE_ENUM macro 2014-05-25 16:22:55 -04:00
gfgtdf
d1d70cb7b1 remove check_victory in play_human_turn
we don't need these because we call check_victory at the end of the
synced_context.

I removed them because check_victory assumes that "this code is run
rarely" which is not the case if we call it there.
2014-05-25 21:56:26 +02:00
gfgtdf
9f399d8979 cleanup check_victory in ai actions
do_execute which calls run_in_synced_context can throw end_level
exception because run_in_synced context calls check_victory. So we don't
need the additional check_victory in action_result::execute anymore.
2014-05-25 21:56:20 +02:00
Chris Beck
684d1c35c6 unit_type::alignment to use MAKE_ENUM macro 2014-05-25 14:38:00 -04:00
Chris Beck
7b876194bd update changelog 2014-05-25 12:27:43 -04:00
Chris Beck
28d0e2df0e Merge pull request #169 from cbeck88/fixup_init_side_done
Fixup init side done
2014-05-25 12:23:58 -04:00
Chris Beck
77ead90692 call maybe_do_init_side when the engine starts a sides turn
This is part of the effort to fix bug https://gna.org/bugs/?21397
2014-05-25 11:00:01 -04:00
Chris Beck
239cb5fdc6 save play_controller.init_side_done as a toplevel member of snapshot
This is in an effort to address https://gna.org/bugs/?21397
2014-05-25 10:49:22 -04:00
Chris Beck
e0b0716d2a fixup enum cast error reporting
Only do this when the value is that triggered the fault is nonempty,
otherwise you get a fault even when the attribute does not appear
in the user generated config -- in that case should silently take
the default.

fixes up 986a87228786f7034b999b06fafb46d6700d3848
2014-05-25 09:53:10 -04:00
Mark de Wever
b81b66f9b9 Fix compilation. 2014-05-25 13:55:31 +02:00
Chris Beck
d77f0f9c86 Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-05-25 03:16:25 -04:00
Chris Beck
d146d9cc98 update changelog 2014-05-25 03:15:36 -04:00
Chris Beck
986a872287 failed conversion of enums results in error dialog, in debug mode
The make_enum macro header now includes wml_exception.hpp, and
game_config. We use the FAIL macro to launch a transient
twml_exception dialog when an enum is casted from an illegal
string value. This means that when enums in our C++ classes are
initialized using lexical_cast<enum_type> (cfg["attribute"]),
we will automatically give error reports for bad values.
2014-05-25 03:11:46 -04:00
Charles Dang
a43bc197e3 Merge pull request #168 from ancestral/master
Added [portrait] info to hakim.cfg
2014-05-25 11:06:01 +11:00
ancestral
29490feef3 Added [portrait] to Hakim
Hakim has a portrait, but his config file is missing it.
2014-05-24 16:56:39 -07:00
Chris Beck
12fad6efbc fixup wmllint to include 1.11.15 changes 2014-05-24 19:11:48 -04:00
Chris Beck
0e2e54c632 fixup lexical cast implementation.
gcc wouldn't compile this when "from" was of type enum, because
it says it wouldn't be initialized. The explicit call to default
constructor fixes it. Thanks to gfgtdf for this simple fix to
this problem.
2014-05-24 17:43:37 -04:00
Chris Beck
17d63fce9d fixup includes and docs of make_enum 2014-05-24 16:30:28 -04:00
Chris Beck
59e738a093 update changelog 2014-05-24 15:12:45 -04:00
Chris Beck
ea428a506c refactor team to use MAKE_ENUM macro for team::DEFEAT_CONDITION 2014-05-24 14:59:21 -04:00
Chris Beck
215de94390 Add make_enum macros and a unit test, also add to project files 2014-05-24 14:59:20 -04:00
Chris Beck
e8266ba932 add public to the definition of bad_lexical_cast 2014-05-23 22:06:57 -04:00
Chris Beck
ef3e0e4ad1 Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-05-23 16:42:42 -04:00
Chris Beck
24155ad537 refactor map_location.hpp to drop util.hpp include 2014-05-23 16:40:32 -04:00
ln-zookeeper
91c13b82c0 Fixed Li'sar not carrying over correctly 2014-05-23 22:53:10 +03:00
Guorui Xi(Kevin)
8082cef707 Fix typos in comment 2014-05-23 21:20:44 +08:00
Chris Beck
688747e469 Catch config::error exception which could be thrown by parser.
I'm not sure if this is necessary as it is not reported, but
worst case is that not doing this could cause malformed
scenario files in the editor folder to crash wesnoth while
browsing in mp_create.
2014-05-23 00:33:51 -04:00
Chris Beck
f70cd0d6bc Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-05-22 23:00:16 -04:00
Chris Beck
7cd205832f add config attribute value tests, put them in project files also. 2014-05-22 22:59:47 -04:00
mattsc
54b3030676 MAI test scenarios: fight_on_without_leader -> defeat_condition
Necessary due to a recent change how the victory conditions are
evaluated.
2014-05-22 19:51:51 -07:00
Chris Beck
49f97ee9be Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-05-22 17:22:33 -04:00
Chris Beck
d129d80ebe Add unit tests for check victory function
Mainly focused on defeat_condition field right now... woudl be good
to add some that test victory_when_enemies_defeated.
2014-05-22 17:21:53 -04:00
ln-zookeeper
3a860d4657 Fixed broken image reference 2014-05-22 20:53:55 +03:00
Chris Beck
ca5ea804e9 Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-05-22 12:07:45 -04:00
Chris Beck
d6dfec6151 fixup error loggins, catch parsing exceptions in editor, -p option 2014-05-22 11:51:49 -04:00
ln-zookeeper
86fe11bb24 Fixed repeated dialogue 2014-05-22 17:36:14 +03:00
Guorui Xi(Kevin)
d3529f86f5 Add the missing single quote 2014-05-22 15:41:47 +08:00
Chris Beck
74c4ff9973 Merge pull request #167 from sigurdfdragon/CB_Project_Fix_20140521
Fix CB project file.
2014-05-21 23:15:53 -04:00
sigurdfdragon
ba4557bc4c Fix CB project file. 2014-05-21 21:28:43 -04:00
Chris Beck
acf3776527 make all local variables static in gui2 test wrappers
This can cause segfaults / exceptions depending on compiler options
or platform apparently...

http://www.wesnoth.org/irclogs/2014/05/%23wesnoth-dev.2014-05-21.log
2014-05-21 11:24:50 -04:00
Elvish_Hunter
2dbca0c3f1 wmllint GUI: avoid showing a blank Tk window if the program is run outside of a Wesnoth directory 2014-05-21 10:43:54 +02:00
Elvish_Hunter
385384de86 wmllint GUI: verbosity level radiobutton, Normal -> Terse 2014-05-21 10:43:54 +02:00
Elvish_Hunter
ef81cbad61 wmllint GUI: moved the exit button to the right side of the window 2014-05-21 10:43:54 +02:00
Elvish_Hunter
82e1126094 wmllint GUI: removed verbs from option labelframe labels 2014-05-21 10:43:53 +02:00
Elvish_Hunter
241015fa05 wmllint GUI: made two labelframe labels shorter 2014-05-21 10:43:53 +02:00
Elvish_Hunter
f3012b50db wmllint GUI: used a smaller icon for the Browse button, and made the entry fill the whole frame 2014-05-21 10:43:52 +02:00