Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle into lp:widelands
Review: Resubmit We already had to add some strings for other bug fixes. I think breaking the string freeze for smaller strings is OK, as long as we don't overdo it. I have addressed all the points in the code review now. We can't check for duplicate keys in Lua tables, because the backend (Eris) or maybe Lua itself already squashes them. So, I have removed all those checks. -- https://code.launchpad.net/~widelands-dev/widelands/empire04_unused_key_return_on_dismantle/+merge/358273 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle. ___ 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/handling-various-fs-errors into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/handling-various-fs-errors into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/handling-various-fs-errors/+merge/358767 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/handling-various-fs-errors. ___ 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/terrain_affinity_as_int into lp:widelands
Thanks for your math wizardry - I have now implemented both suggestions. I think that greatly cutting the precision while forcing a uniform rounding strategy (round down) should be good enough for our purposes. Let's merge this and see if we're still getting desyncs. We can always decide to change the formula later if necessary. @bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/terrain_affinity_as_int/+merge/358299 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/terrain_affinity_as_int. ___ 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/empire04_unused_key_return_on_dismantle into lp:widelands
Ok I will test this tonight and merge if ok. in the diff here on Launchpad there are some differing indentations? are they intentional? Anyhow I have marked them in the diff comments Diff comments: > > === modified file 'src/logic/map_objects/tribes/building.cc' > --- src/logic/map_objects/tribes/building.cc 2018-11-19 21:38:03 + > +++ src/logic/map_objects/tribes/building.cc 2018-11-23 08:20:28 + > @@ -59,7 +59,9 @@ > const EditorGameBase& egbase) > : MapObjectDescr(init_type, table.get_string("name"), init_descname, > table), > egbase_(egbase), > - buildable_(false), > + buildable_(table.has_key("buildcost")), > + can_be_dismantled_(table.has_key("return_on_dismantle") || > table.has_key("return_on_dismantle_on_enhanced")), > + destructible_(table.has_key("destructible") ? > table.get_bool("destructible") : true), different indentation. Intentional? > size_(BaseImmovable::SMALL), > mine_(false), > port_(false), > > === modified file 'src/logic/map_objects/tribes/building.h' > --- src/logic/map_objects/tribes/building.h 2018-09-25 06:32:35 + > +++ src/logic/map_objects/tribes/building.h 2018-11-23 08:20:28 + > @@ -73,6 +73,9 @@ > bool is_buildable() const { > return buildable_; > } > +bool can_be_dismantled() const { is this indentation intentional > + return can_be_dismantled_; > + } > bool is_destructible() const { > return destructible_; > } > @@ -172,8 +175,9 @@ > const EditorGameBase& egbase_; > > private: > - bool buildable_; // the player can build this himself > - bool destructible_; // the player can destruct this himself > + const bool buildable_; // the player can build this himself > +const bool can_be_dismantled_; // the player can dismantle this building same here > + const bool destructible_; // the player can destruct this himself > Buildcost buildcost_; > Buildcost return_dismantle_; // Returned wares on dismantle > Buildcost enhance_cost_; // cost for enhancing -- https://code.launchpad.net/~widelands-dev/widelands/empire04_unused_key_return_on_dismantle/+merge/358273 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle. ___ 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-1802629-territorial-crash into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1802629-territorial-crash into lp:widelands. Commit message: In territorial win conditions, remember the winning player's name in case the player got defeated a few milliseconds before the name is queried. More checks for defeated player. Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #1802629 in widelands: "crash on terratorial win" https://bugs.launchpad.net/widelands/+bug/1802629 For more details, see: https://code.launchpad.net/~widelands-dev/widelands/bug-1802629-territorial-crash/+merge/359227 -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1802629-territorial-crash into lp:widelands. === modified file 'data/scripting/win_conditions/territorial_functions.lua' --- data/scripting/win_conditions/territorial_functions.lua 2018-10-16 06:53:20 + +++ data/scripting/win_conditions/territorial_functions.lua 2018-11-23 08:52:32 + @@ -86,6 +86,8 @@ -- last_winning_team = -1, -- -- The currently winning player, if any. -1 means that no player is currently winning. -- last_winning_player = -1, +-- -- The name of the currently winning player, if any. Empty means that no player is currently winning. +-- last_winning_player_name = "", -- -- Remaining time in secs for victory by > 50% territory. Default value is also used to calculate whether to send a report to players. -- remaining_time = 10, -- -- Points by player @@ -98,6 +100,9 @@ -- TODO(GunChleoc): We want to be able to list multiple winners in case of a draw. last_winning_team = -1, last_winning_player = -1, + -- We record the last winning player name here to prevent crashes with retrieving + -- the player name when the player was just defeated a few ms ago + last_winning_player_name = "", remaining_time = 10, all_player_points = {}, points = {} @@ -140,6 +145,7 @@ winning_teams[teaminfo.team] = true territory_points.last_winning_team = teaminfo.team territory_points.last_winning_player = -1 +territory_points.last_winning_player_name = "" else winning_teams[teaminfo.team] = nil end @@ -150,6 +156,7 @@ territory_was_kept = winning_players[playerinfo.number] ~= nil winning_players[playerinfo.number] = true territory_points.last_winning_player = playerinfo.number +territory_points.last_winning_player_name = players[playerinfo.number].name territory_points.last_winning_team = -1 else winning_players[playerinfo.number] = nil @@ -248,7 +255,7 @@ if territory_points.last_winning_team >= 0 then winner_name = team_str:format(territory_points.last_winning_team) elseif territory_points.last_winning_player >= 0 then - winner_name = players[territory_points.last_winning_player].name + winner_name = territory_points.last_winning_player_name end local remaining_minutes = math.max(0, math.floor(territory_points.remaining_time / 60)) === modified file 'data/scripting/win_conditions/territorial_lord.lua' --- data/scripting/win_conditions/territorial_lord.lua 2018-09-28 18:05:24 + +++ data/scripting/win_conditions/territorial_lord.lua 2018-11-23 08:52:32 + @@ -42,6 +42,8 @@ local function _send_state() set_textdomain("win_conditions") + check_player_defeated(plrs, lost_game.title, lost_game.body, wc_descname, wc_version) + for idx, player in ipairs(plrs) do local msg = "" if territory_points.last_winning_team == player.team or territory_points.last_winning_player == player.number then === modified file 'data/scripting/win_conditions/territorial_time.lua' --- data/scripting/win_conditions/territorial_time.lua 2018-09-28 18:05:24 + +++ data/scripting/win_conditions/territorial_time.lua 2018-11-23 08:52:32 + @@ -46,6 +46,8 @@ local function _send_state() set_textdomain("win_conditions") + check_player_defeated(plrs, lost_game.title, lost_game.body, wc_descname, wc_version) + local remaining_max_minutes = remaining_max_time // 60 for idx, player in ipairs(plrs) do local msg = "" ___ 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/empire04_unused_key_return_on_dismantle into lp:widelands
Indentations will be fixed by bunnybot. I have set my IDE back to tabs from spaces, so it will be a bit less crazy in the future. The dismantle tooltip now only says "Dismantle" when there are no wares returned. I have tried out some alternatives and I think that looks best. -- https://code.launchpad.net/~widelands-dev/widelands/empire04_unused_key_return_on_dismantle/+merge/358273 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle. ___ 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/terrain_affinity_as_int into lp:widelands
Review: Approve Looks good now. The comment with the assciativity is kinda obsolete now though. And using int64_t wasn't really necessary now that you use the weights linearly. -- https://code.launchpad.net/~widelands-dev/widelands/terrain_affinity_as_int/+merge/358299 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/terrain_affinity_as_int. ___ 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-1802629-territorial-crash into lp:widelands
Continuous integration builds have changed state: Travis build 4267. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/458731325. Appveyor build 4061. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1802629_territorial_crash-4061. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1802629-territorial-crash/+merge/359227 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1802629-territorial-crash 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/remove-anti-congestion-algorithm into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/remove-anti-congestion-algorithm into lp:widelands. Commit message: Remove the anti-congestion algorithm introduced in r8775 because it has too many bugs in it. Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #1797213 in widelands: "Sometimes ware(s) are lying at a flag and get not transported." https://bugs.launchpad.net/widelands/+bug/1797213 For more details, see: https://code.launchpad.net/~widelands-dev/widelands/remove-anti-congestion-algorithm/+merge/359294 -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/remove-anti-congestion-algorithm into lp:widelands. === modified file 'src/economy/flag.cc' --- src/economy/flag.cc 2018-09-04 15:48:47 + +++ src/economy/flag.cc 2018-11-23 16:57:35 + @@ -337,30 +337,7 @@ } /** - * Called by workers wanting to drop a ware to their building's flag. - * \return true/allow on low congestion-risk. - */ -bool Flag::has_capacity_for_ware(WareInstance& ware) const { - // avoid iteration for the easy cases - if (ware_filled_ < ware_capacity_ - 2) { - return true; // more than two free slots, allow - } - if (ware_filled_ >= ware_capacity_) { - return false; // all slots filled, no room - } - - DescriptionIndex const descr_index = ware.descr_index(); - for (int i = 0; i < ware_filled_; ++i) { - if (wares_[i].ware->descr_index() == descr_index) { - return false; // ware of this type already present, leave room for other types - } - } - return true; // ware of this type not present, allow -} - -/** - * \return true/allow if the flag can hold more wares of any type. - * has_capacity_for_ware() also checks ware's type to prevent congestion. + * Returns true if the flag can hold more wares. */ bool Flag::has_capacity() const { return (ware_filled_ < ware_capacity_); @@ -386,24 +363,13 @@ capacity_wait_.erase(it); } -/** - * Adds given ware to this flag. - * Please check has_capacity() or better has_capacity_for_ware() before. - */ void Flag::add_ware(EditorGameBase& egbase, WareInstance& ware) { + assert(ware_filled_ < ware_capacity_); - init_ware(egbase, ware, wares_[ware_filled_++]); - if (upcast(Game, game, &egbase)) { - ware.update(*game); // will call call_carrier() if necessary - } -} -/** - * Properly assigns given ware instance to given pending ware. - */ -void Flag::init_ware(EditorGameBase& egbase, WareInstance& ware, PendingWare& pi) { + PendingWare& pi = wares_[ware_filled_++]; pi.ware = &ware; - pi.pending = true; + pi.pending = false; pi.nextstep = nullptr; pi.priority = 0; @@ -423,24 +389,32 @@ } ware.set_location(egbase, this); + + if (upcast(Game, game, &egbase)) { + ware.update(*game); // will call call_carrier() if necessary + } } /** - * \return a ware currently waiting for a carrier to the given destflag. + * \return true if a ware is currently waiting for a carrier to the given Flag. * * \note Due to fetch_from_flag() semantics, this function makes no sense * for a building destination. */ -Flag::PendingWare* Flag::get_ware_for_flag(Flag& destflag, bool const pending_only) { +bool Flag::has_pending_ware(Game&, Flag& dest) { for (int32_t i = 0; i < ware_filled_; ++i) { - PendingWare* pw = &wares_[i]; - if ((!pending_only || pw->pending) && pw->nextstep == &destflag && - destflag.allow_ware_from_flag(*pw->ware, *this)) { - return pw; - } + if (!wares_[i].pending) { + continue; + } + + if (wares_[i].nextstep != &dest) { + continue; + } + + return true; } - return nullptr; + return false; } /** @@ -450,124 +424,109 @@ #define MAX_TRANSFER_PRIORITY 16 /** - * Called by the carriercode when the carrier is called away from his job - * but has acknowledged a ware before. This ware is then freed again - * to be picked by another carrier. Returns true if a ware was indeed - * made pending again. + * Called by carrier code to indicate that the carrier is moving to pick up an + * ware. Ware with highest transfer priority is chosen. + * \return true if an ware is actually waiting for the carrier. */ -bool Flag::cancel_pickup(Game& game, Flag& destflag) { +bool Flag::ack_pickup(Game&, Flag& destflag) { + int32_t highest_pri = -1; + int32_t i_pri = -1; + for (int32_t i = 0; i < ware_filled_; ++i) { - PendingWare& pw = wares_[i]; - if (!pw.pending && pw.nextstep == &destflag) { - pw.pending = true; - pw.ware->update(game); // will call call_carrier() if necessary - return true; - } + if (!wares_[i].pending) { + continue; + } + + if (wares_[i].nextstep != &destflag) { + continue; + } + + if (wares_[i].priority > highest_pri) { + highest_pri = wares_[i].priority; + i_pri = i; + + // Increase ware priority, it matters only if the ware has to wait. + if (wares_[i].priority < MAX_TRANSFER_PRIORITY) { +wares_[i].priority++; + } + } + } + + if (i_pri >= 0) { + wares_[i_pri].pending = fa
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle into lp:widelands
Review: Approve test Agreed. now it looks consistent with the rest of the window. Thanks for fixing. @bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/empire04_unused_key_return_on_dismantle/+merge/358273 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle. ___ 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/empire04_unused_key_return_on_dismantle into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/empire04_unused_key_return_on_dismantle/+merge/358273 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle. ___ 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/ferry into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/ferry into lp:widelands has been updated. Description changed to: This is a feature for post-build20 of course, but it´s ready for (review and) testing now. It´ll need very extensive testing anyway due to the great economy engine changes. Ferries are a special kind of carrier that works on waterways and can transport only a ware, no workers. Waterways are built like roads. I pulled out common code for Roads and Waterways into a base class RoadBase. Ferries are distributed to waterways by fleets. They are built in a ferry yard by a shipwright (build costs still need discussion). I solved the big problem of having separate road networks connected only by ferries with an overhaul of the entire economy concept. Each PlayerImmovable, Worker etc now has one Economy for wares and one for workers. They are completely independent of each other. This change breaks saveloding compatibility. The AI works fine (though it is completely unaware of the existence of ferries and waterways), but someone should check the changed code parts nonetheless. I added some TODOs in the places I touched. For more details, see: https://code.launchpad.net/~widelands-dev/widelands/ferry/+merge/351880 -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/ferry 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-website/django_staticfiles into lp:widelands-website
kaputtnik has proposed merging lp:~widelands-dev/widelands-website/django_staticfiles into lp:widelands-website. Commit message: Implement django's default behavior for static files (css, js, images) Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #1758515 in Widelands Website: "Make static content independent from usercontent" https://bugs.launchpad.net/widelands-website/+bug/1758515 For more details, see: https://code.launchpad.net/~widelands-dev/widelands-website/django_staticfiles/+merge/359345 The problem i had when introducing django-star-ratings (https://wl.widelands.org/forum/topic/4389/) was a result of not implementing django's default behavior for static files (css, js, images), which was introduced many versions ago. Modern third party django-apps rely on this default behavior, and this is what had bitten me this time. On the server i have fixed this by configuring local_settings.py. This branch reflects the changes i did on the server, and some other related stuff. As a sideeffect, this solves also this bug :-) Main concepts of new static files handling: 1. Setting STATIC_ROOT to an absolute path where static files will be collected using the management command 'collectstatic'. This command needs executed if settings.DEBUG=False. 'collectstatic' searches all apps which are in INSTALLED_APPS for a folder called 'static' and copies, or symlink, all of it's content into STATIC_ROOT. https://docs.djangoproject.com/en/1.11/ref/contrib/staticfiles/#collectstatic 2. Different urls for static files and user uploaded files. 3. Use of the 'static' template tag in the templates to refer to static content (this is the main reason why this diff is that big) Differences to the current state on the server: 1. Using the collectstatic command from this branch collects static files in 'media/static_collected/' (on the server i used 'media/static_foreign', which was a bad name). Unchanged: Files uploaded by a user where still uploaded to 'media/[wlmaps|wlprofile|wlimages]'. The name of the link stays unchanged, so 'wlmedia/*'. Other things: 1. Moved own static files from 'media/' to 'mainpage/static/' or to the app (folder) where it belongs to. I am planning to do the same with the subfolders in 'templates/*' to have all things related to one app in one folder. So working e.g. on some things in pybb, pybb related css is found in 'pybb/static/css/' and templates will be in 'pybb/templates/pybb/*.html' 2. I found also 2 issues if one wants to setup the website from scratch. Those are fixed in https://bazaar.launchpad.net/~widelands-dev/widelands-website/django_staticfiles/revision/514 To get this in: 1. Set website maintenance 2. Remove the contents of 'media/static_foreign' to avoid merge conflicts 3. merge the branch 4. run 'python manage.py collectstatic -l' (the switch '-l' creates symlinks instead of copying the files) 5. Change the url which refers to static content to point to the folder of STATIC_ROOT 6. Unset website maintenance I will setup the alpha site for testing. -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands-website/django_staticfiles into lp:widelands-website. === modified file '.bzrignore' --- .bzrignore 2018-11-21 17:36:00 + +++ .bzrignore 2018-11-23 20:43:50 + @@ -13,12 +13,4 @@ whoosh_index media/map_object_info media/wlhelp -media/static_foreign/admin -media/static_foreign/basic.css -media/static_foreign/black20.png -media/static_foreign/but1.png -media/static_foreign/parchment.png -media/static_foreign/pygments.css -media/static_foreign/star-ratings -media/static_foreign/widelands.css -media/static_foreign/wood.png +media/static_collected/* === modified file 'README.txt' --- README.txt 2018-05-09 06:02:44 + +++ README.txt 2018-11-23 20:43:50 + @@ -99,6 +99,17 @@ Now everything should work. +Runnning with DBUG=False + +In case you want to test the site with the setting DEBUG=False, you might +notice that at least the admin site misses all css. To fix this run: + + $ ./manage.py collectstatic -l + +This will create symbolic links (-l) to static contents of third party apps in +the folder defined by STATIC_ROOT. See: +https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#collectstatic + Accessing the website from other machines - === modified file 'local_settings.py.sample' --- local_settings.py.sample 2018-10-01 16:01:40 + +++ local_settings.py.sample 2018-11-23 20:43:50 + @@ -8,11 +8,12 @@ import os import re -bd = os.getcwd() # Better make this a static path - -STATIC_MEDIA_PATH = os.path.join(bd, 'media') -MEDIA_ROOT = os.path.join(bd, 'media/') - +# Base path for content uploaded by users, like avatars, maps or images +# Better make this a static path +USER_MEDIA_BASE_PATH = os.getcwd() + +# Absolute path where to store files uploaded by us
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/terrain_affinity_as_int into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/terrain_affinity_as_int into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/terrain_affinity_as_int/+merge/358299 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/terrain_affinity_as_int. ___ 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/remove-anti-congestion-algorithm into lp:widelands
Continuous integration builds have changed state: Travis build 4272. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/458903460. Appveyor build 4066. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_remove_anti_congestion_algorithm-4066. -- https://code.launchpad.net/~widelands-dev/widelands/remove-anti-congestion-algorithm/+merge/359294 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/remove-anti-congestion-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/ferry into lp:widelands
Continuous integration builds have changed state: Travis build 4277. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/458960300. Appveyor build 4071. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_ferry-4071. -- https://code.launchpad.net/~widelands-dev/widelands/ferry/+merge/351880 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/ferry 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-1798297-locale-C into lp:widelands
Transient failure on Travis @bunnybot merge force -- https://code.launchpad.net/~widelands-dev/widelands/bug-1798297-locale-C/+merge/358364 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1798297-locale-C 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/travis-skip-translations-in-debug-builds into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/travis-skip-translations-in-debug-builds into lp:widelands. Commit message: On Travis, build translations and documentation only on release builds in order to help with job execution time. Requested reviews: Widelands Developers (widelands-dev) For more details, see: https://code.launchpad.net/~widelands-dev/widelands/travis-skip-translations-in-debug-builds/+merge/359347 -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/travis-skip-translations-in-debug-builds into lp:widelands. === modified file '.travis.sh' --- .travis.sh 2018-09-24 10:19:41 + +++ .travis.sh 2018-11-24 07:22:12 + @@ -25,22 +25,10 @@ # Configure the build mkdir build cd build -cmake .. -DCMAKE_BUILD_TYPE:STRING="$BUILD_TYPE" -DOPTION_ASAN="OFF" if [ "$BUILD_TYPE" == "Debug" ]; then - - # Build the documentation. Any warning is an error. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - sudo pip install sphinx - fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - pip2 install sphinx - fi - pushd ../doc/sphinx - mkdir source/_static - ./extract_rst.py - sphinx-build -W -b json -d build/doctrees source build/json - popd + # We test translations only on release builds, in order to help with job timeouts + cmake .. -DCMAKE_BUILD_TYPE:STRING="$BUILD_TYPE" -DOPTION_BUILD_TRANSLATIONS="OFF" -DOPTION_ASAN="OFF" # Run the codecheck test suite. pushd ../cmake/codecheck @@ -54,6 +42,22 @@ echo "You have codecheck warnings (see above) Please fix." exit 1 # CodeCheck warnings. fi +else + cmake .. -DCMAKE_BUILD_TYPE:STRING="$BUILD_TYPE" -DOPTION_BUILD_TRANSLATIONS="ON" -DOPTION_ASAN="OFF" + + # We test the documentation on release builds to make timeouts for debug builds less likely. + # Any warning is an error. + if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then + sudo pip install sphinx + fi + if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + pip2 install sphinx + fi + pushd ../doc/sphinx + mkdir source/_static + ./extract_rst.py + sphinx-build -W -b json -d build/doctrees source build/json + popd fi # Do the actual build. ___ 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-1796364-blinking-buildings into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1796364-blinking-buildings into lp:widelands. Commit message: Remove z-layering fix for building texts introduced in r8847 because it is buggy and can make building animations disappear Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #1796364 in widelands: "Some animation frames suddenly invisible" https://bugs.launchpad.net/widelands/+bug/1796364 For more details, see: https://code.launchpad.net/~widelands-dev/widelands/bug-1796364-blinking-buildings/+merge/359348 -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1796364-blinking-buildings into lp:widelands. === modified file 'src/economy/flag.h' --- src/economy/flag.h 2018-09-25 06:32:35 + +++ src/economy/flag.h 2018-11-24 07:34:44 + @@ -26,6 +26,7 @@ #include "base/macros.h" #include "economy/routing_node.h" +#include "logic/map_objects/draw_text.h" #include "logic/map_objects/immovable.h" #include "logic/map_objects/walkingdir.h" @@ -168,8 +169,11 @@ bool init(EditorGameBase&) override; void cleanup(EditorGameBase&) override; - void - draw(uint32_t gametime, const Vector2f& point_on_dst, float scale, RenderTarget* dst) override; + void draw(uint32_t gametime, + TextToDraw draw_text, + const Vector2f& point_on_dst, + float scale, + RenderTarget* dst) override; static void flag_job_request_callback(Game&, Request&, DescriptionIndex, Worker*, PlayerImmovable&); === modified file 'src/economy/portdock.cc' --- src/economy/portdock.cc 2018-09-14 08:46:36 + +++ src/economy/portdock.cc 2018-11-24 07:34:44 + @@ -140,7 +140,7 @@ expedition_bootstrap_->set_economy(e); } -void PortDock::draw(uint32_t, const Vector2f&, float, RenderTarget*) { +void PortDock::draw(uint32_t, const TextToDraw, const Vector2f&, float, RenderTarget*) { // do nothing } === modified file 'src/economy/portdock.h' --- src/economy/portdock.h 2018-09-25 06:32:35 + +++ src/economy/portdock.h 2018-11-24 07:34:44 + @@ -96,8 +96,11 @@ Flag& base_flag() override; PositionList get_positions(const EditorGameBase&) const override; - void - draw(uint32_t gametime, const Vector2f& point_on_dst, float scale, RenderTarget* dst) override; + void draw(uint32_t gametime, + TextToDraw draw_text, + const Vector2f& point_on_dst, + float scale, + RenderTarget* dst) override; bool init(EditorGameBase&) override; void cleanup(EditorGameBase&) override; === modified file 'src/economy/road.h' --- src/economy/road.h 2018-09-25 06:32:35 + +++ src/economy/road.h 2018-11-24 07:34:44 + @@ -130,8 +130,11 @@ bool init(EditorGameBase&) override; void cleanup(EditorGameBase&) override; - void - draw(uint32_t gametime, const Vector2f& point_on_dst, float scale, RenderTarget* dst) override; + void draw(uint32_t gametime, + TextToDraw draw_text, + const Vector2f& point_on_dst, + float scale, + RenderTarget* dst) override; private: void set_path(EditorGameBase&, const Path&); === modified file 'src/editor/editorinteractive.cc' --- src/editor/editorinteractive.cc 2018-10-21 22:21:34 + +++ src/editor/editorinteractive.cc 2018-11-24 07:34:44 + @@ -300,14 +300,14 @@ if (draw_immovables_) { Widelands::BaseImmovable* const imm = field.fcoords.field->get_immovable(); if (imm != nullptr && imm->get_positions(ebase).front() == field.fcoords) { -imm->draw(gametime, field.rendertarget_pixel, scale, &dst); +imm->draw(gametime, TextToDraw::kNone, field.rendertarget_pixel, scale, &dst); } } if (draw_bobs_) { for (Widelands::Bob* bob = field.fcoords.field->get_first_bob(); bob; bob = bob->get_next_bob()) { -bob->draw(ebase, field.rendertarget_pixel, scale, &dst); +bob->draw(ebase, TextToDraw::kNone, field.rendertarget_pixel, scale, &dst); } } @@ -376,8 +376,6 @@ } } } - // TODO(GunChleoc): If we ever implement an infrastructure tool, the building texts will need to - // be blitted here. } /// Needed to get freehand painting tools (hold down mouse and move to edit). === modified file 'src/logic/CMakeLists.txt' --- src/logic/CMakeLists.txt 2018-08-24 07:12:20 + +++ src/logic/CMakeLists.txt 2018-11-24 07:34:44 + @@ -174,6 +174,7 @@ map_objects/buildcost.h map_objects/checkstep.cc map_objects/checkstep.h +map_objects/draw_text.h map_objects/immovable.cc map_objects/immovable.h map_objects/immovable_program.h @@ -267,6 +268,7 @@ game_io graphic graphic_color +graphic_fonthandler graphic_image_io graphic_playercolor graphic_surface === modified file 'src/logic/map_objects/bob.cc' --- src/logic/map_objects/bob.cc 2018-09-14 08:46:36 + +++ src/logic/map_objects/bob.cc 2018-11-24 07:34:44 + @@ -758,6 +758,7 @@ /// Note