def waterPlantDone(self):
        avId = self.air.getAvatarIdFromSender()
        av = self.air.doId2do.get(avId)
        if not av:
            return

        currSkill = av.getWateringCanSkill()
        if self.waterLevel < GardenGlobals.getMaxWateringCanPower():
            av.b_setWateringCanSkill(currSkill + 1 + self.getGrowthState())

        self.setMovie(GardenGlobals.MOVIE_CLEAR, self.air.getAvatarIdFromSender())
Exemplo n.º 2
0
    def waterPlantDone(self):
        avId = self.air.getAvatarIdFromSender()
        av = self.air.doId2do.get(avId)
        if not av:
            return

        currSkill = av.getWateringCanSkill()
        if self.waterLevel < GardenGlobals.getMaxWateringCanPower():
            av.b_setWateringCanSkill(currSkill + 1 + self.getGrowthState())

        self.setMovie(GardenGlobals.MOVIE_CLEAR,
                      self.air.getAvatarIdFromSender())
    def waterPlant(self):
        avId = self.air.getAvatarIdFromSender()
        av = self.air.doId2do.get(avId)
        if not av:
            return

        if self.waterLevel < GardenGlobals.getMaxWateringCanPower():
            self.waterLevel += GardenGlobals.getWateringCanPower(av.wateringCan, av.wateringCanSkill)
            self.d_setWaterLevel(self.waterLevel)

            self.gardenManager.updateGardenData()

        self.setMovie(GardenGlobals.MOVIE_WATER, self.air.getAvatarIdFromSender())
Exemplo n.º 4
0
    def waterPlant(self):
        avId = self.air.getAvatarIdFromSender()
        av = self.air.doId2do.get(avId)
        if not av:
            return

        if self.waterLevel < GardenGlobals.getMaxWateringCanPower():
            self.waterLevel += GardenGlobals.getWateringCanPower(
                av.wateringCan, av.wateringCanSkill)
            self.d_setWaterLevel(self.waterLevel)

            self.gardenManager.updateGardenData()

        self.setMovie(GardenGlobals.MOVIE_WATER,
                      self.air.getAvatarIdFromSender())