@@ -0,0 +1,2297 @@
+/*******************************************************************************%0A * Copyright (c) 2016%0A *%0A * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the %22Software%22),%0A * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,%0A * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:%0A *%0A * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.%0A *%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER%0A * DEALINGS IN THE SOFTWARE.%0A *******************************************************************************/%0Apackage jsettlers.ai.highlevel.pioneers.target;%0A%0Aimport jsettlers.ai.highlevel.AiPositions;%0Aimport jsettlers.ai.highlevel.AiStatistics;%0Aimport jsettlers.common.buildings.EBuildingType;%0Aimport jsettlers.common.mapobject.EMapObjectType;%0Aimport jsettlers.common.position.ShortPoint2D;%0A%0A/**%0A * @author codingberlin%0A */%0Apublic class TreesForLumberJackTargetFinder extends CuttingBuildingTargetFinder %7B%0A%0A%09public TreesForLumberJackTargetFinder(AiStatistics aiStatistics, byte playerId, int searchDistance, int cuttableObjectsPerBuilding) %7B%0A%09%09super(aiStatistics, playerId, searchDistance, EBuildingType.LUMBERJACK, cuttableObjectsPerBuilding, EMapObjectType.TREE_ADULT);%0A%09%7D%0A%0A%09@Override%0A%09public ShortPoint2D findTarget(AiPositions playerBorder, ShortPoint2D center) %7B%0A%09%09if (enoughTreesAreGuaranteed()) %7B%0A%09%09%09return null;%0A%09%09%7D%0A%0A%09%09return findTarget(playerBorder, center, aiStatistics.getTreesForPlayer(playerId).size());%0A%09%7D%0A%0A%09private boolean enoughTreesAreGuaranteed() %7B%0A%09%09return aiStatistics.getNumberOfBuildingTypeForPlayer(EBuildingType.FORESTER, playerId) %3E= 2;%0A%09%7D%0A%7D%0A

rework disabling mechanism to clearify its intention