59570 Commits

Author SHA1 Message Date
Charles Dang
3b52642f58 DiD: clean up/improve/standardize code format in all scenarios 2014-12-20 19:20:25 +11:00
Charles Dang
274084b916 Merge branch 'master' of github.com:wesnoth/wesnoth 2014-12-20 15:15:39 +11:00
Charles Dang
55e6920644 DiD S2: removed the commented out 'black comedy' event 2014-12-20 15:15:01 +11:00
Charles Dang
8e5523f76a DiD S2: used [filter_condition] for an event I missed and made logic clearer 2014-12-20 15:13:01 +11:00
mattsc
c664d967d9 Update Xcode project file 2014-12-19 19:56:09 -08:00
Charles Dang
a0954377ea Merge branch 'master' of github.com:wesnoth/wesnoth 2014-12-20 14:53:52 +11:00
Chris Beck
2396cfc937 reduce the failure probability of a lua random unit test
It seemed to spuriously pass on travis when it should be failing,
this should be much more unlikely now.
2014-12-19 22:51:30 -05:00
Charles Dang
28f54a2f47 DiD S1: used bool yes/no check for malin_used_necromancy and not num_equals 0/1 2014-12-20 14:51:24 +11:00
Chris Beck
2d5ef39d5b update changelog 2014-12-19 21:58:09 -05:00
Charles Dang
6ef9ec3b0c Updated codeblocks projectfile 2014-12-20 13:25:33 +11:00
Chris Beck
f0cc00c256 Merge pull request #338 from cbeck88/plugins
add plugins and mp unit test system
2014-12-19 20:49:34 -05:00
gfgtdf
69042c7c33 Update changelog 2014-12-20 02:24:00 +01:00
Chris Beck
e3bc595fff travis: add mp unit tests to travis build #3 (clang -O2) 2014-12-19 19:47:29 -05:00
Chris Beck
7a1e636569 add log function to host, join lua scripts 2014-12-19 19:47:29 -05:00
Chris Beck
3e3862977d notify plugins of chat events during the game 2014-12-19 19:47:28 -05:00
Chris Beck
875f12844a make host.lua use mp test scenario "test1" 2014-12-19 19:47:28 -05:00
Chris Beck
fbb0ac5efa avoid an error message in mp chat when we run headlessly 2014-12-19 19:47:28 -05:00
Chris Beck
92f687d6d6 mp_tests script: use the --mp-test flag 2014-12-19 19:47:28 -05:00
Chris Beck
489074b0a4 add --mp-tests option and preproc defines, and mp unit tests folder
These tests are meant to be run in a networked context to check for
OOS and similar.
2014-12-19 19:47:27 -05:00
Chris Beck
d50057e5a6 fixup multiplayer_create load_game option for plugins 2014-12-19 19:47:27 -05:00
Chris Beck
c499495d3c make the mp tests run with no gui 2014-12-19 19:47:27 -05:00
Chris Beck
43bca07459 add plugins callbacks to save the game or a replay 2014-12-19 19:47:26 -05:00
Chris Beck
da4e275f2d allow --nogui flag with --plugin
This allows us to use plugins headlessly without using the -m
option, which causes some issues. Plugins must read headlessly to
be used on travis-ci.
2014-12-19 19:47:26 -05:00
Chris Beck
4d69cabec7 add some mp debugging output 2014-12-19 19:47:26 -05:00
Chris Beck
1f93699c8b give plugins a chance to run in gui1 dialogs when disp is faked
Otherwise they cannot use any of the dialogs and we cannot do
leader select when joining a game.

This commit also adds an "any_running" helper to plugins_manager.
2014-12-19 19:47:25 -05:00
Chris Beck
60bb254f69 try to make join.lua more robust against missed callbacks 2014-12-19 19:47:25 -05:00
Chris Beck
7e5c599e79 make the titlescreen phase more reliable for host.lua, join.lua 2014-12-19 19:47:25 -05:00
Chris Beck
99ff419b28 reword an error message 2014-12-19 19:47:25 -05:00
Chris Beck
3010f2fa0e add chat callback to multiplayer_create 2014-12-19 19:47:24 -05:00
Chris Beck
13d77377d8 add "select type" plugin callback to multiplayer create
This is needed to select different level types.
2014-12-19 19:47:24 -05:00
Chris Beck
7aedfad426 add test bots
The test bots are able to host and join a game together on a local
server. This is still experimental, for instance they cannot
actually leave, and the controllers are human because the host
cannot yet configure them to be AI.
2014-12-19 19:47:24 -05:00
Chris Beck
0133fd7a81 add a plugins context to controller base / game controller 2014-12-19 19:47:23 -05:00
Chris Beck
7904578960 add a plugins context to multiplayer wait 2014-12-19 19:47:23 -05:00
Chris Beck
a2fd496662 add a plugins context to multiplayer connect 2014-12-19 19:47:23 -05:00
Chris Beck
4c53d4e021 add a plugins context to mp configure 2014-12-19 19:47:22 -05:00
Chris Beck
aa38edd95a add a "select level" callback to mp_create 2014-12-19 19:47:22 -05:00
Chris Beck
0035522bd0 add "find_level" accessor to the create engine 2014-12-19 19:47:22 -05:00
Chris Beck
7030dca047 add "get_selected" accessor to mp create plugin context 2014-12-19 19:47:22 -05:00
Chris Beck
2ceae15fcc add a plugins context to mp create 2014-12-19 19:47:21 -05:00
Chris Beck
b79c53d0ad add notification of chat events to all mp ui windows 2014-12-19 19:47:21 -05:00
Chris Beck
bda6cb0a57 add an automatic plugins context to all gui1 dialogs 2014-12-19 19:47:21 -05:00
Chris Beck
798af2bff8 add "get_int" shim, similar to "get_str" 2014-12-19 19:47:20 -05:00
Chris Beck
06ca78fec4 bugfix: intf_require would segfault if a thread called it
The problem was that intf_require would assume use the wrong
lua_State* since it finds it using the kernel's this pointer. This
commit gives a version of "protected_call" which allows to use the
callback's lua_State*.
2014-12-19 19:47:20 -05:00
Chris Beck
3e73ec2f68 fixups: don't construct string from NULL, avoid complicated API
In the error handling routines for compiling and running a script
at runtime, don't construct a string directly from lua_tostring,
because if it is null that is a runtime error. Instead check for
this scenario.

In intf_require, when getting the "wesnoth" global, luaW_getglobal
is unnecessary and lua_getglobal should be prefered.
2014-12-19 19:47:20 -05:00
Chris Beck
96ad22069f add error reporting to try to understand wesnoth.require error 2014-12-19 19:47:19 -05:00
Chris Beck
f047412d44 add some debugging output to check that plugins context is running 2014-12-19 19:47:19 -05:00
Chris Beck
9c36f0fc0c add some debugging output to plugins manager on channel "plugins" 2014-12-19 19:47:19 -05:00
Chris Beck
f75f40f6b2 add "describe_plugins()" to the application lua kernel 2014-12-19 19:47:19 -05:00
Chris Beck
f8f1979846 add --plugin option at command line (to replace script eventually)
This is still rough and will need to be cleaned up later.
2014-12-19 19:47:18 -05:00
Chris Beck
c485edf7c6 change "get_str" plugin callback shim to make a temp string copy
This prevents a segfault when using "send chat message".
2014-12-19 19:47:18 -05:00