def setPage(self, pageId): ShipSelectionPanel.setPage(self, pageId) if not self.shipFrames[pageId]: if pageId == self.OWN: if localAvatar.style.getTutorial() < PiratesGlobals.TUT_GOT_SHIP and localAvatar.getCurrentIsland() != QuestConstants.LocationIds.PORT_ROYAL_ISLAND: self.noShipHint['text'] = PLocalizer.DinghyNeedFirstShip % PLocalizer.LocationNames[QuestConstants.LocationIds.PORT_ROYAL_ISLAND] elif self._siegeTeam and localAvatar.getSiegeTeam() and localAvatar.getSiegeTeam() != self._siegeTeam: if localAvatar.getSiegeTeam() == PVPGlobals.FrenchTeam: self.noShipHint['text'] = PLocalizer.DinghyWrongSiegeShip % PLocalizer.PVPFrench else: self.noShipHint['text'] = PLocalizer.DinghyWrongSiegeShip % PLocalizer.PVPSpanish else: self.noShipHint['text'] = PLocalizer.DinghyNeedShip elif pageId == self.FRIEND: self.noShipHint['text'] = PLocalizer.DinghyNoFriendShip elif pageId == self.CREW: self.noShipHint['text'] = PLocalizer.DinghyNoCrewShip elif pageId == self.GUILD: self.noShipHint['text'] = PLocalizer.DinghyNoGuildShip elif pageId == self.PUBLIC: self.noShipHint['text'] = PLocalizer.DinghyNoPublicShip self.noShipHint.show() else: self.noShipHint.hide()
def __init__(self, title, doneCallback, siegeTeam=0): ShipSelectionPanel.__init__( self, title, doneCallback, pages=[self.OWN, self.FRIEND, self.CREW, self.GUILD, self.PUBLIC]) self.initialiseoptions(ShipDeployPanel) self._siegeTeam = siegeTeam if localAvatar.style.getTutorial( ) < PiratesGlobals.TUT_GOT_SHIP and localAvatar.getCurrentIsland( ) != QuestConstants.LocationIds.PORT_ROYAL_ISLAND: text = PLocalizer.DinghyNeedFirstShip % PLocalizer.LocationNames[ QuestConstants.LocationIds.PORT_ROYAL_ISLAND] else: text = PLocalizer.DinghyNeedShip self.noShipHint = DirectLabel(parent=self, relief=None, text=text, text_font=PiratesGlobals.getPirateFont(), text_scale=0.08, text_fg=PiratesGuiGlobals.TextFG1, text_wordwrap=10, textMayChange=1, pos=(0.55, 0, 0.8)) return
def __init__(self, title, doneCallback, siegeTeam = 0): ShipSelectionPanel.__init__(self, title, doneCallback, pages = [ self.OWN, self.FRIEND, self.CREW, self.GUILD, self.PUBLIC]) self.initialiseoptions(ShipDeployPanel) self._siegeTeam = siegeTeam if localAvatar.style.getTutorial() < PiratesGlobals.TUT_GOT_SHIP and localAvatar.getCurrentIsland() != QuestConstants.LocationIds.PORT_ROYAL_ISLAND: text = PLocalizer.DinghyNeedFirstShip % PLocalizer.LocationNames[QuestConstants.LocationIds.PORT_ROYAL_ISLAND] else: text = PLocalizer.DinghyNeedShip self.noShipHint = DirectLabel(parent = self, relief = None, text = text, text_font = PiratesGlobals.getPirateFont(), text_scale = 0.080000000000000002, text_fg = PiratesGuiGlobals.TextFG1, text_wordwrap = 10, textMayChange = 1, pos = (0.55000000000000004, 0, 0.80000000000000004))
def __init__(self, title, doneCallback, mode): ShipSelectionPanel.__init__(self, title, doneCallback) self.initialiseoptions(ShipShoppingPanel) self.mode = mode