def _makeFrame(self, shipId, shipName, shipClass, mastInfo, shipHp, shipSp, cargo, crew, time, siegeTeam, avatarName, callback): shipFrame = self.getFrame(shipId) if shipFrame: shipFrame.addCrewMemberName(avatarName) else: shipFrame = ShipFrameDeploy(parent = None, relief = None, shipId = shipId, shipName = shipName, shipClass = shipClass, mastInfo = mastInfo, shipType = ShipFrameDeploy.STFriend, siegeTeam = siegeTeam, avatarName = avatarName, command = callback, extraArgs = [ shipId]) shipFrame.enableStats(shipName, shipClass, mastInfo, shipHp, shipSp, cargo, crew, time) return shipFrame
def _makeFrame(self, shipId, shipName, shipClass, mastInfo, shipHp, shipSp, cargo, crew, time, siegeTeam, avatarName, customHull, customRigging, customPattern, customLogo, callback): shipFrame = self.getFrame(shipId) if shipFrame: shipFrame.addCrewMemberName(avatarName) else: shipFrame = ShipFrameDeploy(parent = None, relief = None, shipId = shipId, shipName = shipName, shipClass = shipClass, mastInfo = mastInfo, shipType = ShipFrameDeploy.STFriend, siegeTeam = siegeTeam, avatarName = avatarName, command = callback, extraArgs = [ shipId]) shipFrame.enableStats(shipName, shipClass, mastInfo, shipHp, shipSp, cargo, crew, time) shipFrame.setCustomization(customHull = customHull, customRigging = customRigging, customPattern = customPattern, customLogo = customLogo) return shipFrame
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)
def _makeFrame(self, shipId, shipName, shipClass, mastInfo, shipHp, shipSp, cargo, crew, time, siegeTeam, avatarName, customHull, customRigging, customPattern, customLogo, callback): shipFrame = self.getFrame(shipId) if shipFrame: shipFrame.addCrewMemberName(avatarName) else: shipFrame = ShipFrameDeploy(parent=None, relief=None, shipId=shipId, shipName=shipName, shipClass=shipClass, mastInfo=mastInfo, shipType=ShipFrameDeploy.STFriend, siegeTeam=siegeTeam, avatarName=avatarName, command=callback, extraArgs=[shipId]) shipFrame.enableStats(shipName, shipClass, mastInfo, shipHp, shipSp, cargo, crew, time) shipFrame.setCustomization(customHull=customHull, customRigging=customRigging, customPattern=customPattern, customLogo=customLogo) return shipFrame
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)