[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1827786-metaserver-login-box-clean-start into lp:widelands

2019-05-15 Thread bunnybot
Continuous integration builds have changed state:

Travis build 4988. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/532926409.
Appveyor build 4769. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1827786_metaserver_login_box_clean_start-4769.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1827786-metaserver-login-box-clean-start/+merge/367320
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start.

___
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/constructionsite_options into lp:widelands

2019-05-15 Thread Benedikt Straub
Assert fail fixed :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/constructionsite_options/+merge/367428
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/constructionsite_options 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/choose-attack-soldiers into lp:widelands

2019-05-15 Thread bunnybot
Continuous integration builds have changed state:

Travis build 4986. State: errored. Details: 
https://travis-ci.org/widelands/widelands/builds/532836861.
Appveyor build 4767. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_choose_attack_soldiers-4767.
-- 
https://code.launchpad.net/~widelands-dev/widelands/choose-attack-soldiers/+merge/367471
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/choose-attack-soldiers.

___
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/constructionsite_options into lp:widelands

2019-05-15 Thread Toni Förster
Assertion failed: (military_site_->capacity_ != capacity), function 
set_soldier_capacity, file 
/Users/toni/Launchpad/widelands-repo/working_tree/src/logic/map_objects/tribes/militarysite.cc,
 line 85.

-- 
https://code.launchpad.net/~widelands-dev/widelands/constructionsite_options/+merge/367428
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/constructionsite_options 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-1827786-metaserver-login-box-clean-start into lp:widelands

2019-05-15 Thread kaputtnik
> We rename the back button to "Leave lobby"
> Above the button we have a checkbox "Clear login data"

"Leave lobby and clear login data" would be the correct explanation. But it's 
confusing anyway to have this in the lobby.

Maybe i am too nitpicking ;)
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1827786-metaserver-login-box-clean-start/+merge/367320
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start.

___
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-1827786-metaserver-login-box-clean-start into lp:widelands

2019-05-15 Thread Toni Förster
Well another solution would be:

We rename the back button to "Leave lobby"
Above the button we have a checkbox "Clear login data"
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1827786-metaserver-login-box-clean-start/+merge/367320
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start.

___
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-website/gaming_password into lp:widelands-website

2019-05-15 Thread kaputtnik
Many thanks :-)
-- 
https://code.launchpad.net/~widelands-dev/widelands-website/gaming_password/+merge/367448
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands-website/gaming_password into lp:widelands-website.

___
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-1827786-metaserver-login-box-clean-start into lp:widelands

2019-05-15 Thread kaputtnik
I am not convinced by this solution, it is confusing:

1. We have two places (views) which interact with the same thing now.
2. We have two buttons, 'Logout' and 'Back', in the lobby now, which do the 
same at first sight: Go back to the 'Multiplayer' view. How will a tooltip, if 
there were any, look to explain the buttons?

Having it like before is better, imho, although the small icon (button) to show 
the loginbox is visually disturbing. But better a visually disturbing thing 
than a confusing UI, especially because the Multiplayer view is mostly open for 
a short time.

Just my personal opinion :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1827786-metaserver-login-box-clean-start/+merge/367320
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start.

___
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/constructionsite_options into lp:widelands

2019-05-15 Thread Benedikt Straub
Took care of the warnings and fixed the input queue layout.

> src/graphic/animation.cc:451] Requested unknown animation with id: -432781024

A backtrace would be helpful…
Did you get this while an (enhanced?) constructionsite was being built, or when 
a constructionsite was being completed? I got similar crashes before, but I 
thought I had caught all corner cases now…
-- 
https://code.launchpad.net/~widelands-dev/widelands/constructionsite_options/+merge/367428
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/constructionsite_options 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/constructionsite_options into lp:widelands

2019-05-15 Thread Toni Förster
With this branch I get crashes after a while. Not sure if the culprit is this 
branch or something in trunk, though.

