Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/font_size-lua into lp:widelands

2019-05-12 Thread GunChleoc
Found the bug and fixed the compiler warnings :)
-- 
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/localization-post-build20 into lp:widelands

2019-05-12 Thread GunChleoc
Thanks for collecting them - let's fix them all in this branch.
-- 
https://code.launchpad.net/~widelands-dev/widelands/localization-post-build20/+merge/367305
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/localization-post-build20 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

2019-05-12 Thread GunChleoc
In your video, I don't see you accessing the dropdown in the economy window 
after the deletion.
-- 
https://code.launchpad.net/~widelands-dev/widelands/economy-target-profiles/+merge/366987
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/economy-target-profiles.

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

2019-05-12 Thread GunChleoc
1 nit for the saveloading, not tested yet.

We should also remember to add TODO comments when adding savegame compatibility 
code - this will make it easier to find and remove after Build 21.

Diff comments:

> 
> === modified file 'src/map_io/map_buildingdata_packet.cc'
> --- src/map_io/map_buildingdata_packet.cc 2019-04-09 17:16:11 +
> +++ src/map_io/map_buildingdata_packet.cc 2019-05-11 12:50:41 +
> @@ -710,6 +710,12 @@
>   productionsite.statistics_[i] = fr.unsigned_8();
>   productionsite.statistics_string_on_changed_statistics_ 
> = fr.c_string();
>   productionsite.production_result_ = fr.c_string();
> +
> + if (kCurrentPacketVersionProductionsite >= 7) {

There is a line higher up that you will need to change too:

   if (packet_version == kCurrentPacketVersion)

> + productionsite.main_worker_ = fr.signed_32();
> + } else {
> + productionsite.main_worker_ = 
> productionsite.working_positions_[0].worker ? 0 : -1;
> + }
>   } else {
>   throw UnhandledVersionError("MapBuildingdataPacket - 
> Productionsite", packet_version,
>   
> kCurrentPacketVersionProductionsite);


-- 
https://code.launchpad.net/~widelands-dev/widelands/productionsite-bugs/+merge/367306
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/productionsite-bugs.

___
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-12 Thread GunChleoc
Found a typo in a comment.

The Lua code does not need reviewing because it will be removed anyway, but we 
should do a bit of testing.

Diff comments:

> 
> === modified file 'src/ai/defaultai.cc'
> --- src/ai/defaultai.cc   2019-04-20 05:44:37 +
> +++ src/ai/defaultai.cc   2019-05-11 21:13:40 +
> @@ -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

econmy -> economy

> + // this should only happen by scripting. 
> + if (bo.basic_amount) {
> + 
> persistent_data->remaining_basic_buildings.erase(bo.id);
> + }
>   } else if (bo.type == BuildingObserver::Type::kProductionsite ||
>  bo.type == BuildingObserver::Type::kMine) {
>  


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

2019-05-12 Thread GunChleoc
I just noticed this in the font_size-lua branch too and have fixed it there.
-- 
https://code.launchpad.net/~widelands-dev/widelands/representative_image_in_font_renderer/+merge/363781
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/representative_image_in_font_renderer.

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

2019-05-12 Thread GunChleoc
Review: Needs Fixing

This does not quite work yet.

1. Build a Wood Hardener
2. Wait until it is full
3. Set input queue to 0 logs
4. Evict the worker

When the worker returns, he won't remove the wares from the building
-- 
https://code.launchpad.net/~widelands-dev/widelands/productionsite-bugs/+merge/367306
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/productionsite-bugs.

___
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-1797702-spaces-in-names into lp:widelands

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

Travis build 4943. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/531220205.
Appveyor build 4724. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1797702_spaces_in_names-4724.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1797702-spaces-in-names/+merge/367123
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1827786-metaserver-login-box.

___
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-1797702-spaces-in-names into lp:widelands

2019-05-12 Thread bunnybot
Error merging this proposal:

Output:
stdout:

stderr:
Committing to: 
/mnt/bunnybot_data/bunnybot_data/data/bzr_repo/_widelands_dev_widelands_trunk/
bzr: ERROR: No changes to commit. Please 'bzr add' the files you want to 
commit, or use --unchanged to force an empty commit.


-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1797702-spaces-in-names/+merge/367123
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1827786-metaserver-login-box.

___
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-12 Thread GunChleoc
I gave up on the scenario after connecting 20 farms or so. Multiplayer game ran 
fine for > 7 hours gametime.

So, this can go in once the branch has been cleaned up :)
-- 
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/productionsite-bugs into lp:widelands

2019-05-12 Thread Benedikt Straub
Bug fixed

Diff comments:

> 
> === modified file 'src/map_io/map_buildingdata_packet.cc'
> --- src/map_io/map_buildingdata_packet.cc 2019-04-09 17:16:11 +
> +++ src/map_io/map_buildingdata_packet.cc 2019-05-11 12:50:41 +
> @@ -710,6 +710,12 @@
>   productionsite.statistics_[i] = fr.unsigned_8();
>   productionsite.statistics_string_on_changed_statistics_ 
> = fr.c_string();
>   productionsite.production_result_ = fr.c_string();
> +
> + if (kCurrentPacketVersionProductionsite >= 7) {

I only changed kCurrentPacketVersionProductionsite, not the general version

> + productionsite.main_worker_ = fr.signed_32();
> + } else {
> + productionsite.main_worker_ = 
> productionsite.working_positions_[0].worker ? 0 : -1;
> + }
>   } else {
>   throw UnhandledVersionError("MapBuildingdataPacket - 
> Productionsite", packet_version,
>   
> kCurrentPacketVersionProductionsite);


-- 
https://code.launchpad.net/~widelands-dev/widelands/productionsite-bugs/+merge/367306
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/productionsite-bugs.

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

2019-05-12 Thread GunChleoc
Review: Approve

Confirmed. Dome more testing and is working fine :)

