Toons can't destroy other toon's money.

This commit is contained in:
Loudrob 2015-06-11 15:23:44 -04:00
parent 5101a94e5a
commit 210a8f012e

View file

@ -182,6 +182,11 @@ class DistributedGardenPlotAI(DistributedLawnDecorAI):
def plantNothing(self, burntBeans, toon):
# TODO: Fix exploit.
av = simbase.air.doId2do.get(toon)
av.takeMoney(burntBeans)
self.planted = None
estate = simbase.air.doId2do.get(self.getEstate())
sendAvId = self.air.getAvatarIdFromSender()
if sendAvId != toon or burntBeans > 8 or sendAvId not in estate.toons:
self.air.writeServerEvent('suspicious', sendAvId, 'DistributedGardenPlotAI.plantNothing attempted exploit')
else:
av = simbase.air.doId2do.get(toon)
av.takeMoney(burntBeans)
self.planted = None