diff --git a/astron/dclass/united.dc b/astron/dclass/united.dc index 3b7c35ce..5fb420fa 100644 --- a/astron/dclass/united.dc +++ b/astron/dclass/united.dc @@ -839,7 +839,6 @@ dclass DistributedToon : DistributedPlayer { setPartyCanStart(uint64) ownrecv airecv; setPartyStatus(uint64, uint8) ownrecv airecv; announcePartyStarted(uint64) ownrecv; - setAchievements(uint16[] = []) required broadcast ownrecv db; setNeverStartedPartyRefunded(uint64, int8, uint16) ownrecv; setDISLname(string) ram; setDISLid(uint32) ram db airecv; diff --git a/otp/distributed/DCClassImports.py b/otp/distributed/DCClassImports.py index 31a9a2a7..fa53a43c 100644 --- a/otp/distributed/DCClassImports.py +++ b/otp/distributed/DCClassImports.py @@ -2,7 +2,7 @@ from pandac.PandaModules import * -hashVal = 3917046557L +hashVal = 1355680248 from toontown.coghq import DistributedCashbotBossSafe, DistributedCashbotBossCrane, DistributedBattleFactory, DistributedCashbotBossTreasure, DistributedCogHQDoor, DistributedSellbotHQDoor, DistributedFactoryElevatorExt, DistributedMintElevatorExt, DistributedLawOfficeElevatorExt, DistributedLawOfficeElevatorInt, LobbyManager, DistributedMegaCorp, DistributedFactory, DistributedLawOffice, DistributedLawOfficeFloor, DistributedLift, DistributedDoorEntity, DistributedSwitch, DistributedButton, DistributedTrigger, DistributedCrushableEntity, DistributedCrusherEntity, DistributedStomper, DistributedStomperPair, DistributedLaserField, DistributedGolfGreenGame, DistributedSecurityCamera, DistributedMover, DistributedElevatorMarker, DistributedBarrelBase, DistributedGagBarrel, DistributedBeanBarrel, DistributedHealBarrel, DistributedGrid, ActiveCell, DirectionalCell, CrusherCell, DistributedCrate, DistributedSinkingPlatform, BattleBlocker, DistributedMint, DistributedMintRoom, DistributedMintBattle, DistributedStage, DistributedStageRoom, DistributedStageBattle, DistributedLawbotBossGavel, DistributedLawbotCannon, DistributedLawbotChair, DistributedCogKart, DistributedCountryClub, DistributedCountryClubRoom, DistributedMoleField, DistributedCountryClubBattle, DistributedMaze, DistributedFoodBelt, DistributedBanquetTable, DistributedGolfSpot diff --git a/toontown/achievements/AchievementGui.py b/toontown/achievements/AchievementGui.py deleted file mode 100644 index db34fbf7..00000000 --- a/toontown/achievements/AchievementGui.py +++ /dev/null @@ -1,76 +0,0 @@ -from toontown.achievements import AchievementsGlobals -from direct.interval.IntervalGlobal import * -from direct.interval.LerpInterval import * -from toontown.toonbase import ToontownGlobals -from direct.gui.DirectGui import * -from pandac.PandaModules import * - -class AchievementGui: - - def __init__(self): - self.queue = [] - self.currentShowingAward = 0 - - def earnAchievement(self, achievementId): - if self.queue == []: - applause = loader.loadSfx('phase_6/audio/sfx/KART_Applause_2.ogg') - applause.play() - - self.queue.append(achievementId) - self.showAchievement() - else: - self.queue.append(achievementId) - - def showAchievement(self): - if self.queue != []: - if self.currentShowingAward == 0: - self.currentShowingAward = self.queue[0] - self.displayAchievement() - self.frameSequence() - - def displayAchievement(self): - currentAchievement = AchievementsGlobals.AchievementImages[self.currentShowingAward] - image = loader.loadModel(currentAchievement[0]) - imageNode = image.find(currentAchievement[1]) - imageNode.setColor(currentAchievement[2]) - imageNode.setScale(currentAchievement[3]) - - self.frame = OnscreenGeom(geom='phase_3/models/gui/dialog_box_gui', scale=(0.8, 1, 0.55), parent=base.a2dTopRight, - pos=(0.45, 0, -0.275)) - - self.image = OnscreenGeom(geom=imageNode, parent=self.frame) - - self.title = OnscreenText(text='You earned an Achievement!', scale=(0.06, 0.11), font=ToontownGlobals.getMinnieFont(), - parent=self.frame, pos=(0, 0.33), align=TextNode.ACenter) - - self.achievementName = OnscreenText(text=AchievementsGlobals.AchievementTitles[self.currentShowingAward], scale=(0.06, 0.09), - font=ToontownGlobals.getMinnieFont(), parent=self.frame, align=TextNode.ACenter, pos=(0, 0.2)) - - self.details = OnscreenText(text=AchievementsGlobals.AchievementDesc[self.currentShowingAward], scale=(0.04, 0.07), - font=ToontownGlobals.getMinnieFont(), parent=self.frame, align=TextNode.ACenter, pos=(0, -0.4)) - - def frameSequence(self): - self.seq = Sequence() - self.seq.append(LerpPosInterval(self.frame, 1, (-0.45, 0, -0.275))) - self.seq.append(Wait(2)) - self.seq.append(LerpPosInterval(self.frame, 1, (0.45, 0, -0.275))) - self.seq.append(Func(self.cleanupCurrentFrame)) - - self.seq.start() - - def cleanupCurrentFrame(self): - self.frame.destroy() - del self.frame - - self.title.destroy() - del self.title - - self.achievementName.destroy() - del self.achievementName - - self.details.destroy() - del self.details - - del self.queue[0] - self.currentShowingAward = 0 - self.showAchievement() diff --git a/toontown/achievements/Achievements.py b/toontown/achievements/Achievements.py deleted file mode 100644 index 63ccb0a9..00000000 --- a/toontown/achievements/Achievements.py +++ /dev/null @@ -1,168 +0,0 @@ -from toontown.toonbase import ToontownGlobals - -ANY_LAFF = 138 -ANY_LEVEL = 13 -ANY_TYPE = 1 -COG = 0 -V2COG = 1 -SKELECOG = 2 - -class FriendAchievement: - - def __init__(self, neededFriends=1): - self.neededFriends = neededFriends - - def hasComplete(self, av): - avatarsFriends = av.getFriendsList() - - if len(avatarsFriends) >= self.neededFriends: - return 1 - - return 0 - -class TrolleyAchievement: - - def hasComplete(self, av): - return 1 - -class SuitsAchievement: - - def __init__(self, neededSuits=1, neededType=ANY_TYPE, revive=0, skele=0): - self.neededSuits = neededSuits - self.neededType = neededType - self.needRevive = revive - self.needSkele = skele - - def hasComplete(self, av): - avatarsRadar = av.getCogCount() - - #ToontownGlobals.cog - - return 0 - -class EstateAchievement: - - def hasComplete(self, av): - return 1 - -class VPAchievement: - - def __init__(self, neededLaff=ANY_LAFF, solo=False): - self.neededLaff = neededLaff - self.solo = solo - - def hasComplete(self, laff, solo): - complete = 1 - - if self.neededLaff != ANY_LAFF: - if laff: - complete = 1 - else: - complete = 0 - - if self.solo: - if solo: - complete = 1 - else: - complete = 0 - - return complete - -class CFOAchievement: - - def __init__(self, neededLaff=ANY_LAFF, solo=False): - self.neededLaff = neededLaff - self.solo = solo - - def hasComplete(self, laff, solo): - complete = 1 - - if self.neededLaff != ANY_LAFF: - if laff: - complete = 1 - else: - complete = 0 - - if self.solo: - if solo: - complete = 1 - else: - complete = 0 - - return complete - -class CJAchievement: - - def __init__(self, neededLaff=ANY_LAFF, solo=False): - self.neededLaff = neededLaff - self.solo = solo - - def hasComplete(self, laff, solo): - complete = 1 - - if self.neededLaff != ANY_LAFF: - if laff: - complete = 1 - else: - complete = 0 - - if self.solo: - if solo: - complete = 1 - else: - complete = 0 - - return complete - -class CEOAchievement: - - def __init__(self, neededLaff=ANY_LAFF, solo=False): - self.neededLaff = neededLaff - self.solo = solo - - def hasComplete(self, laff, solo): - complete = 1 - - if self.neededLaff != ANY_LAFF: - if laff: - complete = 1 - else: - complete = 0 - - if self.solo: - if solo: - complete = 1 - else: - complete = 0 - - return complete - -AchievementsDict = (FriendAchievement(), - FriendAchievement(neededFriends=10), - FriendAchievement(neededFriends=50), - TrolleyAchievement(), - EstateAchievement(), - VPAchievement(), - VPAchievement(neededLaff=1), - VPAchievement(solo=True), - VPAchievement(neededLaff=1, solo=True), - CFOAchievement(), - CFOAchievement(neededLaff=1), - CFOAchievement(solo=True), - CFOAchievement(neededLaff=1, solo=True), - CJAchievement(), - CJAchievement(neededLaff=1), - CJAchievement(solo=True), - CJAchievement(neededLaff=1, solo=True), - CEOAchievement(), - CEOAchievement(neededLaff=1), - CEOAchievement(solo=True), - CEOAchievement(neededLaff=1, solo=True)) - -type2AchievementIds = {FriendAchievement: [0, 1, 2], - TrolleyAchievement: [3], - EstateAchievement: [4], - VPAchievement: [5, 6, 7, 8]} - -def getAchievementsOfType(type): - return type2AchievementIds.get(type) diff --git a/toontown/achievements/AchievementsGlobals.py b/toontown/achievements/AchievementsGlobals.py deleted file mode 100644 index 3b62a794..00000000 --- a/toontown/achievements/AchievementsGlobals.py +++ /dev/null @@ -1,25 +0,0 @@ -AchievementTitles = ('It\'s fun with friends', - 'Mr Popular', - 'Famous Toon', - 'Trolley Time!', - 'VP', - 'VP', - 'VP', - 'VP') -AchievementDesc = ('You made a Friend!', - 'You made 10 Friends!', - 'You made 50 Friends!', - 'You rode the Trolley!', - 'You defeated the VP!', - 'You defeated the VP with 1 laff!', - 'You soloed the VP!', - 'You soloed the VP with 1 laff!') -#(model, node, color, scale) -AchievementImages = (('phase_3.5/models/gui/friendslist_gui', '**/FriendsBox_Rollover', (1, 1, 1, 1), 1), - ('phase_3.5/models/gui/friendslist_gui', '**/FriendsBox_Rollover', (1, 1, 1, 1), 1), - ('phase_3.5/models/gui/friendslist_gui', '**/FriendsBox_Rollover', (1, 1, 1, 1), 1), - ('phase_3.5/models/gui/stickerbook_gui', '**/trolley', (1, 1, 1, 1), 0.3), - ('phase_3.5/models/gui/stickerbook_gui', '**/BossHead3Icon', (1, 1, 1, 1), 0.3), - ('phase_3.5/models/gui/stickerbook_gui', '**/BossHead3Icon', (1, 1, 1, 1), 0.3), - ('phase_3.5/models/gui/stickerbook_gui', '**/BossHead3Icon', (1, 1, 1, 1), 0.3), - ('phase_3.5/models/gui/stickerbook_gui', '**/BossHead3Icon', (1, 1, 1, 1), 0.3)) diff --git a/toontown/achievements/__init__.py b/toontown/achievements/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/toontown/ai/AchievementsManagerAI.py b/toontown/ai/AchievementsManagerAI.py deleted file mode 100644 index bf015a6f..00000000 --- a/toontown/ai/AchievementsManagerAI.py +++ /dev/null @@ -1,68 +0,0 @@ -from toontown.achievements import Achievements - -class AchievementsManagerAI: - def __init__(self, air): - self.air = air - - self.vpLaffPlayers = [] - self.vpSoloPlayers = [] - - def toonMadeFriend(self, avId): - av = self.air.doId2do.get(avId) - if not av: - return - - possibleAchievements = Achievements.getAchievementsOfType(Achievements.FriendAchievement) - - for achievementId in possibleAchievements: - if not achievementId in av.getAchievements(): - if Achievements.AchievementsDict[achievementId].hasComplete(av): - av.addAchievement(achievementId) - - def toonPlayedMinigame(self, av): - possibleAchievements = Achievements.getAchievementsOfType(Achievements.TrolleyAchievement) - - for achievementId in possibleAchievements: - if not achievementId in av.getAchievements(): - if Achievements.AchievementsDict[achievementId].hasComplete(av): - av.addAchievement(achievementId) - - def toonsStartedVP(self, toons): - - for avId in toons: - av = self.air.doId2do.get(int(avId)) - if not av: - continue - - if av.getHp() == 1: - self.vpLaffPlayers.append(int(avId)) - - if len(toons) == 1: - self.vpSoloPlayers.append(int(toons[0])) - - def toonsFinishedVP(self, toons): - possibleAchievements = Achievements.getAchievementsOfType(Achievements.VPAchievement) - - for avId in toons: - av = self.air.doId2do.get(int(avId)) - if not av: - continue - - for achievementId in possibleAchievements: - if not achievementId in av.getAchievements(): - solo = avId in self.vpSoloPlayers - laff = avId in self.vpLaffPlayers - - if Achievements.AchievementsDict[achievementId].hasComplete(laff, solo): - av.addAchievement(achievementId) - - while avId in self.vpSoloPlayers: - self.vpSoloPlayers.remove(avId) - - while avId in self.vpLaffPlayers: - self.vpLaffPlayers.remove(avId) - - def toonGotQuest(self, avId): - av = self.air.doId2do.get(avId) - if not av: - return diff --git a/toontown/ai/ToontownAIRepository.py b/toontown/ai/ToontownAIRepository.py index 8a7f3ee2..a61778c2 100644 --- a/toontown/ai/ToontownAIRepository.py +++ b/toontown/ai/ToontownAIRepository.py @@ -10,7 +10,6 @@ from otp.friends.FriendManagerAI import FriendManagerAI from toontown.ai import CogPageManagerAI from toontown.ai import CogSuitManagerAI from toontown.ai import PromotionManagerAI -from toontown.ai.AchievementsManagerAI import AchievementsManagerAI from toontown.ai.FishManagerAI import FishManagerAI from toontown.ai.HolidayManagerAI import HolidayManagerAI from toontown.ai.NewsManagerAI import NewsManagerAI @@ -89,7 +88,6 @@ class ToontownAIRepository(ToontownInternalRepository): self.wantCogdominiums = self.config.GetBool('want-cogdominiums', True) self.doLiveUpdates = self.config.GetBool('want-live-updates', False) self.wantTrackClsends = self.config.GetBool('want-track-clsends', False) - self.wantAchievements = self.config.GetBool('want-achievements', True) self.wantGloveNpc = self.config.GetBool('want-glove-npc', True) self.baseXpMultiplier = self.config.GetFloat('base-xp-multiplier', 1.0) self.wantHalloween = self.config.GetBool('want-halloween', False) @@ -112,7 +110,6 @@ class ToontownAIRepository(ToontownInternalRepository): self.friendManager.generateWithRequired(2) self.questManager = QuestManagerAI(self) self.banManager = BanManagerAI.BanManagerAI(self) - self.achievementsManager = AchievementsManagerAI(self) self.suitInvasionManager = SuitInvasionManagerAI(self) self.blackCatMgr = DistributedBlackCatMgrAI(self) self.blackCatMgr.generateWithRequired(2) diff --git a/toontown/minigame/DistributedMinigameAI.py b/toontown/minigame/DistributedMinigameAI.py index d1601da8..e9f78c11 100644 --- a/toontown/minigame/DistributedMinigameAI.py +++ b/toontown/minigame/DistributedMinigameAI.py @@ -172,13 +172,6 @@ class DistributedMinigameAI(DistributedObjectAI.DistributedObjectAI): self.setGameAbort() def gameOver(self): - self.notify.debug('BASE: gameOver') - - if simbase.air.wantAchievements: - for avId in self.avIdList: - av = self.air.doId2do.get(avId) - self.air.achievementsManager.toonPlayedMinigame(av) - self.frameworkFSM.request('frameworkWaitClientsExit') def enterFrameworkOff(self): diff --git a/toontown/shtiker/AchievementsPage.py b/toontown/shtiker/AchievementsPage.py deleted file mode 100644 index aed83f78..00000000 --- a/toontown/shtiker/AchievementsPage.py +++ /dev/null @@ -1,84 +0,0 @@ -import ShtikerPage -from direct.gui.DirectGui import * -from pandac.PandaModules import * -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals - -from toontown.achievements import AchievementsGlobals - -class AchievementsPage(ShtikerPage.ShtikerPage): - - def __init__(self): - ShtikerPage.ShtikerPage.__init__(self) - self.avatar = None - self.achievements = [] - - self.gui = loader.loadModel('phase_3.5/models/gui/friendslist_gui') - self.accept(localAvatar.uniqueName('achievementsChange'), self.updatePage) - - def load(self): - ShtikerPage.ShtikerPage.load(self) - self.avAchievements = localAvatar.achievements - self.title = DirectLabel(parent=self, relief=None, text=TTLocalizer.AchievementsPageTitle, text_scale=0.12, textMayChange=1, pos=(0, 0, 0.62)) - - start_pos = LVecBase3(0.72, 1, -0.21) - seperation = LVecBase3(0.45, 0, 0.4) - - cardModel = loader.loadModel('phase_3.5/models/gui/playingCard') - - incButton = (self.gui.find('**/FndsLst_ScrollUp'), - self.gui.find('**/FndsLst_ScrollDN'), - self.gui.find('**/FndsLst_ScrollUp_Rllvr'), - self.gui.find('**/FndsLst_ScrollUp')) - - self.scrollFrame = DirectScrolledFrame(parent=self, frameSize=(0, 1.5, -1.2, 0), pos=(-0.75, 1, 0.52), - canvasSize=(0, 1, -7, 0), frameColor=(0.85, 0.95, 1, 1)) - for achievement in xrange(len(AchievementsGlobals.AchievementTitles)): - achievementFrame = DirectFrame(parent=self.scrollFrame.getCanvas(), image=DGG.getDefaultDialogGeom(), scale=(1.3, 0, 0.32), - relief=None, pos=(start_pos.x, 1, start_pos.z - seperation.z * achievement), - text=AchievementsGlobals.AchievementTitles[achievement], text_scale=(0.05, 0.13), - text_font=ToontownGlobals.getMinnieFont(), text_pos=(0, 0, 0)) - - self.achievements.append(achievementFrame) - - if achievement in self.avAchievements: - achievementFrame['text'] = AchievementsGlobals.AchievementTitles[achievement] - achievementFrame['text_pos'] = (0, 0.2, -0.2) - else: - achievementFrame['text'] = '???' - - def setAvatar(self, av): - self.avatar = av - - def updatePage(self): - self.avAchievements = localAvatar.achievements - - for achievement in self.achievements: - achievement.destroy() - - del self.achievements - self.achievements = [] - - start_pos = LVecBase3(0.72, 1, -0.21) - seperation = LVecBase3(0.45, 0, 0.4) - - for achievement in xrange(len(AchievementsGlobals.AchievementTitles)): - achievementFrame = DirectFrame(parent=self.scrollFrame.getCanvas(), image=DGG.getDefaultDialogGeom(), scale=(1.3, 0, 0.32), - relief=None, pos=(start_pos.x, 1, start_pos.z - seperation.z * achievement), - text=AchievementsGlobals.AchievementTitles[achievement], text_scale=(0.05, 0.13), - text_font=ToontownGlobals.getMinnieFont(), text_pos=(0, 0, 0)) - - self.achievements.append(achievementFrame) - - if achievement in self.avAchievements: - achievementFrame['text'] = AchievementsGlobals.AchievementTitles[achievement] - achievementFrame['text_pos'] = (0, 0.2, -0.2) - - currentAchievement = AchievementsGlobals.AchievementImages[achievement] - image = loader.loadModel(currentAchievement[0]) - imageNode = image.find(currentAchievement[1]) - imageNode.setColor(currentAchievement[2]) - - img = OnscreenGeom(geom=imageNode, parent=achievementFrame, pos=(-0.3, 0, 0)) - else: - achievementFrame['text'] = '???' \ No newline at end of file diff --git a/toontown/shtiker/ShtikerBook.py b/toontown/shtiker/ShtikerBook.py index 02e2d4ac..1b60e6f5 100644 --- a/toontown/shtiker/ShtikerBook.py +++ b/toontown/shtiker/ShtikerBook.py @@ -45,8 +45,7 @@ class ShtikerBook(DirectFrame, StateData.StateData): TTLocalizer.GardenPageTitle, TTLocalizer.GolfPageTitle, TTLocalizer.PhotoPageTitle, - TTLocalizer.EventsPageName, - TTLocalizer.AchievementsPageTitle] + TTLocalizer.EventsPageName] return def setSafeMode(self, setting): diff --git a/toontown/suit/DistributedSellbotBossAI.py b/toontown/suit/DistributedSellbotBossAI.py index 92c8c4d4..dc8aad7d 100644 --- a/toontown/suit/DistributedSellbotBossAI.py +++ b/toontown/suit/DistributedSellbotBossAI.py @@ -219,7 +219,6 @@ class DistributedSellbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS DistributedBossCogAI.DistributedBossCogAI.enterIntroduction(self) self.__makeDoobers() self.b_setBossDamage(0, 0, 0) - self.air.achievementsManager.toonsStartedVP(self.involvedToons) def exitIntroduction(self): DistributedBossCogAI.DistributedBossCogAI.exitIntroduction(self) @@ -399,10 +398,6 @@ class DistributedSellbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS return self.b_setAttackCode(ToontownGlobals.BossCogRecoverDizzyAttack) - def enterReward(self): - self.air.achievementsManager.toonsFinishedVP(self.involvedToons) - DistributedBossCogAI.DistributedBossCogAI.enterReward(self) - @magicWord(category=CATEGORY_ADMINISTRATOR) def skipVP(): """ diff --git a/toontown/toon/DistributedToon.py b/toontown/toon/DistributedToon.py index 059cea24..3db0f17a 100644 --- a/toontown/toon/DistributedToon.py +++ b/toontown/toon/DistributedToon.py @@ -59,6 +59,7 @@ from toontown.speedchat import TTSCDecoders from toontown.suit import SuitDNA from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownGlobals +from toontown.battle import BattleParticles if base.wantKarts: @@ -181,8 +182,6 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute self.gmNameTagEnabled = 0 self.gmNameTagColor = 'whiteGM' self.gmNameTagString = '' - self.achievements = [] - self.canEarnAchievements = False self.promotionStatus = [0, 0, 0, 0] self.buffs = [] self.redeemedCodes = [] @@ -2581,10 +2580,6 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute def setAnimalSound(self, index): self.animalSound = index - def setAchievements(self, achievements): - self.achievements = achievements - messenger.send(localAvatar.uniqueName('achievementsChange')) - def setBuffs(self, buffs): self.buffs = buffs self.applyBuffs() @@ -2680,4 +2675,18 @@ def blackCat(): """ Ask the black cat manager to turn you into a cat. """ - base.cr.blackCatMgr.requestBlackCatTransformation() \ No newline at end of file + base.cr.blackCatMgr.requestBlackCatTransformation() + +@magicWord(category=CATEGORY_COMMUNITY_MANAGER, types=[str]) +def showParticle(name): + """ + Shows a particle. + """ + + particle = BattleParticles.createParticleEffect(name) + + if particle: + particle.start(spellbook.getTarget()) + return 'Successfully started particle!' + + return 'Particle %s does not exist.' % name \ No newline at end of file diff --git a/toontown/toon/DistributedToonAI.py b/toontown/toon/DistributedToonAI.py index 263f9733..4db2f393 100644 --- a/toontown/toon/DistributedToonAI.py +++ b/toontown/toon/DistributedToonAI.py @@ -19,7 +19,6 @@ from otp.avatar import DistributedAvatarAI from otp.avatar import DistributedPlayerAI from otp.otpbase import OTPGlobals from otp.otpbase import OTPLocalizer -from toontown.achievements import Achievements from toontown.battle import SuitBattleGlobals from toontown.catalog import CatalogAccessoryItem from toontown.catalog import CatalogItem @@ -93,7 +92,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo self.experience = None self.petId = None self.quests = [] - self.achievements = [] self.cogs = [] self.cogCounts = [] self.NPCFriendsDict = {} @@ -569,9 +567,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo self.friendsList.append((friendId, friendCode)) self.air.questManager.toonMadeFriend(self) - if self.air.wantAchievements: - self.air.achievementsManager.toonMadeFriend(self.doId) - def d_setMaxNPCFriends(self, max): self.sendUpdate('setMaxNPCFriends', [max]) @@ -4182,43 +4177,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo def getAnimalSound(self): return self.animalSound - def setAchievements(self, achievements): - for i in xrange(len(achievements)): - if not achievements[i] in xrange(len(Achievements.AchievementsDict)): - print 'Unknown AchievementId %s'%(achievements[i]) - del achievements[i] - - self.achievements = achievements - - def d_setAchievements(self, achievements): - for i in xrange(len(achievements)): - if not achievements[i] in xrange(len(Achievements.AchievementsDict)): - print 'Unknown AchievementId %s'%(achievements[i]) - del achievements[i] - - self.sendUpdate('setAchievements', args=[achievements]) - - def b_setAchievements(self, achievements): - self.setAchievements(achievements) - self.d_setAchievements(achievements) - - def getAchievements(self): - return self.achievements - - def addAchievement(self, achievementId): - if achievementId in xrange(len(Achievements.AchievementsDict)): - if not achievementId in self.achievements: - achievements = self.achievements - achievements.append(achievementId) - - self.b_setAchievements(achievements) - - def hasAchievement(self, achievementId): - if achievementId in self.achievements: - return 1 - - return 0 - def addBuff(self, id, duration): buffCount = len(self.buffs) if buffCount <= id: @@ -5074,24 +5032,6 @@ def suit(command, suitName): else: return 'Invalid command.' -@magicWord(category=CATEGORY_PROGRAMMER, types=[str, int]) -def achievements(command, achId): - invoker = spellbook.getInvoker() - if command.lower() == 'earn': - achievements = invoker.getAchievements() - achievements.append(achId) - - invoker.b_setAchievements(achievements) - return 'Earnt Achievement %s'%(achId) - elif command.lower() == 'remove': - achievements = invoker.getAchievements() - achievements.remove(achId) - - invoker.b_setAchievements(achievements) - return 'Removed Achievement %s'%(achId) - else: - return "Unknown Command '%s'"%(command) - @magicWord(category=CATEGORY_PROGRAMMER) def getZone(): invoker = spellbook.getInvoker() diff --git a/toontown/toon/DistributedToonUD.py b/toontown/toon/DistributedToonUD.py index 8e723de4..07eb751d 100644 --- a/toontown/toon/DistributedToonUD.py +++ b/toontown/toon/DistributedToonUD.py @@ -544,9 +544,6 @@ class DistributedToonUD(DistributedObjectUD): def flagAv(self, todo0, todo1, todo2): pass - def setAchievements(self, achievements): - pass - def setRedeemedCodes(self, redeemedCodes): pass diff --git a/toontown/toon/LocalToon.py b/toontown/toon/LocalToon.py index cbfb29c1..bf65a24f 100644 --- a/toontown/toon/LocalToon.py +++ b/toontown/toon/LocalToon.py @@ -20,7 +20,6 @@ from otp.avatar import DistributedPlayer from otp.avatar import LocalAvatar from otp.avatar import PositionExaminer from otp.otpbase import OTPGlobals -from toontown.achievements import AchievementGui from toontown.battle import Fanfare from toontown.battle.BattleSounds import * from toontown.catalog import CatalogNotifyDialog @@ -34,7 +33,6 @@ from toontown.parties import PartyGlobals from toontown.quest import QuestMap from toontown.quest import QuestParser from toontown.quest import Quests -from toontown.shtiker import AchievementsPage from toontown.shtiker import DisguisePage from toontown.shtiker import PhotoAlbumPage from toontown.shtiker import EventsPage @@ -336,11 +334,6 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): self.fishPage.setAvatar(self) self.fishPage.load() self.book.addPage(self.fishPage, pageName=TTLocalizer.FishPageTitle) - if base.wantAchievements: - self.achievementsPage = AchievementsPage.AchievementsPage() - self.achievementsPage.setAvatar(self) - self.achievementsPage.load() - self.book.addPage(self.achievementsPage, pageName=TTLocalizer.AchievementsPageTitle) if base.wantKarts: self.addKartPage() if self.disguisePageFlag: @@ -379,8 +372,6 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): self.accept('InputState-turnRight', self.__toonMoved) self.accept('InputState-slide', self.__toonMoved) - self.achievementGui = AchievementGui.AchievementGui() - QuestParser.init() return @@ -1787,15 +1778,4 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): if petId == 0: self.petDNA = None elif self.isLocal(): - base.cr.addPetToFriendsMap() - - def setAchievements(self, achievements): - if base.wantAchievements: - if self.canEarnAchievements: - for achievementId in achievements: - if not achievementId in self.achievements: - self.achievementGui.earnAchievement(achievementId) - else: - self.canEarnAchievements = True - - DistributedToon.DistributedToon.setAchievements(self, achievements) + base.cr.addPetToFriendsMap() \ No newline at end of file diff --git a/toontown/toonbase/TTLocalizerEnglish.py b/toontown/toonbase/TTLocalizerEnglish.py index 97ec6e75..1a3030c3 100644 --- a/toontown/toonbase/TTLocalizerEnglish.py +++ b/toontown/toonbase/TTLocalizerEnglish.py @@ -3344,7 +3344,6 @@ PhotoPageCancel = lCancel PhotoPageClose = lClose PhotoPageDirectory = 'Open Folder' PhotoPageTutorial = 'You haven\'t taken any snapshots yet! Press TAB to change your camera angle, and press F9 to take a snapshot.\n\n Once you\'ve made a snapshot, come here to manage and name them.' -AchievePageTitle = 'Achievements\n(Coming Soon)' BuildingPageTitle = 'Buildings\n(Coming Soon)' InventoryPageTitle = 'Gags' InventoryPageDeleteTitle = 'DELETE GAGS' @@ -3352,7 +3351,6 @@ InventoryPageTrackFull = 'You have all the gags in the %s track.' InventoryPagePluralPoints = 'You will get a new\n%(trackName)s gag when you\nget %(numPoints)s more %(trackName)s points.' InventoryPageSinglePoint = 'You will get a new\n%(trackName)s gag when you\nget %(numPoints)s more %(trackName)s point.' InventoryPageNoAccess = 'You do not have access to the %s track yet.' -AchievementsPageTitle = 'Achievements' NPCFriendPageTitle = 'SOS Toons' PartyDateFormat = '%(mm)s %(dd)d, %(yyyy).4d' PartyTimeFormat = '%d:%.2d %s' diff --git a/toontown/toonbase/ToonBase.py b/toontown/toonbase/ToonBase.py index e7d3c6b8..3ee8c2dd 100644 --- a/toontown/toonbase/ToonBase.py +++ b/toontown/toonbase/ToonBase.py @@ -166,7 +166,6 @@ class ToonBase(OTPBase.OTPBase): self.wantBingo = self.config.GetBool('want-fish-bingo', 1) self.wantKarts = self.config.GetBool('want-karts', 1) self.wantNewSpecies = self.config.GetBool('want-new-species', 0) - self.wantAchievements = self.config.GetBool('want-achievements', 1) self.inactivityTimeout = self.config.GetFloat('inactivity-timeout', ToontownGlobals.KeyboardTimeout) if self.inactivityTimeout: self.notify.debug('Enabling Panda timeout: %s' % self.inactivityTimeout)