/Users/toni/Launchpad/widelands-repo/working_tree/src/graphic/animation.cc:451] 
Requested unknown animation with id: -432781024
==54196==ERROR: AddressSanitizer: SEGV on unknown address 0x (pc 
0x bp 0x7ffee6344650 sp 0x7ffee63445a8 T0)
-- 
https://code.launchpad.net/~widelands-dev/widelands/constructionsite_options/+merge/367428
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/constructionsite_options 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/constructionsite_options into lp:widelands

2019-05-15 Thread Toni Förster
Your buttons are a little too big. The buttons for in-/decreasing the wares are 
24x24 while yours are 25x30.

Also, some wares are covered by the button; see the fish in the tavern (I guess 
that is because of your buttons being to big)
-- 
https://code.launchpad.net/~widelands-dev/widelands/constructionsite_options/+merge/367428
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/constructionsite_options 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/constructionsite_options into lp:widelands

2019-05-15 Thread Toni Förster
Four warnings left:

src/logic/playercommand.cc:2288:6: warning: default label in switch which 
covers all enumeration values [-Wcovered-switch-default]
default:

src/logic/playercommand.cc:2384:6: warning: default label in switch which 
covers all enumeration values [-Wcovered-switch-default]
default:

src/wui/constructionsitewindow.cc:197:3: warning: default label in switch which 
covers all enumeration values [-Wcovered-switch-default]
default:

src/logic/map_objects/tribes/building_settings.cc:176:5: warning: default label 
in switch which covers all enumeration values [-Wcovered-switch-default]
default:

-- 
https://code.launchpad.net/~widelands-dev/widelands/constructionsite_options/+merge/367428
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/constructionsite_options 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/constructionsite_options into lp:widelands

2019-05-15 Thread Toni Förster
hmm. I would prefer icons but you are completely right. I opened a topic in the 
forum:

https://wl.widelands.org/forum/topic/4518/?page=1#post-27957
-- 
https://code.launchpad.net/~widelands-dev/widelands/constructionsite_options/+merge/367428
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/constructionsite_options 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/choose-attack-soldiers into lp:widelands

2019-05-15 Thread Benedikt Straub
Benedikt Straub has proposed merging 
lp:~widelands-dev/widelands/choose-attack-soldiers into lp:widelands.

Commit message:
Use a MultilineTextarea for the soldier stats in the attack box

Requested reviews:
  GunChleoc (gunchleoc): i18n behaviour
Related bugs:
  Bug #585981 in widelands: "Soldier choice in the attack box"
  https://bugs.launchpad.net/widelands/+bug/585981
  Bug #1828711 in widelands: "Attack box width changes when mouse hovers over 
soldier"
  https://bugs.launchpad.net/widelands/+bug/1828711

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/choose-attack-soldiers/+merge/367471

Now the height of the attack box changes instead of the width ;)
It´ll change whenever the mouse is moved in or out; the text line is now hidden 
when no soldier is pointed at, which looks more elegant than an empty space at 
the bottom IMHO.
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/choose-attack-soldiers.
=== modified file 'src/wui/attack_box.cc'
--- src/wui/attack_box.cc	2019-05-11 18:19:20 +
+++ src/wui/attack_box.cc	2019-05-15 13:33:32 +
@@ -246,7 +246,8 @@
 		mainbox.add(remaining_soldiers_.get(), UI::Box::Resizing::kFullSize);
 	}
 
-	current_soldier_stats_.reset(new UI::Textarea(, "", UI::Align::kCenter));
+	current_soldier_stats_.reset(new UI::MultilineTextarea(, 0, 0, 0, 0, UI::PanelStyle::kWui,
+			"", UI::Align::kCenter, UI::MultilineTextarea::ScrollMode::kNoScrolling));
 	mainbox.add(current_soldier_stats_.get(), UI::Box::Resizing::kFullSize, UI::Align::kCenter);
 
 	soldiers_slider_->set_enabled(max_attackers > 0);

