From: "Enrico Weigelt, metux IT consult" <[email protected]>
---
src/net/sf/freecol/common/model/Role.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/net/sf/freecol/common/model/Role.java
b/src/net/sf/freecol/common/model/Role.java
index fe67d564451..ddc132bf18c 100644
--- a/src/net/sf/freecol/common/model/Role.java
+++ b/src/net/sf/freecol/common/model/Role.java
@@ -353,9 +353,11 @@ public class Role extends BuildableType {
result.add(new AbstractGoods(ag.getType(), amount));
}
}
- result.addAll(transform(fromGoods,
- ag -> !AbstractGoods.anyIsType(toGoods,
ag.getType()),
- ag -> new AbstractGoods(ag.getType(),
-ag.getAmount())));
+ for (AbstractGoods ag : fromGoods) {
+ GoodsType gt = ag.getType();
+ if (!AbstractGoods.anyIsType(toGoods, gt))
+ result.add(new AbstractGoods(gt, -ag.getAmount()));
+ }
}
return result;
}
--
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