[Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_portspaces into lp:widelands
Continuous integration builds have changed state: Travis build 3031. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/325644451. Appveyor build 2839. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_ai_portspaces-2839. -- https://code.launchpad.net/~widelands-dev/widelands/ai_portspaces/+merge/335785 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/ai_portspaces into lp:widelands. ___ 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] [Merge] lp:~widelands-dev/widelands/ai_portspaces into lp:widelands
TiborB has proposed merging lp:~widelands-dev/widelands/ai_portspaces into lp:widelands. Requested reviews: Widelands Developers (widelands-dev) For more details, see: https://code.launchpad.net/~widelands-dev/widelands/ai_portspaces/+merge/335785 AI now scans entire map for portspaces. And multiple changes to the logic, including logic of placing militarysites - they now know there is (unowned) vicinity of port spaces (or portspaces themselves) -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/ai_portspaces into lp:widelands. === modified file 'src/ai/ai_help_structs.cc' --- src/ai/ai_help_structs.cc 2017-11-24 09:19:52 + +++ src/ai/ai_help_structs.cc 2018-01-05 22:15:52 + @@ -236,6 +236,7 @@ unowned_land_nearby(0), enemy_owned_land_nearby(0U), unowned_buildable_spots_nearby(0U), + unowned_portspace_vicinity_nearby(0U), nearest_buildable_spot_nearby(0U), near_border(false), unowned_mines_spots_nearby(0), === modified file 'src/ai/ai_help_structs.h' --- src/ai/ai_help_structs.h 2017-11-17 07:16:12 + +++ src/ai/ai_help_structs.h 2018-01-05 22:15:52 + @@ -316,6 +316,7 @@ uint16_t unowned_land_nearby; uint16_t enemy_owned_land_nearby; uint16_t unowned_buildable_spots_nearby; + uint16_t unowned_portspace_vicinity_nearby; uint16_t nearest_buildable_spot_nearby; // to identify that field is too close to border and no production building should be built there bool near_border; @@ -356,7 +357,7 @@ Widelands::ExtendedBool is_portspace; bool port_nearby; // to increase priority if a port is nearby, // especially for new colonies - Widelands::ExtendedBool portspace_nearby; // prefer military buildings closer to the portspace + Widelands::ExtendedBool portspace_nearby; // special fields intended for ports int32_t max_buildcap_nearby; // It is not necessary to check resources (stones, fish...) too frequently as they do not change // fast. This stores the time of the last check. === modified file 'src/ai/defaultai.cc' --- src/ai/defaultai.cc 2017-12-10 21:19:02 + +++ src/ai/defaultai.cc 2018-01-05 22:15:52 + @@ -123,7 +123,7 @@ if (note.ownership == NoteFieldPossession::Ownership::GAINED) { unusable_fields.push_back(note.fc); } - }); + }); // Subscribe to NoteImmovables. immovable_subscriber_ = @@ -139,7 +139,7 @@ } else { lose_immovable(*note.pi); } - }); + }); // Subscribe to ProductionSiteOutOfResources. outofresource_subscriber_ = Notifications::subscribe( @@ -150,7 +150,7 @@ out_of_resources_site(*note.ps); - }); + }); // Subscribe to TrainingSiteSoldierTrained. soldiertrained_subscriber_ = Notifications::subscribe( @@ -161,46 +161,48 @@ soldier_trained(*note.ts); - }); + }); // Subscribe to ShipNotes. - shipnotes_subscriber_ = Notifications::subscribe([this]( - const NoteShipMessage& note) { - - // in a short time between start and late_initialization the player - // can get notes that can not be processed. - // It seems that this causes no problem, at least no substantial - if (player_ == nullptr) { - return; - } - if (note.ship->get_owner()->player_number() != player_->player_number()) { - return; - } - - switch (note.message) { - - case NoteShipMessage::Message::kGained: - gain_ship(*note.ship, NewShip::kBuilt); - break; - - case NoteShipMessage::Message::kLost: - for (std::deque::iterator i = allships.begin(); i != allships.end(); ++i) { -if (i->ship == note.ship) { - allships.erase(i); - break; -} - } - break; - - case NoteShipMessage::Message::kWaitingForCommand: - for (std::deque::iterator i = allships.begin(); i != allships.end(); ++i) { -if (i->ship == note.ship) { - i->waiting_for_command_ = true; - break; -} - } - } - }); + shipnotes_subscriber_ = + Notifications::subscribe([this](const NoteShipMessage& note) { + + // in a short time between start and late_initialization the player + // can get notes that can not be processed. + // It seems that this causes no problem, at least no substantial + if (player_ == nullptr) { + return; + } + if (note.ship->get_owner()->player_number() != player_->player_number()) { + return; + } + + switch (note.message) { + + case NoteShipMessage::Message::kGained: + gain_ship(*note.ship, NewShip::kBuilt); + break; + + case NoteShipMessage::Message::kLost: + for (std::deque::iterator i = allships.begin(); i != allships.end(); + ++i) { + if (i->ship == note.ship) { + allships.erase(i); + break; + } + } + break; + + case NoteShipMessage::Message::kWaitingForCommand: + for (std::deque::iterator i = allships.begin(); i != allships.end(); + ++i) { + if (i->ship == note.ship) { + i->waiting_for_command_ = true; +
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/fh1-scenario-groundwork-emp1 into lp:widelands
Continuous integration builds have changed state: Travis build 3027. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/325436141. Appveyor build 2835. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_fh1_scenario_groundwork_emp1-2835. -- https://code.launchpad.net/~widelands-dev/widelands/fh1-scenario-groundwork-emp1/+merge/335294 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/fh1-scenario-groundwork-emp1. ___ 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] [Merge] lp:~widelands-dev/widelands/fh1-finish_help into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/fh1-finish_help into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/fh1-finish_help/+merge/335708 -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/fh1-finish_help into lp:widelands. ___ 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
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/fh1-scenario-groundwork-emp1 into lp:widelands
Review: Needs Fixing No, see diff comment. Diff comments: > > === modified file 'data/scripting/richtext.lua' > --- data/scripting/richtext.lua 2017-12-27 14:25:35 + > +++ data/scripting/richtext.lua 2018-01-05 12:13:24 + > @@ -305,8 +305,8 @@ > --:arg text: the text of the list item > -- > --:returns: a p tag containing the formatted text > + > function li(text_or_symbol, text) > - if text then Removed if statement? The else clause below is superflous then? >return div(p(text_or_symbol)) .. div(p(space(6))) .. div("width=*", > p(text .. vspace(6))) > else >return div(p("•")) .. div(p(space(6))) .. div("width=*", > p(text_or_symbol .. vspace(6))) -- https://code.launchpad.net/~widelands-dev/widelands/fh1-scenario-groundwork-emp1/+merge/335294 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/fh1-scenario-groundwork-emp1. ___ 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
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/fh1-finish_help into lp:widelands
1. It as always been right aligned - I don't want to make a design change in this branch 2. We have a maximum limit of images per row, so it won't get too wide on smaller resolutions. So, also a proposed design change and not a bug in this branch. Thanks for the review! :) It was already designed this way before I ever started working on it, and I wouldn't object to doing a redesign some time in the future. It would be really nice to have some proper tables here. @bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/fh1-finish_help/+merge/335708 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/fh1-finish_help into lp:widelands. ___ 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
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/fh1-scenario-groundwork-emp1 into lp:widelands
Hopefully fixed now. -- https://code.launchpad.net/~widelands-dev/widelands/fh1-scenario-groundwork-emp1/+merge/335294 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/fh1-scenario-groundwork-emp1. ___ 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