@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/productionsite-bugs/+merge/367306
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/productionsite-bugs.

___
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-1825932-open-games into lp:widelands

2019-05-12 Thread Toni Förster
The proposal to merge lp:~widelands-dev/widelands/bug-1825932-open-games into 
lp:widelands has been updated.

Status: Rejected => Superseded

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1825932-open-games/+merge/366860
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1825932-open-games 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-1825932-open-games-clean-start into lp:widelands

2019-05-12 Thread Toni Förster
Toni Förster has proposed merging 
lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start into 
lp:widelands.

Commit message:
only display games for the same version and when they are open

* The list in the lobby has been renamed to "Open Games"
* only games a user can join will be listed
* when a game is running it gets removed from the list
* development builds are not displayed for normal builds
* no message is posted to the chat when the game can't be joined
* when host name is already taken show tooltip and draw red border

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1825932 in widelands: "Games in progress get reported as "now available" 
on lobby join"
  https://bugs.launchpad.net/widelands/+bug/1825932

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1825932-open-games-clean-start/+merge/367318
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start into 
lp:widelands.
=== modified file 'src/network/internet_gaming.cc'
--- src/network/internet_gaming.cc	2019-05-11 18:50:30 +
+++ src/network/internet_gaming.cc	2019-05-12 11:06:20 +
@@ -487,7 +487,7 @@
 InternetGame* ing = new InternetGame();
 ing->name = packet.string();
 ing->build_id = packet.string();
-ing->connectable = (packet.string() == INTERNET_GAME_SETUP);
+ing->connectable = packet.string();
 gamelist_.push_back(*ing);
 
 bool found = false;
@@ -498,10 +498,13 @@
 		break;
 	}
 }
-if (!found)
+if (!found && ing->connectable != INTERNET_GAME_RUNNING &&
+	(ing->build_id == build_id() || (ing->build_id.compare(0, 6, "build-") != 0
+	&& build_id().compare(0, 6, "build-") != 0))) {
 	format_and_add_chat(
-	   "", "", true,
-	   (boost::format(_("The game %s is now available")) % ing->name).str());
+		"", "", true,
+		(boost::format(_("The game %s is now available")) % ing->name).str());
+}
 
 delete ing;
 ing = nullptr;

