Ejemplo n.º 1
0
 def requestPolarBearTransformation(self):
     avId = self.air.getAvatarIdFromSender()
     av = self.air.doId2do.get(avId)
     if not av:
         return
     if av.dna.getAnimal() == 'bear' and av.dna.headColor != 0:
         newDNA = ToonDNA()
         newDNA.makeFromNetString(av.getDNAString())
         newDNA.headColor = 0
         newDNA.armColor = 0
         newDNA.legColor = 0
         taskMgr.doMethodLater(1.0, lambda task: av.b_setDNAString(newDNA.makeNetString()), 'transform-%d' % avId)
     self.sendUpdate('doPolarBearTransformation', [avId])
    def requestBlackCatTransformation(self):
        avId = self.air.getAvatarIdFromSender()
        av = self.air.doId2do.get(avId)
        if not av: return

        if av.dna.getAnimal() == 'cat' and av.dna.headColor != 0x1a:
            newDNA = ToonDNA()
            newDNA.makeFromNetString(av.getDNAString())
            newDNA.headColor = 0x1a
            newDNA.armColor = 0x1a
            newDNA.legColor = 0x1a
            taskMgr.doMethodLater(1.0, lambda task: av.b_setDNAString(newDNA.makeNetString()), 'transform-%d' % avId)

            self.sendUpdate('doBlackCatTransformation', [avId])
Ejemplo n.º 3
0
 def requestTransformation(self):
     avId = self.air.getAvatarIdFromSender()
     av = self.air.doId2do.get(avId)
     if av is None:
         return
     if not hasattr(av, 'dna'):
         return
     if (av.dna.headColor != 0x00):
         newDNA = ToonDNA()
         newDNA.makeFromNetString(av.getDNAString())
         newDNA.headColor = 0x00
         newDNA.armColor = 0x00
         newDNA.legColor = 0x00
         taskMgr.doMethodLater(1.0, lambda task: av.b_setDNAString(newDNA.makeNetString()), 'transform-%d' % avId)
         self.sendUpdate('doTransformation', [avId])
Ejemplo n.º 4
0
 def requestTransformation(self):
     avId = self.air.getAvatarIdFromSender()
     av = self.air.doId2do.get(avId)
     if av is None:
         return
     if not hasattr(av, "dna"):
         return
     if (av.dna.getAnimal() == "cat") and (av.dna.headColor != 0x1A):
         newDNA = ToonDNA()
         newDNA.makeFromNetString(av.getDNAString())
         newDNA.headColor = 0x1A
         newDNA.armColor = 0x1A
         newDNA.legColor = 0x1A
         taskMgr.doMethodLater(1.0, lambda task: av.b_setDNAString(newDNA.makeNetString()), "transform-%d" % avId)
         self.sendUpdate("doTransformation", [avId])
Ejemplo n.º 5
0
 def requestTransformation(self):
     avId = self.air.getAvatarIdFromSender()
     av = self.air.doId2do.get(avId)
     if av is None:
         return
     if not hasattr(av, 'dna'):
         return
     if (av.dna.getAnimal() == 'bear') and (av.dna.headColor != 0x00):
         newDNA = ToonDNA()
         newDNA.makeFromNetString(av.getDNAString())
         newDNA.headColor = 0x00
         newDNA.armColor = 0x00
         newDNA.legColor = 0x00
         taskMgr.doMethodLater(1.0, lambda task: av.b_setDNAString(newDNA.makeNetString()), 'transform-%d' % avId)
         self.sendUpdate('doTransformation', [avId])
    def requestBlackCatTransformation(self):
        avId = self.air.getAvatarIdFromSender()
        av = self.air.doId2do.get(avId)
        if not av:
            return

        if not simbase.air.wantHalloween and not simbase.air.holidayManager.isHolidayRunning(
                HALLOWEEN):
            return

        if av.dna.getAnimal() == 'cat' and av.dna.headColor != 0x1a:
            newDNA = ToonDNA()
            newDNA.makeFromNetString(av.getDNAString())
            newDNA.headColor = 0x1a
            newDNA.armColor = 0x1a
            newDNA.legColor = 0x1a
            taskMgr.doMethodLater(
                1.0, lambda task: av.b_setDNAString(newDNA.makeNetString()),
                'transform-%d' % avId)

            self.sendUpdate('doBlackCatTransformation', [avId])