From: "Enrico Weigelt, metux IT consult" <[email protected]>
---
.../sf/freecol/server/ai/goal/ManageMissionariesGoal.java | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/net/sf/freecol/server/ai/goal/ManageMissionariesGoal.java
b/src/net/sf/freecol/server/ai/goal/ManageMissionariesGoal.java
index 6b2e6e5c27f..3df960cd450 100644
--- a/src/net/sf/freecol/server/ai/goal/ManageMissionariesGoal.java
+++ b/src/net/sf/freecol/server/ai/goal/ManageMissionariesGoal.java
@@ -161,16 +161,18 @@ public class ManageMissionariesGoal extends Goal {
private IndianSettlement findSettlement(Tile tile) {
- return (tile == null)
// FIXME: We're in europe - let's deal with it.
- ? null
+ if (tile == null) return null;
// Possible FIXME: Slightly randomize findings?
// Otherwise, missionaries starting from the same position
// will find the same settlement.
- : find(map(tile.getSurroundingTiles(1, MAX_SEARCH_RADIUS),
- Tile::getIndianSettlement),
- is -> is != null && !is.hasMissionary(player.getPlayer()),
- null);
+ for (Tile t : tile.getSurroundingTiles(1, MAX_SEARCH_RADIUS)) {
+ IndianSettlement is = t.getIndianSettlement();
+ if (is != null && !is.hasMissionary(player.getPlayer()))
+ return is;
+ }
+
+ return null;
}
--
2.11.0.rc0.7.gbe5a750
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Freecol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freecol-developers