[Widelands-dev] [Merge] lp:~widelands-dev/widelands/split_up_liblogic_3_some_circular into lp:widelands
Continuous integration builds have changed state: Travis build 4899. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/528533867. Appveyor build 4680. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_split_up_liblogic_3_some_circular-4680. -- https://code.launchpad.net/~widelands-dev/widelands/split_up_liblogic_3_some_circular/+merge/366960 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/split_up_liblogic_3_some_circular 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/bug-1827033-shipping-algorithm into lp:widelands
Continuous integration builds have changed state: Travis build 4896. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/528437763. Appveyor build 4677. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1827033_shipping_algorithm-4677. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1827033-shipping-algorithm/+merge/366959 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1827033-shipping-algorithm 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/bug-1827182-sort-client-list into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/bug-1827182-sort-client-list into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/bug-1827182-sort-client-list/+merge/366843 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1827182-sort-client-list. ___ 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-1827182-sort-client-list into lp:widelands
well :) @bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/bug-1827182-sort-client-list/+merge/366843 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1827182-sort-client-list. ___ 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/bug-1827182-sort-client-list into lp:widelands
Continuous integration builds have changed state: Travis build 4895. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/528399156. Appveyor build 4676. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1827182_sort_client_list-4676. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1827182-sort-client-list/+merge/366843 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1827182-sort-client-list. ___ 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/split_up_liblogic_3_some_circular into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/split_up_liblogic_3_some_circular into lp:widelands has been updated. Commit message changed to: New wl_library and logic_objectives. logic_map no longer depends on logic. Removed obsolete inclusion of network from logic. For more details, see: https://code.launchpad.net/~widelands-dev/widelands/split_up_liblogic_3_some_circular/+merge/366960 -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/split_up_liblogic_3_some_circular 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/economy-target-profiles into lp:widelands
All the tribe's configuration is in LuaTables, so I guess mainly for consistency - I don't feel strongly about this though. Good point about the value in the spinbox - I still think we should have the possibility of having steps of 10 though. Maybe fake it with 4 buttons and make them look like the spinbox buttons? -- https://code.launchpad.net/~widelands-dev/widelands/economy-target-profiles/+merge/366952 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/economy-target-profiles 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/economy-target-profiles into lp:widelands
Is there a reason why you prefer LuaTables over profile? Personally I find Profile much easier to use for configs that the user has no reason to manually edit. Regarding the suggestion in the bug report – A spinbox would make sense, but what value should it display when several wares with different settings are selected? -- https://code.launchpad.net/~widelands-dev/widelands/economy-target-profiles/+merge/366952 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/economy-target-profiles 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/split_up_liblogic_2_mapobjectdescr into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/split_up_liblogic_2_mapobjectdescr into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/split_up_liblogic_2_mapobjectdescr/+merge/366332 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/split_up_liblogic_2_mapobjectdescr. ___ 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/economy-target-profiles into lp:widelands
New code LGTM. I am wondering whether we want to save this as Lua tables? I already have the code finished in the spritesheets branch and could pull it out into a separate branch, since spritesheets aren't ready yet. -- https://code.launchpad.net/~widelands-dev/widelands/economy-target-profiles/+merge/366952 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/economy-target-profiles 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/split_up_liblogic_2_mapobjectdescr into lp:widelands
Review: Approve Retested Thanks for the review :) @bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/split_up_liblogic_2_mapobjectdescr/+merge/366332 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/split_up_liblogic_2_mapobjectdescr. ___ 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-1827182-sort-client-list into lp:widelands
Review: Approve Tested and working :) -- https://code.launchpad.net/~widelands-dev/widelands/bug-1827182-sort-client-list/+merge/366843 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1827182-sort-client-list. ___ 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-1827182-sort-client-list into lp:widelands
> Some regression tais fail, but I dont think they are related: > Neither do I. Lets wait for travis. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1827182-sort-client-list/+merge/366843 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1827182-sort-client-list. ___ 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/bug-1827033-shipping-algorithm into lp:widelands
Benedikt Straub has proposed merging lp:~widelands-dev/widelands/bug-1827033-shipping-algorithm into lp:widelands. Commit message: Fix an assert fail because of nullptr destinations in the shipping algorithm Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #1827033 in widelands: "Neptuns Revenge: Assert is_path_favourable,fleet.cc,764. bzr9088" https://bugs.launchpad.net/widelands/+bug/1827033 For more details, see: https://code.launchpad.net/~widelands-dev/widelands/bug-1827033-shipping-algorithm/+merge/366959 I have a feeling that this only masks the real issue. Portdock code first removes items that don´t have a portdock as destination and implicitly re-adds them at once. This causes *nullptr to be passed as an argument, resulting in the assert fail. This branch simply prevents this situation by skipping something that doesn´t work anyway, so it shouldn´t have undesired side-effects. Someone who knows (or wrote) that code should check why the unallowed elements are adressed to a portdock when they should not be and therefore re-add themselves... -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1827033-shipping-algorithm into lp:widelands. === modified file 'src/economy/portdock.cc' --- src/economy/portdock.cc 2019-04-24 15:11:23 + +++ src/economy/portdock.cc 2019-05-05 12:42:44 + @@ -368,6 +368,17 @@ } } + // Decide where the arrived ship will go next + PortDock* next_port = fleet_->find_next_dest(game, ship, *this); + if (next_port) { + // Unload any wares/workers onboard the departing ship which are not favored by next dest + ship.unload_unfit_items(game, *this, *next_port); + } +#ifndef NDEBUG + else + assert(ship.get_nritems() == 0); +#endif + // Check for items with invalid destination. TODO(ypopezios): Prevent invalid destinations for (auto si_it = waiting_.begin(); si_it != waiting_.end(); ++si_it) { if (!si_it->get_destination(game)) { @@ -378,16 +389,11 @@ } } - // Decide where the arrived ship will go next - PortDock* next_port = fleet_->find_next_dest(game, ship, *this); if (!next_port) { - ship.set_destination(next_port); + ship.set_destination(nullptr); return; // no need to load anything } - // Unload any wares/workers onboard the departing ship which are not favored by next dest - ship.unload_unfit_items(game, *this, *next_port); - // Then load the remaining capacity of the departing ship with relevant items uint32_t remaining_capacity = ship.descr().get_capacity() - ship.get_nritems(); @@ -402,7 +408,8 @@ // Then load any wares/workers favored by the chosen destination for (auto si_it = waiting_.begin(); si_it != waiting_.end() && remaining_capacity > 0; ++si_it) { - if (fleet_->is_path_favourable(*this, *next_port, *si_it->get_destination(game))) { + const PortDock* dest = si_it->get_destination(game); + if (dest && fleet_->is_path_favourable(*this, *next_port, *dest)) { ship.add_item(game, *si_it); si_it = waiting_.erase(si_it); --remaining_capacity; === modified file 'src/logic/map_objects/tribes/ship.cc' --- src/logic/map_objects/tribes/ship.cc 2019-05-03 08:01:07 + +++ src/logic/map_objects/tribes/ship.cc 2019-05-05 12:42:44 + @@ -788,7 +788,8 @@ void Ship::unload_unfit_items(Game& game, PortDock& here, const PortDock& nextdest) { size_t dst = 0; for (ShippingItem& si : items_) { - if (fleet_->is_path_favourable(here, nextdest, *si.get_destination(game))) { + const PortDock* dest = si.get_destination(game); + if (dest && fleet_->is_path_favourable(here, nextdest, *dest)) { items_[dst++] = si; } else { here.shipping_item_returned(game, si); ___ 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-1827182-sort-client-list into lp:widelands
Some regression tais fail, but I dont think they are related: ./regression_test.py -b ./widelands FAIL: test/maps/ship_transportation.wmf/scripting/test_rip_ship_before_picking_up_transporting_ware.lua FAIL: test/maps/ship_transportation.wmf/scripting/test_rip_portdock_with_worker_and_ware_in_transit.lua FAIL: test/maps/ship_transportation.wmf/scripting/test_rip_ports_with_worker_in_transit.lua Ran 44 tests in 1493.063s FAILED (failures=3) -- https://code.launchpad.net/~widelands-dev/widelands/bug-1827182-sort-client-list/+merge/366843 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1827182-sort-client-list. ___ 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/refactor_gameclient into lp:widelands
Continuous integration builds have changed state: Travis build 4891. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/528361519. Appveyor build 4672. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_refactor_gameclient-4672. -- https://code.launchpad.net/~widelands-dev/widelands/refactor_gameclient/+merge/366743 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/refactor_gameclient. ___ 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-1827182-sort-client-list into lp:widelands
Done -- https://code.launchpad.net/~widelands-dev/widelands/bug-1827182-sort-client-list/+merge/366843 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1827182-sort-client-list. ___ 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-1827182-sort-client-list into lp:widelands
I think this is a better fix: bool has_focus() const { return (get_can_focus() && parent_->focus_ == this); } That can_ / has_focus handling is a bit different then I had expected, well Works find for me now -- https://code.launchpad.net/~widelands-dev/widelands/bug-1827182-sort-client-list/+merge/366843 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1827182-sort-client-list. ___ 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-1827182-sort-client-list into lp:widelands
If you have any idea let me know. I'm running out of ideas. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1827182-sort-client-list/+merge/366843 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1827182-sort-client-list. ___ 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-1827182-sort-client-list into lp:widelands
Mhh, that assert looks valid fro me. Question is why this particular inputfield does not have the corresponding flag set? -- https://code.launchpad.net/~widelands-dev/widelands/bug-1827182-sort-client-list/+merge/366843 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1827182-sort-client-list. ___ 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-1827182-sort-client-list into lp:widelands
I'm pretty sure this assert is wrong here. Removed it in r9101. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1827182-sort-client-list/+merge/366843 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1827182-sort-client-list. ___ 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/split_up_liblogic_2_mapobjectdescr into lp:widelands
Review: Approve code Code LGTM, not tested. -- https://code.launchpad.net/~widelands-dev/widelands/split_up_liblogic_2_mapobjectdescr/+merge/366332 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/split_up_liblogic_2_mapobjectdescr. ___ 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-1827182-sort-client-list into lp:widelands
Is this assert even correct? When calling has_focus() I expect either true or false. And it crashes here because it receives a false as answer but expects a true, which doesn't make much sense to me. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1827182-sort-client-list/+merge/366843 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1827182-sort-client-list. ___ 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-1827182-sort-client-list into lp:widelands
Thats the way how Asserts work ... only in debug bilds. I dont have that much time today, Ill try to throw it at the debugger. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1827182-sort-client-list/+merge/366843 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1827182-sort-client-list. ___ 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/economy-target-profiles into lp:widelands
Addressed the reviews: The panels now set hgaps to fill the entire available space, and the profiles are stored in tribes/economy_profiles. I added translation markup to the predefined profiles. -- https://code.launchpad.net/~widelands-dev/widelands/economy-target-profiles/+merge/366952 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/economy-target-profiles 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/bug-1827182-sort-client-list into lp:widelands
Okay it only crashes in when compiled in debug mode. Release builds don't crash. Weird. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1827182-sort-client-list/+merge/366843 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1827182-sort-client-list. ___ 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/refactor_gameclient into lp:widelands
Review: Resubmit Found that I lost a '!' while refactoring. Now a normal network game works as itendend. I assume that disconnect/double freee has always been there, I will create a followup bug for that one. When debugging I triggered a racecondition, I doubt we ever will see that i the wild. Gun: and all, please take anotheer look -- https://code.launchpad.net/~widelands-dev/widelands/refactor_gameclient/+merge/366743 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/refactor_gameclient. ___ 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/economy-target-profiles into lp:widelands
2 Comments. Will do some testing. Diff comments: > === added directory 'data/economy_profiles' > === added file 'data/economy_profiles/atlanteans' > --- data/economy_profiles/atlanteans 1970-01-01 00:00:00 + > +++ data/economy_profiles/atlanteans 2019-05-05 05:49:29 + > @@ -0,0 +1,85 @@ > +# Automatically created by Widelands bzr9094[economy-target-profiles] (Debug) > + > +[Efficiency] These names need to be translatable. I also think that the files should live under "tribes". > +blackroot_flour="1" > +atlanteans_bread="20" > +bread_paddle="0" > +buckets="0" > +coal="5" > +cornmeal="3" > +diamond="3" > +fire_tongs="1" > +fishing_net="2" > +gold="1" > +gold_ore="1" > +gold_thread="0" > +granite="10" > +hammer="0" > +hook_pole="0" > +hunting_bow="1" > +iron="5" > +iron_ore="1" > +milking_tongs="0" > +pick="1" > +planks="1" > +quartz="3" > +saw="0" > +scythe="0" > +shield_advanced="0" > +shield_steel="0" > +shovel="0" > +smoked_fish="5" > +smoked_meat="3" > +spidercloth="5" > +spider_silk="5" > +tabard="1" > +tabard_golden="0" > +trident_double="0" > +trident_heavy_double="0" > +trident_light="1" > +trident_long="0" > +trident_steel="0" > +atlanteans_horse="1" > +atlanteans_soldier="10" > + > +[Stockpile] > +blackroot_flour="20" > +atlanteans_bread="30" > +bread_paddle="1" > +buckets="2" > +coal="25" > +cornmeal="20" > +diamond="10" > +fire_tongs="1" > +fishing_net="2" > +gold="20" > +gold_ore="15" > +gold_thread="5" > +granite="30" > +hammer="2" > +hook_pole="1" > +hunting_bow="1" > +iron="25" > +iron_ore="20" > +milking_tongs="1" > +pick="3" > +planks="40" > +quartz="10" > +saw="2" > +scythe="1" > +shield_advanced="1" > +shield_steel="1" > +shovel="2" > +smoked_fish="40" > +smoked_meat="25" > +spidercloth="20" > +spider_silk="15" > +tabard="30" > +tabard_golden="1" > +trident_double="1" > +trident_heavy_double="1" > +trident_light="30" > +trident_long="1" > +trident_steel="1" > +atlanteans_horse="20" > +atlanteans_soldier="20" > > === modified file 'src/wui/economy_options_window.cc' > --- src/wui/economy_options_window.cc 2019-02-23 11:00:49 + > +++ src/wui/economy_options_window.cc 2019-05-05 05:49:29 + > @@ -186,35 +247,264 @@ > const Widelands::Economy::TargetQuantity& tq = is_wares > ? > > economy->ware_target_quantity(index) : > > economy->worker_target_quantity(index); > - // Don't allow negative new amount. > - if (amount >= 0 || -amount <= > static_cast(tq.permanent)) { > - if (is_wares) { > - game.send_player_command(*new > Widelands::CmdSetWareTargetQuantity( > -game.get_gametime(), > player_->player_number(), serial_, index, > -tq.permanent + amount)); > - } else { > - game.send_player_command(*new > Widelands::CmdSetWorkerTargetQuantity( > -game.get_gametime(), > player_->player_number(), serial_, index, > -tq.permanent + amount)); > + // Don't allow negative new amount > + const int old_amount = static_cast(tq.permanent); > + const int new_amount = std::max(0, old_amount + delta); > + if (new_amount == old_amount) { > + continue; > + } > + if (is_wares) { > + game.send_player_command(*new > Widelands::CmdSetWareTargetQuantity( > +game.get_gametime(), > player_->player_number(), serial_, index, new_amount)); > + } else { > + game.send_player_command(*new > Widelands::CmdSetWorkerTargetQuantity( > +game.get_gametime(), > player_->player_number(), serial_, index, new_amount)); > + } > + } > + } > +} > + > +void EconomyOptionsWindow::EconomyOptionsPanel::reset_target() { > + Widelands::Game& game = > dynamic_cast(player_->egbase()); > + const bool is_wares = type_ == Widelands::wwWARE; > + const auto& items = is_wares ? player_->tribe().wares() : > player_->tribe().workers(); > + const PredefinedTargets settings = > economy_options_window_->get_selected_target(); > + for (const Widelands::DescriptionIndex& index : items) { > + if (display_.ware_selected(index)) { > + if (is_wares) { > + game.send_player_command(*new > Widelands::CmdSetWareTargetQuantity( > + game.get_gametime(), > player_->player_number(), serial_, index,
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1827182-sort-client-list into lp:widelands
I an crash this. 1. Host a new LAN game 2. Type something 3. Click on the icon next to your username widelands: ../src/ui_basic/panel.h:267: bool UI::Panel::has_focus() const: Assertion `get_can_focus()' failed. Thread 1 "widelands" received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) backtrace #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x7434c801 in __GI_abort () at abort.c:79 #2 0x7433c39a in __assert_fail_base (fmt=0x744c37d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x576043e0 "get_can_focus()", file=file@entry=0x576043a0 "../src/ui_basic/panel.h", line=line@entry=267, function=function@entry=0x5760cd20 "bool UI::Panel::has_focus() const") at assert.c:92 #3 0x7433c412 in __GI___assert_fail (assertion=0x576043e0 "get_can_focus()", file=0x576043a0 "../src/ui_basic/panel.h", line=267, function=0x5760cd20 "bool UI::Panel::has_focus() const") at assert.c:101 #4 0x56af02c4 in UI::Panel::has_focus (this=0x61a00023e590) at ../src/ui_basic/panel.h:267 #5 0x56afc1d0 in UI::EditBox::draw (this=0x61a00023e590, dst=...) at ../src/ui_basic/editbox.cc:364 #6 0x56b2e32d in UI::Panel::do_draw_inner (this=0x61a00023e590, dst=...) at ../src/ui_basic/panel.cc:755 #7 0x56b2ea07 in UI::Panel::do_draw (this=0x61a00023e590, dst=...) at ../src/ui_basic/panel.cc:788 #8 0x56b2e378 in UI::Panel::do_draw_inner (this=0x61a00023e280, dst=...) at ../src/ui_basic/panel.cc:759 #9 0x56b2ea07 in UI::Panel::do_draw (this=0x61a00023e280, dst=...) at ../src/ui_basic/panel.cc:788 #10 0x56b2e378 in UI::Panel::do_draw_inner (this=0x7fff5af0, dst=...) at ../src/ui_basic/panel.cc:759 #11 0x56b2ea07 in UI::Panel::do_draw (this=0x7fff5af0, dst=...) at ../src/ui_basic/panel.cc:788 #12 0x56b2a015 in UI::Panel::do_run (this=0x7fff5af0) at ../src/ui_basic/panel.cc:195 #13 0x563898fe in UI::Panel::run (this=0x7fff5af0) at ../src/ui_basic/panel.h:104 #14 0x56a057ad in GameHost::run (this=0x7fff7470) at ../src/network/gamehost.cc:608 #15 0x56376289 in WLApplication::mainmenu_multiplayer (this=0x61100180) at ../src/wlapplication.cc:1275 #16 0x56374a40 in WLApplication::mainmenu (this=0x61100180) at ../src/wlapplication.cc:1113 #17 0x5636ba12 in WLApplication::run (this=0x61100180) at ../src/wlapplication.cc:466 #18 0x563677af in main (argc=1, argv=0x7fffde88) at ../src/main.cc:44 -- https://code.launchpad.net/~widelands-dev/widelands/bug-1827182-sort-client-list/+merge/366843 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1827182-sort-client-list. ___ 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