=== modified file 'src/wui/attack_box.h'
--- src/wui/attack_box.h	2019-05-11 18:19:20 +
+++ src/wui/attack_box.h	2019-05-15 13:33:32 +
@@ -33,6 +33,7 @@
 #include "logic/player.h"
 #include "ui_basic/box.h"
 #include "ui_basic/button.h"
+#include "ui_basic/multilinetextarea.h"
 #include "ui_basic/slider.h"
 #include "ui_basic/textarea.h"
 
@@ -161,7 +162,7 @@
 
 	std::unique_ptr attacking_soldiers_;
 	std::unique_ptr remaining_soldiers_;
-	std::unique_ptr current_soldier_stats_;
+	std::unique_ptr current_soldier_stats_;
 	std::unique_ptr attack_button_;
 
 	/// The last time the information in this Panel got updated

___
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-fixes into lp:widelands

2019-05-15 Thread bunnybot
Continuous integration builds have changed state:

Travis build 4978. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/532671043.
Appveyor build 4759. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_AI_fixes-4759.
-- 
https://code.launchpad.net/~widelands-dev/widelands/AI-fixes/+merge/367309
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/AI-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/bug-1827786-metaserver-login-box-clean-start into lp:widelands

2019-05-15 Thread Toni Förster
The proposal to merge 
lp:~widelands-dev/widelands/bug-1827786-metaserver-login-box-clean-start into 
lp:widelands has been updated.

Commit message changed to:

redesigned login box

- limit the possible characters for usernames
- draw a red box around the input field for erroneous input
- tell user were to register their username
- clicking registered checkbox focuses password field
- remove check from registered clears password field
- password field is only accessible when checkbox is clicked
- when a password is set, * is shown on opening

multiplayer login redesign

- only show login dialog when no name is set & unregisterd users

lobby
- let registered user logout from their account

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1827786-metaserver-login-box-clean-start/+merge/367320
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start.

___
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-1827786-metaserver-login-box-clean-start into lp:widelands

2019-05-15 Thread Toni Förster
We have a logout button now :D

The login dialog will be shown only for non registered users. Registered users 
may log out from their account from within the lobby.

The additional login button from the Multiplayer menu is removed.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1827786-metaserver-login-box-clean-start/+merge/367320
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start.

___
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/AI-fixes into lp:widelands

2019-05-15 Thread hessenfarmer
@GunChleoc:
I had the same thought but went the easy route for the moment being. Currently 
we only have 2 buildings recruiting "workers": the barracks and the second 
carrier recruiter. Both of them are limited for AI (barracks to 1, second 
carrier to 2 hardcoded) For these reasons I doubt if any effort in this way 
might be worth the pain. 
-- 
https://code.launchpad.net/~widelands-dev/widelands/AI-fixes/+merge/367309
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/AI-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-1827786-metaserver-login-box-clean-start into lp:widelands

2019-05-15 Thread Toni Förster
I have moved username validation to internet gaming.

I'm currently experimenting with a logout button stay tuned :=)
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1827786-metaserver-login-box-clean-start/+merge/367320
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start.

___
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/font_size-lua into lp:widelands

2019-05-15 Thread GunChleoc
That one fell victim to a merge conflict. I have added the style now :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/font_size-lua/+merge/366938
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/font_size-lua 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-website/gaming_password into lp:widelands-website

2019-05-15 Thread GunChleoc
Some string nits, rest LGTM :)

Diff comments:

