예제 #1
0
    def addOwnShip(self, shipId, callback):
        shipOV = base.cr.getOwnerView(shipId)
        if (not shipOV or self._siegeTeam) and localAvatar.getSiegeTeam(
        ) and localAvatar.getSiegeTeam() != self._siegeTeam:
            return None

        shipFrame = self.getFrame(shipId)
        if not shipFrame:
            mastInfo = ShipGlobals.getMastSetup(shipOV.shipClass)
            shipFrame = ShipFrameDeploy(parent=None,
                                        shipId=shipId,
                                        shipName=shipOV.name,
                                        shipClass=shipOV.shipClass,
                                        mastInfo=mastInfo,
                                        shipType=ShipFrameDeploy.STOwn,
                                        siegeTeam=self._siegeTeam,
                                        command=callback,
                                        extraArgs=[shipId])
            shipFrame.enableStatsOV(shipOV)
            if not Freebooter.getPaidStatus(base.localAvatar.getDoId(
            )) and shipOV.shipClass not in ShipGlobals.UNPAID_SHIPS:
                shipFrame.nameLabel['text'] = PLocalizer.noFreebooterCap
                shipFrame.nameLabel['text_fg'] = (1, 0.69999999999999996,
                                                  0.69999999999999996, 1)

        self.addFrameOwn(shipFrame)
예제 #2
0
 def addOwnShip(self, shipId, callback):
     shipOV = base.cr.getOwnerView(shipId)
     if (not shipOV or self._siegeTeam) and localAvatar.getSiegeTeam() and localAvatar.getSiegeTeam() != self._siegeTeam:
         return None
     
     shipFrame = self.getFrame(shipId)
     if not shipFrame:
         mastInfo = ShipGlobals.getMastSetup(shipOV.shipClass)
         shipFrame = ShipFrameDeploy(parent = None, shipId = shipId, shipName = shipOV.name, shipClass = shipOV.shipClass, mastInfo = mastInfo, shipType = ShipFrameDeploy.STOwn, siegeTeam = self._siegeTeam, command = callback, extraArgs = [
             shipId])
         shipFrame.enableStatsOV(shipOV)
         if not Freebooter.getPaidStatus(base.localAvatar.getDoId()) and shipOV.shipClass not in ShipGlobals.UNPAID_SHIPS:
             shipFrame.nameLabel['text'] = PLocalizer.noFreebooterCap
             shipFrame.nameLabel['text_fg'] = (1, 0.69999999999999996, 0.69999999999999996, 1)
         
     
     self.addFrameOwn(shipFrame)