[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1842396-no-tribe into lp:widelands
Continuous integration builds have changed state: Travis build 5391. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/581403115. Appveyor build 5161. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1842396_no_tribe-5161. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1842396-no-tribe/+merge/372281 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1842396-no-tribe. ___ 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/bug-1842396-no-tribe into lp:widelands
Sounds got to me, the changes are online. Thanks for the reviews! -- https://code.launchpad.net/~widelands-dev/widelands/bug-1842396-no-tribe/+merge/372281 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1842396-no-tribe. ___ 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/amazons-coding-changes into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/amazons-coding-changes into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/amazons-coding-changes/+merge/371725 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/amazons-coding-changes. ___ 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/amazons-coding-changes into lp:widelands
Continuous integration builds have changed state: Travis build 5389. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/581267547. Appveyor build 5159. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_amazons_coding_changes-5159. -- https://code.launchpad.net/~widelands-dev/widelands/amazons-coding-changes/+merge/371725 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/amazons-coding-changes. ___ 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/amazons-coding-changes into lp:widelands
Hm I still get the following error in a release build. Unexpected error during the game vector::_M_range_check: __n (which is 255) >= this->size() (which is 131) will install a debug build now -- https://code.launchpad.net/~widelands-dev/widelands/amazons-coding-changes/+merge/371725 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/amazons-coding-changes. ___ 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/ferry into lp:widelands
Looks like the metal workshop 'hangs', it always shows 'The Economy doesn't need the ware Bradpaddle', although the game run more than 5 Minutes. -- https://code.launchpad.net/~widelands-dev/widelands/ferry/+merge/351880 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/ferry. ___ 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/amazons-coding-changes into lp:widelands
Review: Approve @bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/amazons-coding-changes/+merge/371725 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/amazons-coding-changes. ___ 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/amazons-coding-changes into lp:widelands
Review: Approve Looks like the crash has been identified: https://www.widelands.org/forum/topic/2897/?page=11#post-29630 So, this is a data issue unrelated to this branch. I'll revert the tribes and merge. -- https://code.launchpad.net/~widelands-dev/widelands/amazons-coding-changes/+merge/371725 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/amazons-coding-changes. ___ 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/amazons-coding-changes into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/amazons-coding-changes into lp:widelands has been updated. Commit message changed to: Implements the coding changes required for the new amazons tribe: - findspace:swim (for water gatherers) - Enhancing terrains (for gardening center) - Constructing buildings over immovables (for treetop sentry) For more details, see: https://code.launchpad.net/~widelands-dev/widelands/amazons-coding-changes/+merge/371725 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/amazons-coding-changes. ___ 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/new-shipping into lp:widelands
I have added some comments Diff comments: > > === modified file 'src/logic/map_objects/tribes/ship.cc' > --- src/logic/map_objects/tribes/ship.cc 2019-05-27 14:28:34 + > +++ src/logic/map_objects/tribes/ship.cc 2019-09-03 15:47:16 + > @@ -736,22 +736,215 @@ > } > } > > +bool Ship::has_destination(EditorGameBase& egbase, const PortDock& pd) const > { > + for (const auto& pair : destinations_) { > + if (pair.first.get(egbase) == ) { > + return true; > + } > + } > + return false; > +} > + > /** > * Enter a new destination port for the ship. > * Call this after (un)loading the ship, for proper logging. > */ > -void Ship::set_destination(PortDock* pd) { > - destination_ = pd; > - if (pd) { > - molog("set_destination / sending to portdock %u (carrying %" > PRIuS " items)\n", pd->serial(), > - items_.size()); > - pd->ship_coming(true); > - } else { > - molog("set_destination / none\n"); > +void Ship::push_destination(Game& game, PortDock& pd) { > + for (auto it = destinations_.begin(); it != destinations_.end(); ++it) { for (const auto& pair : destinations_) { > + if (it->first.get(game) == ) { > + // We're already going there > + return; > + } > } > + destinations_.push_back(std::make_pair(OPtr(), 1)); > + reorder_destinations(game); > + molog("push_destination(%u): rerouted to portdock %u (carrying %" PRIuS > " items)\n", > + pd.serial(), get_current_destination(game)->serial(), > items_.size()); > + pd.ship_coming(*this, true); > Notifications::publish(NoteShip(this, > NoteShip::Action::kDestinationChanged)); > } > > +void Ship::clear_destinations(Game& game) { > + while (!destinations_.empty()) { > + pop_destination(game, *destinations_.front().first.get(game)); > + } > +} > + > +/** > + * Remove this destination from the queue > + */ > +void Ship::pop_destination(Game& game, PortDock& pd) { > + pd.ship_coming(*this, false); > + for (auto it = destinations_.begin(); it != destinations_.end(); ++it) { > + if (it->first.get(game) == ) { > + destinations_.erase(it); > + reorder_destinations(game); > + if (destinations_.empty()) { > + molog("pop_destination(%u): no destinations and > %" PRIuS " items left\n", > + pd.serial(), items_.size()); > + } else { > + molog("pop_destination(%u): rerouted to > portdock %u (carrying %" PRIuS " items)\n", > + pd.serial(), > get_current_destination(game)->serial(), items_.size()); > + } > + return; > + } > + } > +} > + > +// Recursively find the best ordering for our destinations > +static inline float prioritised_distance(Path& path, uint32_t priority, > uint32_t items) { > + return static_cast(path.get_nsteps() * items) / (priority * > priority); > +} > +using DestinationsQueue = std::vector>; > +static std::pair shortest_order(Game& game, > + Fleet& fleet, > + bool is_on_dock, > + void* start, > + const > DestinationsQueue& remaining_to_visit, > + const > std::map shipping_items) { > + const size_t nr_dests = remaining_to_visit.size(); > + assert(nr_dests > 0); > + if (nr_dests == 1) { > + // Recursion break: Only one portdock left > + Path path; > + if (is_on_dock) { > + PortDock* p = static_cast(start); > + if (p != remaining_to_visit[0].first) { > + fleet.get_path(*p, > *remaining_to_visit[0].first, path); > + } > + } else { > + static_cast(start)->calculate_sea_route(game, > *remaining_to_visit[0].first, ); > + } > + return std::pair(remaining_to_visit, > prioritised_distance( > + path, remaining_to_visit[0].second, > shipping_items.at(remaining_to_visit[0].first))); > + } > + > + std::pair best_result; > + best_result.second = std::numeric_limits::max(); > + for (const auto& pair : remaining_to_visit) { > + DestinationsQueue remaining; > + for (const auto& p : remaining_to_visit) { > + if (p.first != pair.first) { > + remaining.push_back(p); > + } > +
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1842396-no-tribe into lp:widelands
I think we should fix all of them. How about sticking them into a new function bool has_players_tribe() in game_settings.h? -- https://code.launchpad.net/~widelands-dev/widelands/bug-1842396-no-tribe/+merge/372281 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1842396-no-tribe. ___ 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/amazons-coding-changes into lp:widelands
try with gdb if you can -- https://code.launchpad.net/~widelands-dev/widelands/amazons-coding-changes/+merge/371725 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/amazons-coding-changes. ___ 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/amazons-coding-changes into lp:widelands
While running an Ai only local multiplayer with 4 amazon tribes I get a crash with not very much information logged. Currently I don't know where this is coming from. -- https://code.launchpad.net/~widelands-dev/widelands/amazons-coding-changes/+merge/371725 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/amazons-coding-changes. ___ 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/emp_4_fixes into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/emp_4_fixes into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/emp_4_fixes/+merge/372196 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/emp_4_fixes. ___ 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/bug-1842396-no-tribe into lp:widelands
We could use if (UserSettings::highest_playernum() >= settings.playernum) which is the check used inside of the throwing get_players_tribe() function to decide whether to throw. I decided to catch the exception since that is what is done in the other two cases the function is used, but of course we could change those calls as well. The current fix is a copy of those other calls. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1842396-no-tribe/+merge/372281 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1842396-no-tribe. ___ 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/emp_4_fixes into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/emp_4_fixes into lp:widelands has been updated. Commit message changed to: Fixes to Empire scenario 4 - small trainingcamp is now buildable although at very high costs. (it is not intended the player should stay with them) - first objective done with 2 buildings still standing (although you miss the woodcutter in the new building then) - wells have only 5 percent chance to mine water - added some texts to not dismantle bigger buildings until we know what we are doing. For more details, see: https://code.launchpad.net/~widelands-dev/widelands/emp_4_fixes/+merge/372196 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/emp_4_fixes. ___ 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/emp_4_fixes into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/emp_4_fixes into lp:widelands has been updated. Description changed to: fixes issues described in https://www.widelands.org/forum/topic/4617/?page=1#post-29597 For more details, see: https://code.launchpad.net/~widelands-dev/widelands/emp_4_fixes/+merge/372196 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/emp_4_fixes. ___ 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/emp_4_fixes into lp:widelands
Review: Approve LGTM :) @bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/emp_4_fixes/+merge/372196 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/emp_4_fixes. ___ 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