> 
> === modified file 'wlggz/forms.py'
> --- wlggz/forms.py2019-03-05 08:47:47 +
> +++ wlggz/forms.py2019-05-15 06:56:07 +
> @@ -10,13 +10,12 @@
>  from models import GGZAuth
>  from django.utils.translation import ugettext_lazy as _
>  
> -import hashlib
> -import base64
> -
>  
>  class EditGGZForm(forms.ModelForm):
>  password = forms.CharField(label=_(u'Online Gaming Password'),
> 
> widget=forms.PasswordInput(render_value=False), required=True)
> +password2 = forms.CharField(label=_(u'Enter again'),

"Enter the password again" or "Confirm Password" would be easier to understand.

> +   
> widget=forms.PasswordInput(render_value=False), required=True)
>  
>  class Meta:
>  model = GGZAuth
> 
> === modified file 'wlggz/templates/wlggz/edit_ggz.html'
> --- wlggz/templates/wlggz/edit_ggz.html   2019-01-24 18:03:54 +
> +++ wlggz/templates/wlggz/edit_ggz.html   2019-05-15 06:56:07 +
> @@ -6,17 +6,28 @@
>  {% trans "Set Online Gaming Password" %} - {{ block.super }}
>  {% endblock %}
>  
> +{% block game_passwrd %}class="active"{% endblock %}
> +
>  {% block content_header %}
>   {% trans "Set Online Gaming Password" %}
>  {% endblock %}
>  
>  {% block content_main %}
> -
> +
> + The password set here can be used when playing widelands over 
> internet.

over the internet

> + Although it is optional to use a password it is recommended to use one,
> + because your username will be reserved then. The password is stored 
> encrypted.
> + To use the password on internetgames:

on internetgames -> in internet games

> + 
> + Start the game and click on 'Multiplayer -> Internet 
> Game'
> + Enter your website's username and the password you have set 
> here

website's -> Widelands website

your website's implies that the player owns a website ;)

> + Click on 'Login'
> + 
>   
>   
>   {% for field in ggz_form %}
>   
> - {{ field.label_tag }}:
> + {{ field.label_tag }}
>   {{ field }}
>   {{ field.errors }}
>   


-- 
https://code.launchpad.net/~widelands-dev/widelands-website/gaming_password/+merge/367448
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands-website/gaming_password into lp:widelands-website.

___
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-1827786-metaserver-login-box-clean-start into lp:widelands

2019-05-15 Thread GunChleoc
That would not allow different players to use the same computer, because you 
can never log out when the password is correct.

I'd say revert the changes for now and let's think about having a logout button 
in the lobby.

Regarding the user name validation, this should be implemented in internet 
gaming somewhere, not in editbox. The editbox is a UI element and should not 
care about what a well-formed user name is. That way, you could also get rid of 
the remaining code duplication.

I have tested the password display and it's working fine :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1827786-metaserver-login-box-clean-start/+merge/367320
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start.

___
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/AI-fixes into lp:widelands

2019-05-15 Thread GunChleoc
How about we implement preciousness for workers, just like we do for wares? 
That way, we would not need an ugly hack and could play with how precious they 
are without having to recompile.
-- 
https://code.launchpad.net/~widelands-dev/widelands/AI-fixes/+merge/367309
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/AI-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/constructionsite_options into lp:widelands

2019-05-15 Thread Toni Förster
Some comments regarding the UI.

I think we should keep the UI consistent. Instead of checkboxes please use the 
icons/buttons that are used in the building's window. The same applies for the 
priority settings. We use traffic lights instead of buttons.

-- 
https://code.launchpad.net/~widelands-dev/widelands/constructionsite_options/+merge/367428
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/constructionsite_options 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/constructionsite_options into lp:widelands

2019-05-15 Thread Toni Förster
I get these compiler warnings a couple of times.

/Users/toni/Launchpad/widelands-repo/working_tree/src/logic/map_objects/tribes/building_settings.h:42:8:
 warning: 'Widelands::BuildingSettings' has virtual functions but non-virtual 
