Now i completely agree with that. So the code above does just that?
Sorry, should have been more precise. That code should replace the code in canBuild.
EDIT: Darn! I noticed it still uses isAdjacentPlotGroupConnectedBonus when it should be isPlotGroupConnectedBonus.

This code should be the correct one:
Spoiler :
Code:
plot = CyMap.plot(iX, iY)
bonusHorse = gc.getInfoTypeForString("BONUS_HORSE")
bonusCow = gc.getInfoTypeForString("BONUS_COW")
bonusDeer = gc.getInfoTypeForString("BONUS_DEER")
bonusPig = gc.getInfoTypeForString("BONUS_PIG")
bonusSheep = gc.getInfoTypeForString("BONUS_SHEEP")
bonusFur = gc.getInfoTypeForString("BONUS_FUR")
bonusIvory = gc.getInfoTypeForString("BONUS_IVORY")
if iBuild == gc.getInfoTypeForString("BUILD_BONUS_HORSE"):
if plot.isPlotGroupConnectedBonus(iPlayer, bonusHorse) and plot.getBonusType() != bonusHorse:
return 1
else:
return 0
elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_COW"):
if plot.isPlotGroupConnectedBonus(iPlayer, bonusCow) and plot.getBonusType() != bonusCow:
return 1
else:
return 0
elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_DEER"):
if plot.isPlotGroupConnectedBonus(iPlayer, bonusDeer) and plot.getBonusType() != bonusDeer:
return 1
else:
return 0
elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_PIG"):
if plot.isPlotGroupConnectedBonus(iPlayer, bonusPig) and plot.getBonusType() != bonusPig:
return 1
else:
return 0
elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_SHEEP"):
if plot.isPlotGroupConnectedBonus(iPlayer, bonusSheep) and plot.getBonusType() != bonusSheep:
return 1
else:
return 0
elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_FUR"):
if plot.isPlotGroupConnectedBonus(iPlayer, bonusFur) and plot.getBonusType() != bonusFur:
return 1
else:
return 0
elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_IVORY"):
if plot.isPlotGroupConnectedBonus(iPlayer, bonusIvory) and plot.getBonusType() != bonusIvory:
return 1
else:
return 0