Poodletooth-iLand/toontown/estate/DistributedGardenPlotAI.py

36 lines
1.3 KiB
Python
Raw Normal View History

2015-03-03 22:10:12 +00:00
from direct.directnotify import DirectNotifyGlobal
from toontown.estate.DistributedLawnDecorAI import DistributedLawnDecorAI
2015-05-10 11:47:03 +00:00
import DistributedToonStatuaryAI
import DistributedStatuaryAI
2015-03-03 22:10:12 +00:00
class DistributedGardenPlotAI(DistributedLawnDecorAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedGardenPlotAI")
2015-05-10 12:00:38 +00:00
def __init__(self, air):
self.air = air
self.planted = None
2015-05-10 11:47:03 +00:00
def plantFlower(self, species, variety):
2015-05-10 12:00:38 +00:00
flower = DistributedFlowerAI.DistributedFlowerAI(self.air, species, variety)
self.planted = flower
2015-03-03 22:10:12 +00:00
2015-05-10 11:47:03 +00:00
def plantGagTree(self, gagTrack, gagLevel):
2015-05-10 12:00:38 +00:00
tree = DistributedGagTreeAI.DistributedGagTreeAI(self.air, gagTrack, gagLevel)
self.planted = tree
2015-03-03 22:10:12 +00:00
2015-05-10 11:47:03 +00:00
def plantStatuary(self, species):
2015-05-10 12:00:38 +00:00
statue = DistributedStatuaryAI.DistributedStatuaryAI(self.air, species)
self.planted = statue
2015-03-03 22:10:12 +00:00
2015-05-10 11:47:03 +00:00
def plantToonStatuary(self, species, dnaCode):
2015-05-10 12:00:38 +00:00
statue = DistributedToonStatuaryAI.DistributedToonStatuaryAI(self.air, species, dnaCode)
self.planted = statue
2015-03-03 22:10:12 +00:00
2015-05-10 11:47:03 +00: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 12:10:32 +00:00
self.planted = None