2015-03-03 16:10:12 -06:00
|
|
|
from direct.directnotify import DirectNotifyGlobal
|
|
|
|
from toontown.estate.DistributedLawnDecorAI import DistributedLawnDecorAI
|
2015-05-10 06:47:03 -05:00
|
|
|
import DistributedToonStatuaryAI
|
|
|
|
import DistributedStatuaryAI
|
2015-03-03 16:10:12 -06:00
|
|
|
|
|
|
|
class DistributedGardenPlotAI(DistributedLawnDecorAI):
|
|
|
|
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedGardenPlotAI")
|
|
|
|
|
2015-05-10 07:00:38 -05:00
|
|
|
def __init__(self, air):
|
|
|
|
self.air = air
|
|
|
|
self.planted = None
|
|
|
|
|
2015-05-10 06:47:03 -05:00
|
|
|
def plantFlower(self, species, variety):
|
2015-05-10 07:00:38 -05:00
|
|
|
flower = DistributedFlowerAI.DistributedFlowerAI(self.air, species, variety)
|
|
|
|
self.planted = flower
|
2015-03-03 16:10:12 -06:00
|
|
|
|
2015-05-10 06:47:03 -05:00
|
|
|
def plantGagTree(self, gagTrack, gagLevel):
|
2015-05-10 07:00:38 -05:00
|
|
|
tree = DistributedGagTreeAI.DistributedGagTreeAI(self.air, gagTrack, gagLevel)
|
|
|
|
self.planted = tree
|
2015-03-03 16:10:12 -06:00
|
|
|
|
2015-05-10 06:47:03 -05:00
|
|
|
def plantStatuary(self, species):
|
2015-05-10 07:00:38 -05:00
|
|
|
statue = DistributedStatuaryAI.DistributedStatuaryAI(self.air, species)
|
|
|
|
self.planted = statue
|
2015-03-03 16:10:12 -06:00
|
|
|
|
2015-05-10 06:47:03 -05:00
|
|
|
def plantToonStatuary(self, species, dnaCode):
|
2015-05-10 07:00:38 -05:00
|
|
|
statue = DistributedToonStatuaryAI.DistributedToonStatuaryAI(self.air, species, dnaCode)
|
|
|
|
self.planted = statue
|
2015-03-03 16:10:12 -06:00
|
|
|
|
2015-05-10 06:47:03 -05:00
|
|
|
def plantNothing(self, burntBeans):
|
|
|
|
avId = self.air.getAvatarIdFromSender()
|
|
|
|
av = self.air.doId2do[avId]
|
|
|
|
money = av.getMoney()
|
|
|
|
av.setMoney(money - burntBeans)
|
|
|
|
av.d_setMoney(money - burntBeans)
|
2015-05-10 07:10:32 -05:00
|
|
|
self.planted = None
|