def enterFireCannon(self): DistributedShipCannon.enterFireCannon(self) self.power = 0.8 messenger.send('usedCannon') base.localAvatar.guiMgr.setIgnoreEscapeHotKey(True) self.cgui.exitCannon.hide() self.ignore(InteractiveBase.END_INTERACT_EVENT) if self.cannonMoved == 0: self.moveCannonPanel = NewTutorialPanel(['moveCannon']) self.moveCannonPanel.hide() taskMgr.add(self.watchForCannonMovementTask, self.uniqueName('cannonMoveWatchTask')) taskMgr.doMethodLater(2.0, self.moveCannonPanel.activate, self.uniqueName('moveCannonPanelPause'), extraArgs=[]) self.fireCannonPanel = NewTutorialPanel( ['fireCannon', '\n', 'shipCombatInstruction', 1]) self.fireCannonPanel.hide()
def showExitCannonPanel(self): if self.cannonExitShown == 0: if self.fireCannonPanel and not self.fireCannonPanel.isEmpty(): self.fireCannonPanel.hide() self.cannonExitShown = 1 self.exitCannonPanel = NewTutorialPanel(['exitCannon'], False) self.exitCannonPanel.activate() base.localAvatar.guiMgr.setIgnoreEscapeHotKey(False) self.cgui.exitCannon.show() self.accept(InteractiveBase.END_INTERACT_EVENT, self.handleEndInteractKey)
def handleEnterGameArea(self, collEntry=None): inventory = localAvatar.getInventory() if (localAvatar.style.getTutorial() == PiratesGlobals.TUT_GOT_SEACHEST and self.uniqueId == LocationIds.RAMBLESHACK_ISLAND and len(inventory.getWeapons()) < 1 and base).localAvatar.showQuest: base.localAvatar.resetQuestShow() popupDialogText = [ 'showBlacksmith', 'closeShowBlacksmith'] self.popupDialog = NewTutorialPanel(popupDialogText) def closeTutorialWindow(): messenger.send(self.popupDialog.closeMessage) self.popupDialog.setYesCommand(closeTutorialWindow) self.acceptOnce('closeTutorialWindow', closeTutorialWindow) self.popupDialog.activate() taskMgr.doMethodLater(1, self.showEnterMessage, 'showEnterMessage') UserFunnel.logSubmit(0, 'ENTERING_' + str(self.funnelDisplayName)) UserFunnel.logSubmit(1, 'ENTERING_' + str(self.funnelDisplayName)) self.storeLocationTime(self.funnelDisplayName, time.time()) displayName = PLocalizer.LocationNames.get(self.uniqueId) base.setLocationCode(displayName) self.builder.initEffects()