Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1658317 into lp:widelands

2017-01-22 Thread Notabilis
On my system everything compiles and all tests run now.

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

2017-01-22 Thread GunChleoc
The proposal to merge lp:~widelands-dev/widelands/bug-1658317 into lp:widelands 
has been updated.

Commit Message changed to:

Reinstated LuaMap::set/set_warehouse_policies and removed superfluous line from 
set_inputs. This fixes the test suite.

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

2017-01-22 Thread GunChleoc
Yes, that fixed it. I messed that one up when I merged trunk.

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

2017-01-22 Thread GunChleoc
Review: Approve


-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1658317/+merge/315302
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1658317.

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

2017-01-22 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/bug-1658317 into lp:widelands 
has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1658317/+merge/315302
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1658317.

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

2017-01-22 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/ai_for_mods into 
lp:widelands.

Commit message:
AI calculates military strength based on the actual init.lua files now rather 
than hard-coding the values. This removed the tribe name restriction for 
modders.

Requested reviews:
  TiborB (tiborb95)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/ai_for_mods/+merge/315311

The values should all be the same as before, except for Barbarian 
increase_per_level = 850, which was assumed = 700 before.

Also, the values were assigned by = for the Atlanteans, but by += for the other 
tribes. I went with =, please fix if this is not intended.
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/ai_for_mods.
=== modified file 'src/ai/defaultai.h'
--- src/ai/defaultai.h	2016-12-07 22:18:10 +
+++ src/ai/defaultai.h	2017-01-22 12:45:20 +
@@ -94,8 +94,6 @@
 		kAttackableVeryWeak
 	};
 
