[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1322473 into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1322473 into lp:widelands. Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #1322473 in widelands: " Add Win conditions as an Objective" https://bugs.launchpad.net/widelands/+bug/1322473 For more details, see: https://code.launchpad.net/~widelands-dev/widelands/bug-1322473/+merge/221235 Initial win condition is now an objective. Keep the bug open for further future improvements. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1322473/+merge/221235 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1322473 into lp:widelands. === modified file 'maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua' --- maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua 2014-03-25 06:18:48 + +++ maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua 2014-05-28 13:43:10 + @@ -239,6 +239,9 @@ disable_unused_buildings() send_to_all(welcome_msg) + -- set the objective with the game type for all players + -- TODO change this to a broadcast once individual game objectives have been implementes + game.players[1]:add_objective("win_conditions", _"Rules", welcome_msg) for idx,plr in ipairs(game.players) do run(function() run_island(plr, 1) end) === modified file 'maps/MP Scenarios/Smugglers.wmf/scripting/multiplayer_init.lua' --- maps/MP Scenarios/Smugglers.wmf/scripting/multiplayer_init.lua 2014-03-25 06:18:48 + +++ maps/MP Scenarios/Smugglers.wmf/scripting/multiplayer_init.lua 2014-05-28 13:43:10 + @@ -140,7 +140,9 @@ end send_to_all(welcome_msg:format((ngettext("%i point", "%i points", points_to_win)):format(points_to_win))) - + -- set the objective with the game type for all players + -- TODO change this to a broadcast once individual game objectives have been implementes + game.players[1]:add_objective("win_conditions", _"Rules", welcome_msg:format((ngettext("%i point", "%i points", points_to_win)):format(points_to_win))) for idx,descr in ipairs(route_descrs) do run(wait_for_established_route, descr) === modified file 'maps/Plateau.wmf/scripting/init.lua' --- maps/Plateau.wmf/scripting/init.lua 2014-03-25 06:18:48 + +++ maps/Plateau.wmf/scripting/init.lua 2014-05-28 13:43:10 + @@ -22,6 +22,7 @@ sleep(300) send_msg(briefing_1_the_forbidden_island) + local o = add_obj(obj_forbidden_island) local map = wl.Game().map while not p1:seen_field(map:get_field(5,8)) do sleep(2345) end @@ -47,7 +48,8 @@ scroll_smoothly_to(castle) send_msg(briefing_2_found_ancient_castle) - local o = add_obj(obj_capture_ancient_castle) + o.done = true + o = add_obj(obj_capture_ancient_castle) -- Wait till we conquered the castle while #p1:get_buildings"castle.atlanteans" < 1 do sleep(2345) end === modified file 'maps/Plateau.wmf/scripting/texts.lua' --- maps/Plateau.wmf/scripting/texts.lua 2014-04-09 17:50:02 + +++ maps/Plateau.wmf/scripting/texts.lua 2014-05-28 13:43:10 + @@ -23,6 +23,19 @@ return p1:add_objective(o.name, o.title, _obj(reflow(o.body)), o) end +obj_forbidden_island = { + name = "forbidden_island", + title =_"The Forbidden Island", + body = _( +[[Finally! We have just taken our first step towards victory! ]] .. +[[Last night, we landed on the forbidden island and defeated the few guards that were watching the ]] .. +[[north-western part of the island. ]] .. +[[I am quite sure that none of the other warlords has detected us so far, ]] .. +[[so we should keep quiet and build up our infrastructure. Soon we will be strong enough to raid their positions.]]), +} + + + obj_capture_ancient_castle = { name = "capture_ancient_castle", title =_ "Capture the Ancient Castle", === modified file 'scripting/win_condition_functions.lua' --- scripting/win_condition_functions.lua 2013-08-07 16:58:48 + +++ scripting/win_condition_functions.lua 2014-05-28 13:43:10 + @@ -125,3 +125,19 @@ wl.game.report_result(p, 0, make_extra_data(p, wc_name, wc_ver, extra)) end end + + +-- RST +-- .. function:: broadcast_objective(plrs, header, msg, body) +-- +--:arg plrs:This should be wl.Game().players +--:arg name:A unique name for the objective +--:arg title: The title to be displayed for the objective +--:arg body:The content text to be displayed for the objective +-- +--broadcast an objective to all players +--technically, it is assigned to player1, because all players will see all objectives +function broadcast_objective(plrs, name, title, body) + plrs[1]:add_objective(name, title, body) +end + === modified file 'scripting/win_conditions/00_endless_game.lua' --- scripting/win_conditions/00_endless_game.lua 2014-03-25 06:18:48 + +++ scripting/win_conditions/00_endless_game.lua 2014-05-28 13:43:10 + @@ -18,7 +18,8 @@ func = function()
[Widelands-dev] [Build #6050346] amd64 build of widelands 1:18-ppa0-bzr6970-201405290534~ubuntu12.04.1 in ubuntu precise RELEASE (widelands-dev-widelands-daily-precise PPA)
* Source Package: widelands * Version: 1:18-ppa0-bzr6970-201405290534~ubuntu12.04.1 * Architecture: amd64 * Archive: widelands-dev-widelands-daily-precise PPA * Component: main * State: Failed to build * Duration: 8 minutes * Build Log: https://launchpad.net/~widelands-dev/+archive/widelands-daily-precise/+build/6050346/+files/buildlog_ubuntu-precise-amd64.widelands_1%3A18-ppa0-bzr6970-201405290534%7Eubuntu12.04.1_FAILEDTOBUILD.txt.gz * Builder: https://launchpad.net/builders/marid * Source: not available If you want further information about this situation, feel free to contact a member of the Launchpad Buildd Administrators team. -- amd64 build of widelands 1:18-ppa0-bzr6970-201405290534~ubuntu12.04.1 in ubuntu precise RELEASE https://launchpad.net/~widelands-dev/+archive/widelands-daily-precise/+build/6050346 ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Build #6050341] i386 build of widelands 1:18-ppa0-bzr6970-201405290533~ubuntu12.10.1 in ubuntu quantal RELEASE (widelands-dev-widelands-daily PPA)
* Source Package: widelands * Version: 1:18-ppa0-bzr6970-201405290533~ubuntu12.10.1 * Architecture: i386 * Archive: widelands-dev-widelands-daily PPA * Component: main * State: Failed to build * Duration: 12 minutes * Build Log: https://launchpad.net/~widelands-dev/+archive/widelands-daily/+build/6050341/+files/buildlog_ubuntu-quantal-i386.widelands_1%3A18-ppa0-bzr6970-201405290533%7Eubuntu12.10.1_FAILEDTOBUILD.txt.gz * Builder: https://launchpad.net/builders/wani07 * Source: not available If you want further information about this situation, feel free to contact a member of the Launchpad Buildd Administrators team. -- i386 build of widelands 1:18-ppa0-bzr6970-201405290533~ubuntu12.10.1 in ubuntu quantal RELEASE https://launchpad.net/~widelands-dev/+archive/widelands-daily/+build/6050341 ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Build #6050340] amd64 build of widelands 1:18-ppa0-bzr6970-201405290533~ubuntu12.10.1 in ubuntu quantal RELEASE (widelands-dev-widelands-daily PPA)
* Source Package: widelands * Version: 1:18-ppa0-bzr6970-201405290533~ubuntu12.10.1 * Architecture: amd64 * Archive: widelands-dev-widelands-daily PPA * Component: main * State: Failed to build * Duration: 12 minutes * Build Log: https://launchpad.net/~widelands-dev/+archive/widelands-daily/+build/6050340/+files/buildlog_ubuntu-quantal-amd64.widelands_1%3A18-ppa0-bzr6970-201405290533%7Eubuntu12.10.1_FAILEDTOBUILD.txt.gz * Builder: https://launchpad.net/builders/chindi01 * Source: not available If you want further information about this situation, feel free to contact a member of the Launchpad Buildd Administrators team. -- amd64 build of widelands 1:18-ppa0-bzr6970-201405290533~ubuntu12.10.1 in ubuntu quantal RELEASE https://launchpad.net/~widelands-dev/+archive/widelands-daily/+build/6050340 ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Build #6050347] i386 build of widelands 1:18-ppa0-bzr6970-201405290534~ubuntu12.04.1 in ubuntu precise RELEASE (widelands-dev-widelands-daily-precise PPA)
* Source Package: widelands * Version: 1:18-ppa0-bzr6970-201405290534~ubuntu12.04.1 * Architecture: i386 * Archive: widelands-dev-widelands-daily-precise PPA * Component: main * State: Failed to build * Duration: 9 minutes * Build Log: https://launchpad.net/~widelands-dev/+archive/widelands-daily-precise/+build/6050347/+files/buildlog_ubuntu-precise-i386.widelands_1%3A18-ppa0-bzr6970-201405290534%7Eubuntu12.04.1_FAILEDTOBUILD.txt.gz * Builder: https://launchpad.net/builders/chindi07 * Source: not available If you want further information about this situation, feel free to contact a member of the Launchpad Buildd Administrators team. -- i386 build of widelands 1:18-ppa0-bzr6970-201405290534~ubuntu12.04.1 in ubuntu precise RELEASE https://launchpad.net/~widelands-dev/+archive/widelands-daily-precise/+build/6050347 ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp