← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/ai_fisher_identification into lp:widelands

 

TiborB has proposed merging lp:~widelands-dev/widelands/ai_fisher_identification into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

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

AI tweak - a productionsite to be considered a fisher must not have any inputs.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/ai_fisher_identification into lp:widelands.
=== modified file 'src/ai/defaultai.cc'
--- src/ai/defaultai.cc	2018-02-16 20:42:21 +0000
+++ src/ai/defaultai.cc	2018-02-17 21:14:33 +0000
@@ -723,7 +723,8 @@
 			}
 
 			// and fishers
-			if (bo.outputs.size() == 1 && tribe_->safe_ware_index("fish") == bo.outputs.at(0)) {
+			if (bo.outputs.size() == 1 && tribe_->safe_ware_index("fish") == bo.outputs.at(0) &&
+				bo.inputs.empty()) {
 				bo.set_is(BuildingAttribute::kFisher);
 			}
 


Follow ups