-	enum class Tribes : uint8_t { kNone, kBarbarians, kAtlanteans, kEmpire };
-
 	/// Implementation for Strong
 	struct NormalImpl : public ComputerPlayer::Implementation {
 		NormalImpl() {

=== modified file 'src/ai/defaultai_warfare.cc'
--- src/ai/defaultai_warfare.cc	2017-01-06 09:00:11 +
+++ src/ai/defaultai_warfare.cc	2017-01-22 12:45:20 +
@@ -699,19 +699,6 @@
 		return 0;
 	}
 
-	Tribes tribe = Tribes::kNone;
-
-	if (soldiers.at(0)->get_owner()->tribe().name() == "atlanteans") {
-		tribe = Tribes::kAtlanteans;
-	} else if (soldiers.at(0)->get_owner()->tribe().name() == "barbarians") {
-		tribe = Tribes::kBarbarians;
-	} else if (soldiers.at(0)->get_owner()->tribe().name() == "empire") {
-		tribe = Tribes::kEmpire;
-	} else {
-		throw wexception("AI warning: Unable to calculate strength for player of tribe %s",
-		 soldiers.at(0)->get_owner()->tribe().name().c_str());
-	}
-
 	float health = 0;
 	float attack = 0;
 	float defense = 0;
@@ -719,29 +706,11 @@
 	float final = 0;
 
 	for (Soldier* soldier : soldiers) {
-		switch (tribe) {
-		case (Tribes::kAtlanteans):
-			health = 135 + 40 * soldier->get_health_level();
-			attack = 14 + 8 * soldier->get_attack_level();
-			defense = static_cast(94 - 8 * soldier->get_defense_level()) / 100;
-			evade = static_cast(70 - 17 * soldier->get_evade_level()) / 100;
-			break;
-		case (Tribes::kBarbarians):
-			health += 130 + 28 * soldier->get_health_level();
-			attack += 14 + 7 * soldier->get_attack_level();
-			defense += static_cast(97 - 8 * soldier->get_defense_level()) / 100;
-			evade += static_cast(75 - 15 * soldier->get_evade_level()) / 100;
-			break;
-		case (Tribes::kEmpire):
-			health += 130 + 21 * soldier->get_health_level();
-			attack += 14 + 8 * soldier->get_attack_level();
-			defense += static_cast(95 - 8 * soldier->get_defense_level()) / 100;
-			evade += static_cast(70 - 16 * soldier->get_evade_level()) / 100;
-			break;
-		case (Tribes::kNone):
-			NEVER_HERE();
-		}
-
+		const SoldierDescr& descr = soldier->descr();
+		health = (descr.get_base_health() + descr.get_health_incr_per_level() * soldier->get_health_level()) / 100;
+		attack = ((descr.get_base_max_attack() - descr.get_base_min_attack()) / 2 + descr.get_base_min_attack() + descr.get_attack_incr_per_level() * soldier->get_attack_level()) / 100;
+		defense = static_cast(100 - descr.get_base_defense() - 8 * soldier->get_defense_level()) / 100;
+		evade = static_cast(100 - descr.get_base_evade() - descr.get_evade_incr_per_level() / 100 * soldier->get_evade_level()) / 100;
 		final += (attack * health) / (defense * evade);
 	}
 

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

2017-01-22 Thread GunChleoc
The proposal to merge lp:~widelands-dev/widelands/ai_for_mods into lp:widelands 
has been updated.

Description changed to:

The values should all be the same as before, except for Barbarian 
increase_per_level = 850, which was assumed = 700 before.

Also, the values were assigned by = for the Atlanteans, but by += for the other 
tribes. I went with =, please fix if this is not intended.

Also, all values get / 100, do we still need this, since it's uniform?

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

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

2017-01-22 Thread SirVer
> I apologize for messing up the code, I added missing parts. However I see one 
> regression test still fails: test_casern.lua


I actually blame bunnybot for this. It should just not merge a branch with 
failing travis tests. I am attempting to fix this behavior.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1658317/+merge/315302
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1658317.

___
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/refactoring-input-queue into lp:widelands

2017-01-22 Thread Notabilis
Notabilis has proposed merging 
lp:~widelands-dev/widelands/refactoring-input-queue into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/refactoring-input-queue/+merge/315313

Replaces usage of WareQueue with the new InputQueue where it makes sense,
simplifying some code parts in the process.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/refactoring-input-queue into lp:widelands.
=== modified file 'src/ai/defaultai.cc'
--- src/ai/defaultai.cc	2017-01-06 09:00:11 +
+++ src/ai/defaultai.cc	2017-01-22 16:41:24 +
@@ -3117,11 +3117,11 @@
 	// the site is pending for upgrade - one possible cause is this is a freshly loaded game
 	if (!site.upgrade_pending) {
 		bool resetting_wares = false;
-		for (auto& queue : site.site->warequeues()) {
+		for (auto& queue : site.site->inputqueues()) {
 			if (queue->get_max_fill() == 0) {
 resetting_wares = true;
 game().send_player_set_input_max_fill(
-   *site.site, queue->get_index(), wwWARE, queue->get_max_size());
+   *site.site, queue->get_index(), queue->get_type(), queue->get_max_size());
 			}
 		}
 		if (resetting_wares) {
@@ -3135,7 +3135,7 @@
 		// The site is in process of emptying its input queues
 		// Counting remaining wares in the site now
 		int32_t left_wares = 0;
-		for (auto& queue : site.site->warequeues()) {
+		for (auto& queue : site.site->inputqueues()) {
 			left_wares += queue->get_filled();
 		}
 		// Do nothing when some wares are left, but do not wait more then 4 minutes
@@ -3221,8 +3221,8 @@
 		if (doing_upgrade) {
 
 			// reducing input queues
-			for (auto& queue : site.site->warequeues()) {
-game().send_player_set_input_max_fill(*site.site, queue->get_index(), wwWARE, 0);
+			for (auto& queue : site.site->inputqueues()) {
+game().send_player_set_input_max_fill(*site.site, queue->get_index(), queue->get_type(), 0);
 			}
 			site.bo->construction_decision_time = gametime;
 			en_bo.construction_decision_time = gametime;

=== modified file 'src/ai/defaultai_seafaring.cc'
--- src/ai/defaultai_seafaring.cc	2016-12-08 17:27:00 +
+++ src/ai/defaultai_seafaring.cc	2017-01-22 16:41:24 +
@@ -133,10 +133,11 @@
 
 			// counting stocks
 			uint8_t stocked_wares = 0;
-			std::vector const warequeues = ps_obs.site->warequeues();
-			size_t const nr_warequeues = warequeues.size();
-			for (size_t i = 0; i < nr_warequeues; ++i) {
-stocked_wares += warequeues[i]->get_filled();
+			std::vector const inputqueues = ps_obs.site->inputqueues();
+			for (InputQueue *queue : inputqueues) {
+if (queue->get_type() == wwWARE) {
+	stocked_wares += queue->get_filled();
+}
 			}
 			if (stocked_wares == 16 && ps_obs.site->is_stopped() && ps_obs.site->can_start_working()) {
 idle_shipyard_stocked = true;
@@ -188,10 +189,11 @@
 // make sure it is fully stocked
 // counting stocks
 uint8_t stocked_wares = 0;
-std::vector const warequeues = ps_obs.site->warequeues();
-size_t const nr_warequeues = warequeues.size();
-for (size_t i = 0; i < nr_warequeues; ++i) {
-	stocked_wares += warequeues[i]->get_filled();
+std::vector const inputqueues = ps_obs.site->inputqueues();
+for (InputQueue *queue : inputqueues) {
+	if (queue->get_type() == wwWARE) {
+		stocked_wares += queue->get_filled();
+	}
 }
 if (stocked_wares < 16) {
 	continue;

=== modified file 'src/ai/defaultai_warfare.cc'
--- src/ai/defaultai_warfare.cc	2017-01-06 09:00:11 +
+++ src/ai/defaultai_warfare.cc	2017-01-22 16:41:24 +
@@ -478,22 +478,26 @@
 	// reducing ware queues
 	// - for armours and weapons to 1
 	// - for others to 6
-	std::vector const warequeues1 = tso.site->warequeues();
-	size_t nr_warequeues = warequeues1.size();
-	for (size_t i = 0; i < nr_warequeues; ++i) {
+	// - for others to 6
+	std::vector const inputqueues1 = tso.site->inputqueues();
+	for (InputQueue *queue : inputqueues1) {
+
+		if (queue->get_type() != wwWARE) {
+			continue;
+		}
 
 		// if it was decreased yet
-		if (warequeues1[i]->get_max_fill() <= 1) {
+		if (queue->get_max_fill() <= 1) {
 			continue;
 		}
 
 		// now modifying max_fill of armors and weapons
 		for (std::string pattern : armors_and_weapons) {
 
-			if (tribe_->get_ware_descr(warequeues1[i]->get_index())->name().find(pattern) !=
+			if (tribe_->get_ware_descr(queue->get_index())->name().find(pattern) !=
 			std::string::npos) {
-if (warequeues1[i]->get_max_fill() > 1) {
-	game().send_player_set_input_max_fill(*ts, warequeues1[i]->get_index(), wwWARE, 1);
+if (queue->get_max_fill() > 1) {
+	game().send_player_set_input_max_fill(*ts, queue->get_index(), wwWARE, 1);
 	continue;
 }
 			}
@@ -518,11 +522,13 @@
 		// minutes)
 		// we can accept also shortage up to 3
 		int32_t shortage = 0;
-		std::vector const warequeues2 = tso.site->warequeues();
-		nr_wa

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/refactoring-input-queue into lp:widelands

2017-01-22 Thread GunChleoc
Review: Approve

Coede LGTM - just some small nits. Needs testing.

Diff comments:

> 
> === modified file 'src/ai/defaultai_warfare.cc'
> --- src/ai/defaultai_warfare.cc   2017-01-06 09:00:11 +
> +++ src/ai/defaultai_warfare.cc   2017-01-22 16:41:24 +
> @@ -478,22 +478,26 @@
>   // reducing ware queues
>   // - for armours and weapons to 1
>   // - for others to 6
> - std::vector const warequeues1 = tso.site->warequeues();
> - size_t nr_warequeues = warequeues1.size();
> - for (size_t i = 0; i < nr_warequeues; ++i) {
> + // - for others to 6
> + std::vector const inputqueues1 = tso.site->inputqueues();
> + for (InputQueue *queue : inputqueues1) {

How about:
for (InputQueue *queue : tso.site->inputqueues()) {
and lose the extra variable?

> +
> + if (queue->get_type() != wwWARE) {
> + continue;
> + }
>  
>   // if it was decreased yet
> - if (warequeues1[i]->get_max_fill() <= 1) {
> + if (queue->get_max_fill() <= 1) {
>   continue;
>   }
>  
>   // now modifying max_fill of armors and weapons
>   for (std::string pattern : armors_and_weapons) {
>  
> - if 
> (tribe_->get_ware_descr(warequeues1[i]->get_index())->name().find(pattern) !=
> + if 
> (tribe_->get_ware_descr(queue->get_index())->name().find(pattern) !=
>   std::string::npos) {
> - if (warequeues1[i]->get_max_fill() > 1) {
> - 
> game().send_player_set_input_max_fill(*ts, warequeues1[i]->get_index(), 
> wwWARE, 1);
> + if (queue->get_max_fill() > 1) {
> + 
> game().send_player_set_input_max_fill(*ts, queue->get_index(), wwWARE, 1);
>   continue;
>   }
>   }
> @@ -518,11 +522,13 @@
>   // minutes)
>   // we can accept also shortage up to 3
>   int32_t shortage = 0;
> - std::vector const warequeues2 = 
> tso.site->warequeues();
> - nr_warequeues = warequeues2.size();
> - for (size_t i = 0; i < nr_warequeues; ++i) {
> - if 
> (tso.bo->substitute_inputs.count(warequeues2[i]->get_index()) > 0) {
> - filled += warequeues2[i]->get_filled();
> + std::vector const inputqueues2 = 
> tso.site->inputqueues();
> + for (InputQueue *queue : inputqueues2) {

How about:
for (InputQueue *queue : tso.site->inputqueues()) {
and lose the extra variable?

> + if (queue->get_type() != wwWARE) {
> + continue;
> + }
> + if (tso.bo->substitute_inputs.count(queue->get_index()) 
> > 0) {
> + filled += queue->get_filled();
>   }
>   }
>   if (filled < 5) {
> @@ -530,12 +536,15 @@
>   }
>  
>   // checking non subsitutes
> - for (size_t i = 0; i < nr_warequeues; ++i) {
> - if 
> (tso.bo->substitute_inputs.count(warequeues2[i]->get_index()) == 0) {
> + for (InputQueue *queue : inputqueues2) {

How about:
for (InputQueue *queue : tso.site->inputqueues()) {
and lose the extra variable?

> + if (queue->get_type() != wwWARE) {
> + continue;
> + }
> + if (tso.bo->substitute_inputs.count(queue->get_index()) 
> == 0) {
>   const uint32_t required_amount =
> -(warequeues2[i]->get_max_fill() < 5) ? 
> warequeues2[i]->get_max_fill() : 5;
> - if (warequeues2[i]->get_filled() < 
> required_amount) {
> - shortage += required_amount - 
> warequeues2[i]->get_filled();
> +(queue->get_max_fill() < 5) ? 
> queue->get_max_fill() : 5;
> + if (queue->get_filled() < required_amount) {
> + shortage += required_amount - 
> queue->get_filled();
>   }
>   }
>   }
> 
> === modified file 'src/logic/map_objects/tribes/constructionsite.cc'
> --- src/logic/map_objects/tribes/constructionsite.cc  2016-12-05 09:24:10 
> +
> +++ src/logic/map_objects/tribes/constructionsite.cc  2017-01-22 16:41:24 
> +
> @@ -80,14 +80,20 @@
>  Access to the wares queues by id
>  ===
>  */
> -WaresQueue& ConstructionSite::waresqueue(DescriptionIndex const wi) {
> +InputQueue& ConstructionSite::inputqueue(DescriptionIndex const wi, 
> WareWorker const type) {
> +// There are no worker queues here
> +// Hopefully, our

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

2017-01-22 Thread GunChleoc
I think x1 looks most balanced.
-- 
https://code.launchpad.net/~widelands-dev/widelands/reset_zoom_button/+merge/313058
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/reset_zoom_button 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-1625502-tips-in-help into lp:widelands

2017-01-22 Thread Klaus Halfmann
Code LGTM, one nit about  but as this HTML is not in the wild,
it may not be worth changing.
Will compile / test this now
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1625502-tips-in-help/+merge/312969
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1625502-tips-in-help.

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

2017-01-22 Thread TiborB
Review: Approve

This looks like very smart change!!!, I tested it, seems working OK. the "+=" 
issue is really a stupid bug.
As for mathematics - I never understood or even care about formulas, but they 
seems OK to me (when comparing them with the current version in trunk).
-- 
https://code.launchpad.net/~widelands-dev/widelands/ai_for_mods/+merge/315311
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/ai_for_mods.

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

2017-01-22 Thread GunChleoc
Hasi50 approved the code for this branch in IRC.

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

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

2017-01-22 Thread bunnybot
Continuous integration builds have changed state:

Travis build 1849. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/194204747.
Appveyor build 1686. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_ai_for_mods-1686.
-- 
https://code.launchpad.net/~widelands-dev/widelands/ai_for_mods/+merge/315311
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/ai_for_mods.

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

2017-01-22 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/fsmenu_fullscreen_4_options 
into lp:widelands has been updated.

Status: Needs review => Merged

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

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

2017-01-22 Thread GunChleoc
Actually, the divisions by 100 cancel each other out in

final += (attack * health) / (defense * evade);

so I have removed them. Less code is good code :)

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

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

2017-01-22 Thread TiborB
My only concern is division of integers and consequent rounding

Dňa ne 22. 1. 2017, 21:52 GunChleoc  napísal(a):

> Actually, the divisions by 100 cancel each other out in
>
> final += (attack * health) / (defense * evade);
>
> so I have removed them. Less code is good code :)
>
> @bunnybot merge
> --
>
> https://code.launchpad.net/~widelands-dev/widelands/ai_for_mods/+merge/315311
> You are reviewing the proposed merge of
> lp:~widelands-dev/widelands/ai_for_mods into lp:widelands.
>

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

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

2017-01-22 Thread GunChleoc
The only division now is in

final += (attack * health) / (defense * evade);

and those variables are all float.
-- 
https://code.launchpad.net/~widelands-dev/widelands/ai_for_mods/+merge/315311
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/ai_for_mods.

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

2017-01-22 Thread GunChleoc
Well, actually found some. This was int before, so an improvement :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/ai_for_mods/+merge/315311
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/ai_for_mods.

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

2017-01-22 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/ai_for_mods into lp:widelands 
has been updated.

Status: Needs review => Merged

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

___
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/refactoring-input-queue into lp:widelands

2017-01-22 Thread bunnybot
Continuous integration builds have changed state:

Travis build 1850. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/194249534.
Appveyor build 1687. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_refactoring_input_queue-1687.
-- 
https://code.launchpad.net/~widelands-dev/widelands/refactoring-input-queue/+merge/315313
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/refactoring-input-queue.

___
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/refactoring-input-queue into lp:widelands

2017-01-22 Thread Notabilis
Nits are done, testing by someone else is still needed.
-- 
https://code.launchpad.net/~widelands-dev/widelands/refactoring-input-queue/+merge/315313
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/refactoring-input-queue.

___
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