destructor [-Wnon-virtual-dtor]
struct BuildingSettings {
   ^
/Users/toni/Launchpad/widelands-repo/working_tree/src/logic/map_objects/tribes/building_settings.h:57:8:
 warning: 'Widelands::ProductionsiteSettings' has virtual functions but 
non-virtual destructor [-Wnon-virtual-dtor]
struct ProductionsiteSettings : public BuildingSettings {
   ^
/Users/toni/Launchpad/widelands-repo/working_tree/src/logic/map_objects/tribes/building_settings.h:74:8:
 warning: 'Widelands::MilitarysiteSettings' has virtual functions but 
non-virtual destructor [-Wnon-virtual-dtor]
struct MilitarysiteSettings : public BuildingSettings {
   ^
/Users/toni/Launchpad/widelands-repo/working_tree/src/logic/map_objects/tribes/building_settings.h:86:8:
 warning: 'Widelands::TrainingsiteSettings' has virtual functions but 
non-virtual destructor [-Wnon-virtual-dtor]
struct TrainingsiteSettings : public ProductionsiteSettings {
   ^
/Users/toni/Launchpad/widelands-repo/working_tree/src/logic/map_objects/tribes/building_settings.h:97:8:
 warning: 'Widelands::WarehouseSettings' has virtual functions but non-virtual 
destructor [-Wnon-virtual-dtor]
struct WarehouseSettings : public BuildingSettings {
   ^
5 warnings generated.

-- 
https://code.launchpad.net/~widelands-dev/widelands/constructionsite_options/+merge/367428
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/constructionsite_options 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/font_size-lua into lp:widelands

2019-05-15 Thread Toni Förster
=== modified file 'src/ui_fsmenu/internet_lobby.cc'
--- src/ui_fsmenu/internet_lobby.cc 2019-05-13 06:04:34 +
+++ src/ui_fsmenu/internet_lobby.cc 2019-05-15 08:36:30 +
@@ -296,6 +296,8 @@
case kClientSuperuser:
pic = 
g_gr->images().get("images/wui/overlays/roadb_green.png");
er.set_picture(0, pic);
+   er.set_color(RGBColor(0, 255, 0));
+   er.set_picture(0, pic);
break;
case kClientIRC:
// No icon for IRC users
-- 
https://code.launchpad.net/~widelands-dev/widelands/font_size-lua/+merge/366938
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/font_size-lua 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/font_size-lua into lp:widelands

2019-05-15 Thread Toni Förster
In trunk admins are written in green in the client list. Did you remove this on 
purpose? If not, I'm going to post the patch the next comment,


-- 
https://code.launchpad.net/~widelands-dev/widelands/font_size-lua/+merge/366938
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/font_size-lua 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/unlock-all-campaigns into lp:widelands

2019-05-15 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/unlock-all-campaigns into 
lp:widelands has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/unlock-all-campaigns/+merge/367371
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/unlock-all-campaigns.

___
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/AI-fixes into lp:widelands

2019-05-15 Thread Benedikt Straub
I´m through with the code review, a couple of nits. Will do more testing soon…

Diff comments:

> 
> === modified file 'src/ai/defaultai.cc'
> --- src/ai/defaultai.cc   2019-04-20 05:44:37 +
> +++ src/ai/defaultai.cc   2019-05-15 06:30:23 +
> @@ -2454,6 +2458,12 @@
>  
>   if (!bo.buildable(*player_)) {
>   bo.new_building = BuildingNecessity::kNotNeeded;
> + // TODO(Hessenfarmer): Add the buildings if they are 
> allowed again
> + // This line removes buildings from basic econmy if 
> they are not allowed for the player
> + // this should only happen by scripting.

Please take care of this TODO here – if a productionpath is prohibited until 
some turning point, it should still be considered more important then.

> + if (bo.basic_amount) {
> + 
> persistent_data->remaining_basic_buildings.erase(bo.id);
> + }
>   } else if (bo.type == BuildingObserver::Type::kProductionsite ||
>  bo.type == BuildingObserver::Type::kMine) {
>  
> @@ -3752,6 +3763,8 @@
>   // if we are within grace time, it is OK, just go on
>   if (eco->dismantle_grace_time > gametime &&
>   eco->dismantle_grace_time != 
> std::numeric_limits::max()) {
> + ;

Please get rid of empty ifs:
if (eco->dismantle_grace_time == std::numeric_limits::max()) {
  // The long if body
} else if eco->dismantle_grace_time <= gametime) {
  last_attempt_ = true;
  checkradius += 2;
}
// No else loop needed

> +
>   // if grace time is not set, this is probably first 
> time without a warehouse and we must
>   // set it
>   } else if (eco->dismantle_grace_time == 
> std::numeric_limits::max()) {
> @@ -4483,7 +4500,8 @@
>   site.site->can_start_working() &&
>   check_building_necessity(*site.bo, PerfEvaluation::kForDismantle, 
> gametime) ==
>  BuildingNecessity::kNotNeeded &&
> - gametime - site.bo->last_dismantle_time > 5 * 60 * 1000 &&
> + gametime - site.bo->last_dismantle_time >
> + (std::abs(management_data.get_military_number_at(169)) / 5 + 1) 
> * 60 * 1000 &&

This needs a static_cast, you mustn´t compare signed and unsigned

>  
>   site.bo->current_stats > site.site->get_statistics_percent() &&  // 
> underperformer
>   (game().get_gametime() - site.unoccupied_till) > 10 * 60 * 1000) {
> @@ -4935,11 +4952,11 @@
>   if (!basic_economy_established) {
>   return BuildingNecessity::kForbidden;
>   }
> - const uint16_t min_roads_count = 50 + 
> std::abs(management_data.get_military_number_at(33));
> - if (roads.size() < min_roads_count) {
> + const uint16_t min_roads_count = 40 + 
> std::abs(management_data.get_military_number_at(33))/2;

Whitespaces before and after / please

> + if (roads.size() < min_roads_count * (1 + bo.total_count())) {

static_cast needed to avoid signed-unsigned comparison

>   return BuildingNecessity::kForbidden;
>   }
> - bo.primary_priority = (roads.size() - min_roads_count) *
> + bo.primary_priority += (roads.size() - min_roads_count * (1 + 
> bo.total_count())) *
> (2 + 
> std::abs(management_data.get_military_number_at(143)) / 5);
>   return BuildingNecessity::kNeeded;
>   }
> @@ -5516,7 +5531,7 @@
>   inputs[0] = (bo.total_count() <= 1) ?
>  
> std::abs(management_data.get_military_number_at(110)) / 10 :
>  0;
> - inputs[1] = -2 * bo.total_count();
> + inputs[1] = -4 * bo.total_count() + 2 * 
> bo.total_count() + bo.total_count() / 2;

What is the point of such a calculation?
inputs[1] = bo.total_count() * -3 / 2;

>   inputs[2] =
>  (bo.total_count() == 0) ? 
> std::abs(management_data.get_military_number_at(0)) / 10 : 0;
>   inputs[3] = (gametime >= 25 * 60 * 1000 && 
> bo.inputs.empty()) ?


-- 
https://code.launchpad.net/~widelands-dev/widelands/AI-fixes/+merge/367309
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/AI-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/unlock-all-campaigns into lp:widelands

2019-05-15 Thread hessenfarmer
@bunnybot merge force
-- 
https://code.launchpad.net/~widelands-dev/widelands/unlock-all-campaigns/+merge/367371
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/unlock-all-campaigns.

___
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-1827786-metaserver-login-box-clean-start into lp:widelands

2019-05-15 Thread Toni Förster
I could think of another option. We remove the button entirely. The login 
window is always shown for non registered users. When a user has entered a 
password, the dialog won't be shown as long as the password is valid.

-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1827786-metaserver-login-box-clean-start/+merge/367320
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start.

___
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/AI-fixes into lp:widelands

2019-05-15 Thread hessenfarmer
oops I missed to fix the typo which GunChleoc found will be done in final polish
-- 
https://code.launchpad.net/~widelands-dev/widelands/AI-fixes/+merge/367309
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/AI-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/AI-fixes into lp:widelands

2019-05-15 Thread hessenfarmer
The proposal to merge lp:~widelands-dev/widelands/AI-fixes into lp:widelands 
has been updated.

Description changed to:

Following things changed:
1. barbarian barracks no longer part of basic economy
2. AI expands towards low guarded enemy territory
3. AI builds more economy buildings based on neededness and preciousness od 
wares
4. AI is less agressive in dismantling. It does not dismantle if plenty of 
input is available for a building
5. added more decisions to genetics either in build and dismantle loops
6. AI now does properly upgrade barbarian smithies without running into a 
deadlock of having no smith for the tool smithy.
7. Fixed an issue which prevented AI from building second carrier recruiters

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/AI-fixes/+merge/367309
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/AI-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/unlock-all-campaigns into lp:widelands

2019-05-15 Thread bunnybot
Refusing to merge, since Travis is not green. Use @bunnybot merge force for 
merging anyways.

Travis build 4968. State: errored. Details: 
https://travis-ci.org/widelands/widelands/builds/531939662.
-- 
https://code.launchpad.net/~widelands-dev/widelands/unlock-all-campaigns/+merge/367371
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/unlock-all-campaigns.

___
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/AI-fixes into lp:widelands

2019-05-15 Thread hessenfarmer
Review: Resubmit

Finally I got the AI to properly build second carrier recruiters depending on 
size of road network. The issue was that we need to fake a preciousness for 
this building (similar to barracks). Did some other changes as well to prevent 
the Ai from dismantling too many productionsites too often. 
-- 
https://code.launchpad.net/~widelands-dev/widelands/AI-fixes/+merge/367309
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/AI-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/unlock-all-campaigns into lp:widelands

2019-05-15 Thread hessenfarmer
Travis failure is transient (once again a download of a resource failed)

@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/unlock-all-campaigns/+merge/367371
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/unlock-all-campaigns.

___
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/gaming_password into lp:widelands-website

2019-05-15 Thread kaputtnik
kaputtnik has proposed merging 
lp:~widelands-dev/widelands-website/gaming_password into lp:widelands-website.

Commit message:
Better place for setting the online gaming password

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1828677 in Widelands Website: "Give online gaming password a more 
prominent place."
  https://bugs.launchpad.net/widelands-website/+bug/1828677

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands-website/gaming_password/+merge/367448

Rework of a users profile page:

Removed tabs, because the links are also in the loginbox:
- Messages
- Scheduler

Added tab:
- Gaming Password
- Renamed Tab 'E-Mail settings' -> 'Notification Settings'

Added an additional edit field for setting the gaming password, so the password 
has to be entered two times. Added a check to compare the entered data and give 
an errormessage if the passwords didn't match.

Added some help text.

Moved hashing of password to models.py, because i think it fits better over 
there.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands-website/gaming_password into lp:widelands-website.
=== modified file 'templates/django_messages/base.html'
--- templates/django_messages/base.html	2019-02-23 19:02:18 +
+++ templates/django_messages/base.html	2019-05-15 06:56:07 +
@@ -1,4 +1,4 @@
-{% extends "wlprofile/base.html" %}
+{% extends "mainpage/base.html" %}
 {% load i18n %}
 {% load static %}
 
@@ -9,8 +9,6 @@
 	
 {{ block.super}}{% endblock %}
 
-{% block messages %}class="active"{% endblock %}
-
 {% block title %}
 Messages - {{block.super}}
 {% endblock %}

=== modified file 'wlggz/forms.py'
--- wlggz/forms.py	2019-03-05 08:47:47 +
+++ wlggz/forms.py	2019-05-15 06:56:07 +
@@ -10,13 +10,12 @@
 from models import GGZAuth
 from django.utils.translation import ugettext_lazy as _
 
-import hashlib
-import base64
-
 
 class EditGGZForm(forms.ModelForm):
 password = forms.CharField(label=_(u'Online Gaming Password'),
widget=forms.PasswordInput(render_value=False), required=True)
+password2 = forms.CharField(label=_(u'Enter again'),
+   widget=forms.PasswordInput(render_value=False), required=True)
 
 class Meta:
 model = GGZAuth
@@ -27,11 +26,9 @@
 
 super(EditGGZForm, self).__init__(instance=instance, *args, **kwargs)
 
-def clean_password(self):
-pw = self.cleaned_data['password']
-pw_hash = hashlib.sha1(pw.encode('utf-8')).digest()
-pw_base64 = base64.standard_b64encode(pw_hash)
-return pw_base64
-
-def save(self, *args, **kwargs):
-super(EditGGZForm, self).save(*args, **kwargs)
+def clean(self):
+cleaned_data = super(EditGGZForm,self).clean()
+pw = cleaned_data.get('password')
+pw2 = cleaned_data.get('password2')
+if pw != pw2:
+self.add_error('password2', "The passwords didn't match")

=== modified file 'wlggz/models.py'
--- wlggz/models.py	2019-03-31 11:08:21 +
+++ wlggz/models.py	2019-05-15 06:56:07 +
@@ -13,6 +13,8 @@
 from django.utils.translation import ugettext_lazy as _
 from pybb.models import Post
 
+import hashlib
+import base64
 
 class GGZAuth(models.Model):
 user = AutoOneToOneField(
@@ -24,3 +26,11 @@
 class Meta:
 verbose_name = _('ggz')
 verbose_name_plural = _('ggz')
+
+def save(self, *args, **kwargs):
+# hash the password
+pw_hash = hashlib.sha1(self.password.encode('utf-8')).digest()
+pw_base64 = base64.standard_b64encode(pw_hash)
+self.password = pw_base64
+# Save into the database
+super(GGZAuth, self).save(*args, **kwargs)

=== modified file 'wlggz/templates/wlggz/edit_ggz.html'
--- wlggz/templates/wlggz/edit_ggz.html	2019-01-24 18:03:54 +
+++ wlggz/templates/wlggz/edit_ggz.html	2019-05-15 06:56:07 +
@@ -1,4 +1,4 @@
-{% extends "mainpage/base.html" %}
+{% extends "wlprofile/base.html" %}
 
 {% load i18n %}
 
@@ -6,17 +6,28 @@
 {% trans "Set Online Gaming Password" %} - {{ block.super }}
 {% endblock %}
 
+{% block game_passwrd %}class="active"{% endblock %}
+
 {% block content_header %}
 	{% trans "Set Online Gaming Password" %}
 {% endblock %}
 
 {% block content_main %}
-
+
+	The password set here can be used when playing widelands over internet.
+	Although it is optional to use a password it is recommended to use one,
+	because your username will be reserved then. The password is stored encrypted.
+	To use the password on internetgames:
+	
+		Start the game and click on 'Multiplayer -> Internet Game'
+		Enter your website's username and the password you have set here
+		Click on 'Login'
+	
 	
 		
 		{% for field in ggz_form %}
 			
-{{ field.label_tag }}:
+{{ field.label_tag }}
 {{ field }}
 {{ field.errors }}
 			

=== modified file 'wlggz/views.py'
--- wlggz/views.py	2018-04-08 

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1827786-metaserver-login-box-clean-start into lp:widelands

2019-05-15 Thread bunnybot
Continuous integration builds have changed state:

Travis build 4976. State: errored. Details: 
https://travis-ci.org/widelands/widelands/builds/532515887.
Appveyor build 4757. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1827786_metaserver_login_box_clean_start-4757.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1827786-metaserver-login-box-clean-start/+merge/367320
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start.

___
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