Example #1
0
    def enterPurchase(self,
                      pointsAwarded,
                      playerMoney,
                      playerIds,
                      playerStates,
                      remain,
                      metagameRound=-1,
                      votesArray=None):
        """enterPurchase(self, pointsAwarded)
        """
        assert (self.notify.debug("enterPurchase()"))
        # Healing should take place during purchasing, so tell the
        # safezone manager we are in a safezone.
        messenger.send("enterSafeZone")
        # Turn off laff numbers
        DistributedAvatar.DistributedAvatar.HpTextEnabled = 0
        # Turn on laff meter
        base.localAvatar.laffMeter.start()

        # this should be a set via a query to the minigame
        self.purchaseDoneEvent = "purchaseDone"
        self.accept(self.purchaseDoneEvent, self.handlePurchaseDone)
        self.purchase = Purchase.Purchase(base.localAvatar, pointsAwarded,
                                          playerMoney, playerIds, playerStates,
                                          remain, self.purchaseDoneEvent,
                                          metagameRound, votesArray)

        self.purchase.load()
        self.purchase.enter()
Example #2
0
 def enterPurchase(
         self,
         pointsAwarded,
         playerMoney,
         playerIds,
         playerStates,
         remain,
         metagameRound=-1,
         votesArray=None):
     messenger.send('enterSafeZone')
     DistributedAvatar.DistributedAvatar.HpTextEnabled = 0
     base.localAvatar.laffMeter.start()
     self.purchaseDoneEvent = 'purchaseDone'
     self.accept(self.purchaseDoneEvent, self.handlePurchaseDone)
     self.purchase = Purchase.Purchase(
         base.localAvatar,
         pointsAwarded,
         playerMoney,
         playerIds,
         playerStates,
         remain,
         self.purchaseDoneEvent,
         metagameRound,
         votesArray)
     self.purchase.load()
     self.purchase.enter()