#Make sure there are no bonuses of the same class (but a different type) nearby:
if classInfo != None:
if mc.BtS or mc.Warlords: #Ugh, annoying version difference
iRange = classInfo.getUniqueRange()
else:
iRange = classInfo.getUniqueRange #<--attribute for vanilla
for dx in range(-iRange,iRange+1):
for dy in range(-iRange,iRange+1):
loopPlot = self.plotXY(x,y,dx,dy)
if loopPlot >= 1:
if areaID == loopPlot.getArea():
if plotDistance(x, y, loopPlot.getX(), loopPlot.getY()) <= 2:
eOtherBonus = loopPlot.getBonusType(TeamTypes.NO_TEAM)
if eOtherBonus != BonusTypes.NO_BONUS:
if gc.getBonusInfo(eOtherBonus).getBonusClassType() == bonusInfo.getBonusClassType():
return False
#Make sure there are no bonuses of the same type nearby:
iRange = bonusInfo.getUniqueRange()
for dx in range(-iRange,iRange+1):
for dy in range(-iRange,iRange+1):
loopPlot = self.plotXY(x,y,dx,dy)
if loopPlot >= 1:
if areaID == loopPlot.getArea():
if plotDistance(x, y, loopPlot.getX(), loopPlot.getY()) <= 2:
eOtherBonus = loopPlot.getBonusType(TeamTypes.NO_TEAM)
if eOtherBonus != BonusTypes.NO_BONUS:
if eOtherBonus == eBonus:
return False