=== modified file 'src/network/internet_gaming.h'
--- src/network/internet_gaming.h	2019-05-11 18:50:30 +
+++ src/network/internet_gaming.h	2019-05-12 11:06:20 +
@@ -43,7 +43,7 @@
 struct InternetGame {
 	std::string name;
 	std::string build_id;
-	bool connectable;
+	std::string connectable;
 };
 
 /**
@@ -178,6 +178,11 @@
 		return true;
 	}
 
+	void format_and_add_chat(const std::string& from,
+	 const std::string& to,
+	 bool system,
+	 const std::string& msg);
+
 private:
 	InternetGaming();
 
@@ -202,11 +207,6 @@
 	bool str2bool(std::string);
 	std::string bool2str(bool);
 
-	void format_and_add_chat(const std::string& from,
-	 const std::string& to,
-	 bool system,
-	 const std::string& msg);
-
 	/**
 	 * Does the real work of the login.
 	 * \param relogin Whether this is a relogin. Only difference is that

=== modified file 'src/ui_basic/editbox.cc'
--- src/ui_basic/editbox.cc	2019-05-11 18:50:30 +
+++ src/ui_basic/editbox.cc	2019-05-12 11:06:20 +
@@ -85,7 +85,8 @@
: Panel(parent, x, y, w, h > 0 ? h : text_height(font_size) + 2 * margin_y),
  m_(new EditBoxImpl),
  history_active_(false),
- history_position_(-1) {
+ history_position_(-1),
+ warning_(false) {
 	set_thinks(false);
 
 	m_->background_style = g_gr->styles().editbox_style(style);
@@ -346,7 +347,7 @@
 	draw_background(dst, *m_->background_style);
 
 	// Draw border.
-	if (get_w() >= 2 && get_h() >= 2) {
+	if (get_w() >= 2 && get_h() >= 2 && !warning_) {
 		static const RGBColor black(0, 0, 0);
 
 		// bottom edge
@@ -359,6 +360,25 @@
 		// left edge
 		dst.fill_rect(Recti(0, 0, 1, get_h() - 1), black);
 		dst.fill_rect(Recti(1, 0, 1, get_h() - 2), black);
+
+	} else {
+		// Draw a red border for warnings.
+		static const RGBColor red(255, 22, 22);
+
+		// bottom edge
+		dst.fill_rect(Recti(0, get_h() - 2, get_w(), 2), red);
+		// right edge
+		dst.fill_rect(Recti(get_w() - 2, 0, 2, get_h() -2), red);
+		// top edge
+		dst.fill_rect(Recti(0, 0, get_w() - 1, 1), red);
+		dst.fill_rect(Recti(0, 1, get_w() - 2, 1), red);
+		dst.brighten_rect(Recti(0, 0, get_w() - 1, 1), BUTTON_EDGE_BRIGHT_FACTOR);
+		dst.brighten_rect(Recti(0, 1, get_w() - 2, 1), BUTTON_EDGE_BRIGHT_FACTOR);
+		// left edge
+		dst.fill_rect(Recti(0, 0, 1, get_h() - 1), red);
+		dst.fill_rect(Recti(1, 0, 1, get_h() - 2), red);
+		dst.brighten_rect(Recti(0, 0, 1, get_h() - 1), BUTTON_EDGE_BRIGHT_FACTOR);
+		dst.brighten_rect(Recti(1, 0, 1, get_h() - 2), BUTTON_EDGE_BRIGHT_FACTOR);
 	}
 
 	if (has_focus()) {

=== modified file 'src/ui_basic/editbox.h'
--- src/ui_basic/editbox.h	2019-05-11 18:50:30 +
+++ src/ui_basic/editbox.h	2019-05-12 11:06:20 +
@@ -72,6 +72,10 @@
 
 	void draw(RenderTarget&) override;
 
+	void set_warning(bool warn) {
+		warning_ = warn

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

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

Status: Rejected => Superseded

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

___
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-12 Thread Toni Förster
Toni Förster has proposed merging 
lp:~widelands-dev/widelands/bug-1827786-metaserver-login-box-clean-start into 
lp:widelands with lp:~widelands-dev/widelands/bug-1825932-open-games as a 
prerequisite.

Commit message:
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
- always show login box settings button

Requested reviews:
  kaputtnik (franku)
Related bugs:
  Bug #1827786 in widelands: "reconsider the metaserver loginbox"
  https://bugs.launchpad.net/widelands/+bug/1827786

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1827786-metaserver-login-box-clean-start/+merge/367319
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1825932-open-games.
=== modified file 'src/network/internet_gaming.cc'
--- src/network/internet_gaming.cc	2019-05-11 18:50:30 +
+++ src/network/internet_gaming.cc	2019-05-12 11:08:42 +
@@ -487,7 +487,7 @@
 InternetGame* ing = new InternetGame();
 ing->name = packet.string();
 ing->build_id = packet.string();
-ing->connectable = (packet.string() == INTERNET_GAME_SETUP);
+ing->connectable = packet.string();
 gamelist_.push_back(*ing);
 
 bool found = false;
@@ -498,10 +498,13 @@
 		break;
 	}
 }
-if (!found)
+if (!found && ing->connectable != INTERNET_GAME_RUNNING &&
+	(ing->build_id == build_id() || (ing->build_id.compare(0, 6, "build-") != 0
+	&& build_id().compare(0, 6, "build-") != 0))) {
 	format_and_add_chat(
-	   "", "", true,
-	   (boost::format(_("The game %s is now available")) % ing->name).str());
+		"", "", true,
+		(boost::format(_("The game %s is now available")) % ing->name).str());
+}
 
 delete ing;
 ing = nullptr;

=== modified file 'src/network/internet_gaming.h'
--- src/network/internet_gaming.h	2019-05-11 18:50:30 +
+++ src/network/internet_gaming.h	2019-05-12 11:08:42 +
@@ -43,7 +43,7 @@
 struct InternetGame {
 	std::string name;
 	std::string build_id;
-	bool connectable;
+	std::string connectable;
 };
 
 /**
@@ -178,6 +178,11 @@
 		return true;
 	}
 
+	void format_and_add_chat(const std::string& from,
+	 const std::string& to,
+	 bool system,
+	 const std::string& msg);
+
 private:
 	InternetGaming();
 
@@ -202,11 +207,6 @@
 	bool str2bool(std::string);
 	std::string bool2str(bool);
 
-	void format_and_add_chat(const std::string& from,
-	 const std::string& to,
-	 bool system,
-	 const std::string& msg);
-
 	/**
 	 * Does the real work of the login.
 	 * \param relogin Whether this is a relogin. Only difference is that

=== modified file 'src/ui_basic/editbox.cc'
--- src/ui_basic/editbox.cc	2019-05-11 18:50:30 +
+++ src/ui_basic/editbox.cc	2019-05-12 11:08:42 +
@@ -85,7 +85,8 @@
: Panel(parent, x, y, w, h > 0 ? h : text_height(font_size) + 2 * margin_y),
  m_(new EditBoxImpl),
  history_active_(false),
- history_position_(-1) {
+ history_position_(-1),
+ warning_(false) {
 	set_thinks(false);
 
 	m_->background_style = g_gr->styles().editbox_style(style);
@@ -346,7 +347,7 @@
 	draw_background(dst, *m_->background_style);
 
 	// Draw border.
-	if (get_w() >= 2 && get_h() >= 2) {
+	if (get_w() >= 2 && get_h() >= 2 && !warning_) {
 		static const RGBColor black(0, 0, 0);
 
 		// bottom edge
@@ -359,6 +360,25 @@
 		// left edge
 		dst.fill_rect(Recti(0, 0, 1, get_h() - 1), black);
 		dst.fill_rect(Recti(1, 0, 1, get_h() - 2), black);
+
+	} else {
+		// Draw a red border for warnings.
+		static const RGBColor red(255, 22, 22);
+
+		// bottom edge
+		dst.fill_rect(Recti(0, get_h() - 2, get_w(), 2), red);
+		// right edge
+		dst.fill_rect(Recti(get_w() - 2, 0, 2, get_h() -2), red);
+		// top edge
+		dst.fill_rect(Recti(0, 0, get_w() - 1, 1), red);
+		dst.fill_rect(Recti(0, 1, get_w() - 2, 1), red);
+		dst.brighten_rect(Recti(0, 0, get_w() - 1, 1), BUTTON_EDGE_BRIGHT_FACTOR);
+		dst.brighten_rect(Recti(0, 1, get_w() - 2, 1), BUTTON_EDGE_BRIGHT_FACTOR);
+		// left edge
+		dst.fill_rect(Recti(0, 0, 1, get_h() - 1), red);
+		dst.fill_rect(Recti(1, 0, 1, get_h() - 2), red);
+		dst.brighten_rect(Recti(0, 0, 1, get_h() - 1), BUTTON_EDGE_BRIGHT_FACTOR);
+		dst.brighten_rect(Recti(1, 0, 1, get_h() - 2), BUTTON_EDGE_BRIGHT_FACTOR);
 	}
 
 	if (has_focus()) {

=== modified file 'src/ui_basic/editbox.h'
--- src/ui_basic/editbox.h	2019-05-11 18:50:30 +
+++ src/ui_basic/editbox.h	2019-05-12 11:08:42 +
@@ -72,6 +72,10 @@

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

2019-05-12 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.

Status: Needs review => Superseded

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

___
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-12 Thread Toni Förster
Toni Förster has proposed merging 
lp:~widelands-dev/widelands/bug-1827786-metaserver-login-box-clean-start into 
lp:widelands with 
lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start as a 
prerequisite.

Commit message:
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
- always show login box settings button

Requested reviews:
  kaputtnik (franku)
Related bugs:
  Bug #1827786 in widelands: "reconsider the metaserver loginbox"
  https://bugs.launchpad.net/widelands/+bug/1827786

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.
=== modified file 'src/ui_fsmenu/multiplayer.cc'
--- src/ui_fsmenu/multiplayer.cc	2019-05-11 18:50:30 +
+++ src/ui_fsmenu/multiplayer.cc	2019-05-12 11:12:04 +
@@ -58,21 +58,46 @@
 	vbox_.add_inf_space();
 	vbox_.add(&back, UI::Box::Resizing::kFullSize);
 
-	Section& s = g_options.pull_section("global");
-	auto_log_ = s.get_bool("auto_log", false);
-	if (auto_log_) {
-		showloginbox =
+	showloginbox =
 		   new UI::Button(this, "login_dialog", 0, 0, 0, 0, UI::ButtonStyle::kFsMenuSecondary,
 		  g_gr->images().get("images/ui_basic/continue.png"), _("Show login dialog"));
-		showloginbox->sigclicked.connect(
+	showloginbox->sigclicked.connect(
 		   boost::bind(&FullscreenMenuMultiPlayer::show_internet_login, boost::ref(*this)));
-	}
 	layout();
 }
 
 /// called if the showloginbox button was pressed
 void FullscreenMenuMultiPlayer::show_internet_login() {
-	auto_log_ = false;
+	Section& s = g_options.pull_section("global");
+	LoginBox lb(*this);
+	if (lb.run() == UI::Panel::Returncodes::kOk) {
+		nickname_ = lb.get_nickname();
+		s.set_string("nickname", nickname_);
+		/// NOTE: The password is only stored (in memory and on disk) and transmitted (over the
+		/// network
+		/// to the metaserver) as cryptographic hash. This does NOT mean that the password is
+		/// stored
+		/// securely on the local disk. While the password should be secure while transmitted to
+		/// the
+		/// metaserver (no-one can use the transmitted data to log in as the user) this is not the
+		/// case
+		/// for local storage. The stored hash of the password makes it hard to look at the
+		/// configuration
+		/// file and figure out the plaintext password to, e.g., log in on the forum. However, the
+		/// stored hash can be copied to another system and used to log in as the user on the
+		/// metaserver.
+		// Further note: SHA-1 is considered broken and shouldn't be used anymore. But since the
+		// passwords on the server are protected by SHA-1 we have to use it here, too
+		if (lb.get_password() != "*") {
+			password_ = crypto::sha1(lb.get_password());
+			s.set_string("password_sha1", password_);
+		}
+
+		register_ = lb.registered();
+		s.set_bool("registered", lb.registered());
+	} else {
+		return;
+	}
 	internet_login();
 }
 
@@ -90,37 +115,15 @@
  */
 void FullscreenMenuMultiPlayer::internet_login() {
 	Section& s = g_options.pull_section("global");
-	if (auto_log_) {
-		nickname_ = s.get_string("nickname", _("nobody"));
-		password_ = s.get_string("password_sha1", "nobody");
-		register_ = s.get_bool("registered", false);
-	} else {
-		LoginBox lb(*this);
-		if (lb.run() == UI::Panel::Returncodes::kOk) {
-			nickname_ = lb.get_nickname();
-			/// NOTE: The password is only stored (in memory and on disk) and transmitted (over the
-			/// network
-			/// to the metaserver) as cryptographic hash. This does NOT mean that the password is
-			/// stored
-			/// securely on the local disk. While the password should be secure while transmitted to
-			/// the
-			/// metaserver (no-one can use the transmitted data to log in as the user) this is not the
-			/// case
-			/// for local storage. The stored hash of the password makes it hard to look at the
-			/// configuration
-			/// file and figure out the plaintext password to, e.g., log in on the forum. However, the
-			/// stored hash can be copied to another system and used to log in as the user on the
-			/// metaserver.
-			// Further note: SHA-1 is considered broken and shouldn't be used anymore. But since the
-			// passwords on the server are protected by SHA-1 we have to use it here, too
-			password_ = crypto::sha1(lb.get_password());
-			register_ = lb.registered();
-
-			s.set_bool("registered", lb.registered());
-			s.set_bool("auto_log", lb.set_automaticlog());
-		} else {
-			return;
-		}
+

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start into lp:widelands

2019-05-12 Thread Toni Förster
Sometimes it is better to go to bed and start over the next day :D

I deleted the other merge request and linked the clean branches to the existing 
merge requests.

@Gun I'm not sure whether a different colouring of the text would help. So I 
did the following.

When a user enters the lobby, the "host game" button will be active, regardless 
of other games with the same name being active. When the user clicks on "host 
game", the button will become inactive and a red border is drawn around the 
editbox and the tooltip is activated. 

This will be the least intrusive way IMHO.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1825932-open-games-clean-start/+merge/367318
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start 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/overlapping_workareas into lp:widelands

2019-05-12 Thread Toni Förster
Works so far, but the overlapping areas are very hard to see. Could they be a 
little more saturated?
-- 
https://code.launchpad.net/~widelands-dev/widelands/overlapping_workareas/+merge/366623
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/overlapping_workareas.

___
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-1825932-open-games-clean-start into lp:widelands

2019-05-12 Thread GunChleoc
Review: Approve

Good solution, works for me :)

I'll leave the merging to you so I won't mess it up again.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1825932-open-games-clean-start/+merge/367318
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/list-directories-in-cpp into lp:widelands

2019-05-12 Thread GunChleoc
The proposal to merge lp:~widelands-dev/widelands/list-directories-in-cpp into 
lp:widelands has been updated.

Commit message changed to:

Improve performance and memory usage when loading tribes and world
- Save memory and loading time by not listing files via Lua
- Common sequential file loading function for image and sound files
- Replace regular expressions with NumberGlob for speedup
- Only load mipmap scales that are being used
- Preload sound files and animations at default scale for existing
  map objects to prevent dropping FPS at game start

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/list-directories-in-cpp/+merge/366614
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/list-directories-in-cpp 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-12 Thread GunChleoc
I have pushed a small tweak and added some more comments.

Diff comments:

> === modified file 'src/ui_fsmenu/multiplayer.cc'
> --- src/ui_fsmenu/multiplayer.cc  2019-05-11 18:50:30 +
> +++ src/ui_fsmenu/multiplayer.cc  2019-05-12 11:12:04 +
> @@ -58,21 +58,46 @@
>   vbox_.add_inf_space();
>   vbox_.add(&back, UI::Box::Resizing::kFullSize);
>  
> - Section& s = g_options.pull_section("global");
> - auto_log_ = s.get_bool("auto_log", false);
> - if (auto_log_) {
> - showloginbox =
> + showloginbox =
>  new UI::Button(this, "login_dialog", 0, 0, 0, 0, 
> UI::ButtonStyle::kFsMenuSecondary,
> 
> g_gr->images().get("images/ui_basic/continue.png"), _("Show login dialog"));
> - showloginbox->sigclicked.connect(
> + showloginbox->sigclicked.connect(
>  boost::bind(&FullscreenMenuMultiPlayer::show_internet_login, 
> boost::ref(*this)));
> - }
>   layout();
>  }
>  
>  /// called if the showloginbox button was pressed
>  void FullscreenMenuMultiPlayer::show_internet_login() {
> - auto_log_ = false;
> + Section& s = g_options.pull_section("global");
> + LoginBox lb(*this);
> + if (lb.run() == UI::Panel::Returncodes::kOk) {
> + nickname_ = lb.get_nickname();
> + s.set_string("nickname", nickname_);
> + /// NOTE: The password is only stored (in memory and on disk) 
> and transmitted (over the
> + /// network
> + /// to the metaserver) as cryptographic hash. This does NOT 
> mean that the password is
> + /// stored
> + /// securely on the local disk. While the password should be 
> secure while transmitted to
> + /// the
> + /// metaserver (no-one can use the transmitted data to log in 
> as the user) this is not the
> + /// case
> + /// for local storage. The stored hash of the password makes it 
> hard to look at the
> + /// configuration
> + /// file and figure out the plaintext password to, e.g., log in 
> on the forum. However, the
> + /// stored hash can be copied to another system and used to log 
> in as the user on the
> + /// metaserver.
> + // Further note: SHA-1 is considered broken and shouldn't be 
> used anymore. But since the
> + // passwords on the server are protected by SHA-1 we have to 
> use it here, too
> + if (lb.get_password() != "*") {

Better make this empty when it's not set and make the ** a function of 
displaying it only.

> + password_ = crypto::sha1(lb.get_password());
> + s.set_string("password_sha1", password_);
> + }
> +
> + register_ = lb.registered();
> + s.set_bool("registered", lb.registered());
> + } else {
> + return;
> + }
>   internet_login();
>  }
>  
> 
> === modified file 'src/wui/login_box.cc'
> --- src/wui/login_box.cc  2019-05-11 18:50:30 +
> +++ src/wui/login_box.cc  2019-05-12 11:12:04 +
> @@ -113,3 +114,44 @@
>   }
>   return UI::Panel::handle_key(down, code);
>  }
> +
> +void LoginBox::clicked_register() {
> + if (cb_register->get_state()) {
> + ta_password->set_color(UI_FONT_CLR_DISABLED);
> + eb_password->set_can_focus(false);
> + eb_password->set_text("");

When the user starts typing, the password is displayed as clear text, not as 
***. This needs to be fixed in the UI::Editbox class' draw() function.

> + } else {
> + ta_password->set_color(UI_FONT_CLR_FG);
> + eb_password->set_can_focus(true);
> + eb_password->focus();
> + }
> +}
> +
> +void LoginBox::verify_input() {
> + // Check if all needed input fields are valid
> + loginbtn->set_enabled(true);
> + eb_nickname->set_tooltip("");
> + eb_password->set_tooltip("");
> + eb_nickname->set_warning(false);
> +
> + if (eb_nickname->text().empty()) {
> + eb_nickname->set_warning(true);
> + eb_nickname->set_tooltip(_("Please enter a nickname!"));
> + loginbtn->set_enabled(false);
> + } else if 
> (eb_nickname->text().find_first_not_of("abcdefghijklmnopqrstuvwxyz"

We have this same complicated comparison above pull out a bool function to 
ensure consistency.

> + "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890@.+-_") <= 
> eb_nickname->text().size()) {
> + eb_nickname->set_warning(true);
> + eb_nickname->set_tooltip(_("Enter a valid nickname. 
> This value may contain only "
> + 
>   "English letters, numbers, and @ . + - _ 
> characters."));
> + loginbtn->set_enabled(false);
> + }
> +
> + if (eb_password->text().em

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/AI-fixes into lp:widelands

2019-05-12 Thread hessenfarmer
@Tibor: of course I made sure the numbers are not used elsewhere. Shall I add 
more comments to explain my changes?

@GunChleoc: will fix the typo ofcourse. I never did any thing in the scenario 
but watching the AI's doing their job. If you do so you would see significant 
progress. And you can see that my changes work as desirred. But this was meant 
for Nordfriese in particular to see whether my changes would solve his issues 
in the scenario which led him to start working (and making good progress for 
his own scenario specific AI). However I already had the impression he might be 
a little bit sadistic with the player to connect all these farms. ;-)

@ both: there is still a line commented out (5710ff in defaultai.cc) I wanted 
to have a value here that depended on stocklevel vs economy target, but the 
Code didn't work. I got a crash. So I commented this out as my Skills are to 
bad for realizing the cause if you know why this would crash you could fix it 
or give me a hint.
-- 
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/font_size-lua into lp:widelands

2019-05-12 Thread Toni Förster
Some problems in the lobby and multiplayer chat:

- The text in the input box is not centred
  (q,g, j and so on are cut off)
- Private messages double the prefix
- The @ in private message shouldn't be underlined
- There should either be no space before the @
  in private messages or an additional behind the @
  (as it is b20)
- If we have the space it should not be underlined
- The Username and the message look a little of
  (The message seems to be 2-4 pixels to high)

See this picture:

https://fosuta.org/pics/lua_chat.png
-- 
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/AI-fixes into lp:widelands

2019-05-12 Thread GunChleoc
I'll have a look.

Also, I got this:

../src/ai/defaultai.cc: In member function ‘bool 
DefaultAI::check_productionsites(uint32_t)’:
../src/ai/defaultai.cc:4474:95: warning: comparison between signed and unsigned 
integer expressions [-Wsign-compare]
   1000 < gametime && site.site->can_start_working() && 
get_stocklevel(*site.bo, gametime) >

~~~^
   (std::abs(management_data.get_military_number_at(168)) / 5)) {
   ~~~  

../src/ai/defaultai.cc:4502:46: warning: comparison between signed and unsigned 
integer expressions [-Wsign-compare]
  gametime - site.bo->last_dismantle_time >
  ^
  (std::abs(management_data.get_military_number_at(169)) / 10 + 1) * 60 
* 1000 &&
  


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

2019-05-12 Thread GunChleoc
I think I found the problem:

(bo.outputs.size() == 1) means that there is 1 entry at index 0.

(tribe_->get_ware_descr(bo.outputs.at(1)) would only be available if 
bo.outputs.size() > 1

Unlike Lua, C++ starts counting from 0. Actually, Lua is quite exceptional 
here, since starting from 0 is the usual way of doing arrays.
-- 
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/font_size-lua into lp:widelands

2019-05-12 Thread Toni Förster
=== modified file 'src/wui/game_chat_panel.cc'
--- src/wui/game_chat_panel.cc  2019-05-12 07:45:59 +
+++ src/wui/game_chat_panel.cc  2019-05-12 13:12:29 +
@@ -41,12 +41,12 @@
  0,
  0,
  w,
- h - 25,
+ h - 30,
  style,
  "",
  UI::Align::kLeft,
  UI::MultilineTextarea::ScrollMode::kScrollLogForced),
- editbox(this, 0, h - 20, w, style),
+ editbox(this, 0, h - 25, w, style),
  chat_message_counter(0),
  chat_sound(SoundHandler::register_fx(SoundType::kChat, 
"sound/lobby_chat")) {
-- 
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/bug-1825932-open-games-clean-start into lp:widelands

2019-05-12 Thread Toni Förster
Well, then.

@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1825932-open-games-clean-start/+merge/367318
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/overlapping_workareas into lp:widelands

2019-05-12 Thread Benedikt Straub
Updated the colours, are these better?
-- 
https://code.launchpad.net/~widelands-dev/widelands/overlapping_workareas/+merge/366623
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/overlapping_workareas.

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

2019-05-12 Thread Toni Förster
Review: Approve

Perfect.
-- 
https://code.launchpad.net/~widelands-dev/widelands/overlapping_workareas/+merge/366623
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/overlapping_workareas.

___
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/localization-post-build20 into lp:widelands

2019-05-12 Thread hessenfarmer
Just saw that there are 2 issues on transifex for the first frisian scenario 
which would fit in here as well. 
-- 
https://code.launchpad.net/~widelands-dev/widelands/localization-post-build20/+merge/367305
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/localization-post-build20 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/overlapping_workareas into lp:widelands

2019-05-12 Thread GunChleoc
Review: Approve

LGTM :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/overlapping_workareas/+merge/366623
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/overlapping_workareas.

___
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/list-directories-in-cpp into lp:widelands

2019-05-12 Thread Toni Förster
I got ~100 compile warnings:

src/io/filesystem/filesystem.h:150:71: warning: unknown command tag name 
[-Wdocumentation-unknown-command]
/// Returns all files in the given 'directory' that match 
'basename[_\d{1,3}].extension'
 ^~
-- 
https://code.launchpad.net/~widelands-dev/widelands/list-directories-in-cpp/+merge/366614
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/list-directories-in-cpp 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/AI-fixes into lp:widelands

2019-05-12 Thread Benedikt Straub
Tested it now with the 3rd frisian scenario.

The AI behaved quite well, just some nits:
– It builds mainly blockhouses and small milsites. IMHO it should build 
preferably bigger milsites near the enemy´s border, even if it´s unguarded.
– It´s still quite confused by the inability to build woodcutters, quarries and 
mines. It builds useless buildings like taverns (that can be solved by just 
forbidding everything) and it neglects important buildings like warehouses (are 
very important there because that´s where the script creates wares you cannot 
produce yourself). 
– There is much free space as a consequence of not having foresters, but 
space-consuming buildings (reedyard etc) are cramped closely together; but 
that´s a more general AI-problem.

– I get some compiler warnings:
/home/benedikt/wl/AI-fixes/src/ai/defaultai.cc:2461: Use "TODO(username): 
".
/home/benedikt/wl/AI-fixes/src/ai/defaultai.cc:2463: Trailing whitespace at end 
of line
[1007/1455] Building CXX object src/ai/CMakeFiles/ai.dir/defaultai.cc.o
../src/ai/defaultai.cc: In member function ‘bool 
DefaultAI::check_productionsites(uint32_t)’:
../src/ai/defaultai.cc:4502:46: warning: comparison of integer expressions of 
different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare]
  gametime - site.bo->last_dismantle_time >
  ^
  (std::abs(management_data.get_military_number_at(169)) / 10 + 1) * 60 
* 1000 &&
  



> But this was meant for Nordfriese in particular to see whether my changes 
> would solve his issues in the scenario which led him to start working (and 
> making good progress for his own scenario specific AI). However I already had 
> the impression he might be a little bit sadistic with the player to connect 
> all these farms. ;-)

Hey ;) The point of this objective is force the player to be almost idle until 
the enemy is standing right at his gates. And to force him to create a good 
road network under this pressure, which can be very important for the battles 
later.
Btw, my own AI is not scenario-specific – it´s a template for every(!) scenario 
that wants an AI specific to it
-- 
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-12 Thread bunnybot
Continuous integration builds have changed state:

Travis build 4946. State: failed. Details: 
https://travis-ci.org/widelands/widelands/builds/531247546.
Appveyor build 4727. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_AI_fixes-4727.
-- 
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/AI-fixes into lp:widelands

2019-05-12 Thread TiborB
@nordfriese
about warehouses - they are in proportion to productionsites, I dont think AI 
can have any idea it needs more warehouses in this specific case... 
-- 
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/AI-fixes into lp:widelands

2019-05-12 Thread TiborB
@hessenfarmer

"@Tibor: of course I made sure the numbers are not used elsewhere. Shall I add 
more comments to explain my changes?"
No, I am fine, I also believe that AI training will settle down these changes. 
I intend to run 100 iterations as soon as the branch is in trunk..
-- 
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/localization-post-build20 into lp:widelands

2019-05-12 Thread GunChleoc
Done. I have also changed the descnames for the resource indicators.

Resource indicators, fields, rocks and trees now have tooltips. Do we want them 
for all of these?
-- 
https://code.launchpad.net/~widelands-dev/widelands/localization-post-build20/+merge/367305
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/localization-post-build20 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/list-directories-in-cpp into lp:widelands

2019-05-12 Thread GunChleoc
Eek. Should be fixed now.
-- 
https://code.launchpad.net/~widelands-dev/widelands/list-directories-in-cpp/+merge/366614
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/list-directories-in-cpp 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/AI-fixes into lp:widelands

2019-05-12 Thread GunChleoc
 > The point of this objective is force the player to be almost idle until the 
 > enemy is standing right at his gates. And to force him to create a good road 
 > network under this pressure, which can be very important for the battles 
 > later.

I get what you're trying to do, but hooking up all these farms is pretty 
repetitive. Maybe you can come up with some more varied stuff to do while still 
having some time pressure?
-- 
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-website/show_user_posts into lp:widelands-website

2019-05-12 Thread noreply
The proposal to merge lp:~widelands-dev/widelands-website/show_user_posts into 
lp:widelands-website has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands-website/show_user_posts/+merge/367237
-- 
Your team Widelands Developers is subscribed to branch 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/localization-post-build20 into lp:widelands

2019-05-12 Thread hessenfarmer
Code looks good so far. one nit in a diff. will download compile and test now.

Diff comments:

> 
> === modified file 'data/tribes/wares/fire_tongs/helptexts.lua'
> --- data/tribes/wares/fire_tongs/helptexts.lua2017-07-07 16:51:39 
> +
> +++ data/tribes/wares/fire_tongs/helptexts.lua2019-05-12 16:32:01 
> +
> @@ -1,15 +1,15 @@
>  function ware_helptext(tribe)
> local helptext = {
>-- TRANSLATORS: Helptext for a ware: Fire Tongs
> -  default = pgettext("ware", "Fire tongs are the tools of the smelter, 
> who works in the smelting works."),
> -  -- TRANSLATORS: Helptext for a ware: Fire Tongs
> -  atlanteans = pgettext("atlanteans_ware_fire_tongs", "They are produced 
> by the toolsmith."),
> -  -- TRANSLATORS: Helptext for a ware: Fire Tongs
> -  frisians = pgettext("frisians_ware", "They are produced by the 
> blacksmithy."),
> -  -- TRANSLATORS: Helptext for a ware: Fire Tongs
> -  barbarians = pgettext("barbarians_ware", "Produced by the metal 
> workshop (but they cease to be produced by the building if it is enhanced to 
> an ax workshop and war mill)."),
> -  -- TRANSLATORS: Helptext for a ware: Fire Tongs
> -  empire = pgettext("empire_ware_fire_tongs", "They are produced by the 
> toolsmith.")
> +  default = pgettext("ware", "Fire tongs are the tools for smelting 
> ores."),
> +  -- TRANSLATORS: Helptext for a ware: Fire Tongs
> +  atlanteans = pgettext("atlanteans_ware_fire_tongs", "They are used in 
> the smelting works and produced by the toolsmith."),
> +  -- TRANSLATORS: Helptext for a ware: Fire Tongs
> +  frisians = pgettext("frisians_ware", "They are used in the furnace and 
> produced by the blacksmithy."),

frisians brickmaker use them as well

> +  -- TRANSLATORS: Helptext for a ware: Fire Tongs
> +  barbarians = pgettext("barbarians_ware", "They are used in the 
> smelting works and produced by the metal workshop (but they cease to be 
> produced by the building if it is enhanced to an ax workshop and war mill)."),
> +  -- TRANSLATORS: Helptext for a ware: Fire Tongs
> +  empire = pgettext("empire_ware_fire_tongs", "They are used in the 
> smelting works and produced by the toolsmith.")
> }
> local result = ""
> if tribe then


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

2019-05-12 Thread hessenfarmer
Sorry found another bug which fits in here. Can be solved in seperate branch 
though.
-- 
https://code.launchpad.net/~widelands-dev/widelands/localization-post-build20/+merge/367305
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/localization-post-build20 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/AI-fixes into lp:widelands

2019-05-12 Thread hessenfarmer
@ Nordfriese:
fixed the codecheck warnings.
We should try to forbid useless buildings like the tavern and see what's the 
effect.
Regarding warehouses the problem was not the number but the distribution. as 
the script delivers only to one warehouse a time, this is putting the road 
network under some pressure. therefore I forced at least one second carrrier.
As the gametime evolves I  made the experience, that the AI starts to build 
bigger milsites, however they are normally based on enemy force which is 
neglectable in this scenario. so the closer you get to an enemy the bigger the 
chance of big military buildings.
-- 
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/AI-fixes into lp:widelands

2019-05-12 Thread hessenfarmer
@ Nordfriese:
If you want to test this further let us know, if you are finished we could 
merge this.
-- 
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-1797702-spaces-in-names-clean-start into lp:widelands

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

Travis build 4948. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/531272166.
Appveyor build 4729. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1797702_spaces_in_names_clean_start-4729.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1797702-spaces-in-names-clean-start/+merge/367314
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1827786-metaserver-login-box-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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start into lp:widelands

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

Travis build 4950. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/531272518.
Appveyor build 4731. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1825932_open_games_clean_start-4731.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1825932-open-games-clean-start/+merge/367318
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start into lp:widelands

2019-05-12 Thread noreply
The proposal to merge 
lp:~widelands-dev/widelands/bug-1825932-open-games-clean-start into 
lp:widelands has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1825932-open-games-clean-start/+merge/367318
-- 
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/per-level-soldier-anims into lp:widelands

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

Travis build 4951. State: failed. Details: 
https://travis-ci.org/widelands/widelands/builds/531329354.
Appveyor build 4732. State: failed. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_per_level_soldier_anims-4732.
-- 
https://code.launchpad.net/~widelands-dev/widelands/per-level-soldier-anims/+merge/354929
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/per-level-soldier-anims 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/font_size-lua into lp:widelands

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

Travis build 4953. State: failed. Details: 
https://travis-ci.org/widelands/widelands/builds/531353166.
Appveyor build 4734. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_font_size_lua-4734.
-- 
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