def setSinkTimer(self, duration, timestamp):
        messenger.send("localAvatarToSea")
        if self.getTeam() != PiratesGlobals.PLAYER_TEAM:
            DistributedPlayerSimpleShip.setSinkTimer(self, duration, timestamp)
        else:
            self.sinkTime = duration
            self.sinkTimestamp = timestamp
            dt = globalClockDelta.localElapsedTime(self.sinkTimestamp)
            if self.shipStatusDisplay:
                if self.sinkTime > dt:
                    pass
                dt >= 0
                if 1:
                    if not self.captureTimer:
                        self.captureTimer = PiratesTimer.PiratesTimer(showMinutes=True, alarmTime=10)
                        self.captureTimer.setFontColor(PiratesGuiGlobals.TextFG2)
                        self.captureTimer.reparentTo(self.shipStatusDisplay)
                        self.captureTimer.setScale(0.55000000000000004)
                        self.captureTimer.setPos(0.62, 0, 0.0)
                        self.captureTimer.unstash()

                    self.captureTimer.setTime(self.sinkTime - dt)
                    self.captureTimer.countdown(self.sinkTime - dt)
                elif self.captureTimer:
                    self.captureTimer.destroy()
                    self.captureTimer = None
 def __init__(self, cr=None, shipMgr=None, shipClass=None, isFlagship=0):
     DistributedPlayerSimpleShip.__init__(self, cr)
     self.allowCrewState = False
     self.allowFriendState = False
     self.allowGuildState = False
     self.allowPublicState = True
     self.captureTimer = None
    def setSinkTimer(self, duration, timestamp):
        messenger.send('localAvatarToSea')
        if self.getTeam() != PiratesGlobals.PLAYER_TEAM:
            DistributedPlayerSimpleShip.setSinkTimer(self, duration, timestamp)
        else:
            self.sinkTime = duration
            self.sinkTimestamp = timestamp
            dt = globalClockDelta.localElapsedTime(self.sinkTimestamp)
            if self.shipStatusDisplay:
                if self.sinkTime > dt:
                    pass
                dt >= 0
                if 1:
                    if not self.captureTimer:
                        self.captureTimer = PiratesTimer.PiratesTimer(
                            showMinutes=True, alarmTime=10)
                        self.captureTimer.setFontColor(
                            PiratesGuiGlobals.TextFG2)
                        self.captureTimer.reparentTo(self.shipStatusDisplay)
                        self.captureTimer.setScale(0.55000000000000004)
                        self.captureTimer.setPos(0.62, 0, 0.0)
                        self.captureTimer.unstash()

                    self.captureTimer.setTime(self.sinkTime - dt)
                    self.captureTimer.countdown(self.sinkTime - dt)
                elif self.captureTimer:
                    self.captureTimer.destroy()
                    self.captureTimer = None
 def __init__(self, cr=None, shipMgr=None, shipClass=None, isFlagship=0):
     DistributedPlayerSimpleShip.__init__(self, cr)
     self.allowCrewState = False
     self.allowFriendState = False
     self.allowGuildState = False
     self.allowPublicState = True
     self.captureTimer = None
示例#5
0
 def __init__(self,
              cr=None,
              shipMgr=None,
              shipClass=None,
              isFlagship=0,
              isFishing=True):
     DistributedPlayerSimpleShip.__init__(self, cr)
     self.pendingCannons = None
     self.isFishing = isFishing
     self.fishingSpots = {}
     self.maxFishingSpots = 6
示例#6
0
 def generate(self):
     DistributedPlayerSimpleShip.generate(self)
 def setShipClass(self, shipClass):
     (self.hpModifier, self.cargoModifier,
      self.expModifier) = ShipGlobals.getModifiedShipStats(self.level)
     DistributedPlayerSimpleShip.setShipClass(self, shipClass)
    def delete(self):
        if self.captureTimer:
            self.captureTimer.destroy()
            self.captureTimer = None

        DistributedPlayerSimpleShip.delete(self)
 def disable(self):
     self.cleanupAggroCollisions()
     DistributedPlayerSimpleShip.disable(self)
 def generate(self):
     self.setupAggroCollisions()
     DistributedPlayerSimpleShip.generate(self)
 def delete(self):
     self.isFishing = None
     self.fishingSpots = None
     self.maxFishingSpots = None
     DistributedPlayerSimpleShip.delete(self)
示例#12
0
 def announceGenerate(self):
     DistributedPlayerSimpleShip.announceGenerate(self)
 def setShipClass(self, shipClass):
     (self.hpModifier, self.cargoModifier, self.expModifier) = ShipGlobals.getModifiedShipStats(self.level)
     DistributedPlayerSimpleShip.setShipClass(self, shipClass)
    def delete(self):
        if self.captureTimer:
            self.captureTimer.destroy()
            self.captureTimer = None

        DistributedPlayerSimpleShip.delete(self)
 def disable(self):
     self.cleanupAggroCollisions()
     DistributedPlayerSimpleShip.disable(self)
 def announceGenerate(self):
     DistributedPlayerSimpleShip.announceGenerate(self)
 def generate(self):
     self.setupAggroCollisions()
     DistributedPlayerSimpleShip.generate(self)
 def __init__(self, cr = None, shipMgr = None, shipClass = None, isFlagship = 0, isFishing = True):
     DistributedPlayerSimpleShip.__init__(self, cr)
     self.pendingCannons = None
     self.isFishing = isFishing
     self.fishingSpots = { }
     self.maxFishingSpots = 6
示例#19
0
 def delete(self):
     self.isFishing = None
     self.fishingSpots = None
     self.maxFishingSpots = None
     DistributedPlayerSimpleShip.delete(self)
 def generate(self):
     DistributedPlayerSimpleShip.generate(self)