From 36400d6e517d1c8d3e3726958e0e9bc550ddb8f2 Mon Sep 17 00:00:00 2001 From: DenialMC Date: Sun, 10 May 2015 15:31:46 +0300 Subject: [PATCH] Rename config options, enable photo game, enable game tables, remove config options for live updates, long pattern games, resistance disables, enable estate day night, remove election leftovers, remove goonsEnabled leftovers, shorten estate nights, remove Dance resistance message. --- config/general.prc | 15 ++++-------- toontown/ai/ToontownAIRepository.py | 3 +-- toontown/chat/ResistanceChat.py | 31 ++----------------------- toontown/effects/FireworkShowMixin.py | 12 ---------- toontown/estate/EstateLoader.py | 13 ----------- toontown/estate/HouseGlobals.py | 10 ++++---- toontown/minigame/PatternGameGlobals.py | 18 ++++---------- toontown/toon/DistributedToonAI.py | 13 +++++------ toontown/toonbase/TTLocalizerEnglish.py | 3 --- toontown/toonbase/ToonBase.py | 1 - 10 files changed, 23 insertions(+), 96 deletions(-) diff --git a/config/general.prc b/config/general.prc index ce4c7c79..1d756096 100644 --- a/config/general.prc +++ b/config/general.prc @@ -62,7 +62,7 @@ want-toontown-central #t want-donalds-dock #t want-daisys-garden #t want-minnies-melodyland #t -want-the-burrrgh #t +want-the-brrrgh #t want-donalds-dreamland #t want-goofy-speedway #t want-outdoor-zone #t @@ -75,11 +75,10 @@ want-butterflies #f # Trolley minigames: want-minigames #t -want-photo-game #f -want-travel-game #f +want-photo-game #t # Picnic table board games: -want-game-tables #f +want-game-tables #t # Cog headquarters: want-cog-headquarters #t @@ -88,11 +87,6 @@ want-cashbot-headquarters #t want-lawbot-headquarters #t want-bossbot-headquarters #t -# Cashbot boss: -want-resistance-toonup #t -want-resistance-restock #t -want-resistance-dance #f - # Cog battles: base-xp-multiplier 1.0 @@ -110,7 +104,6 @@ want-cogbuildings #t # Optional: show-total-population #t want-mat-all-tailors #t -want-long-pattern-game #f want-talkative-tyler #f # Developer options: @@ -122,4 +115,4 @@ smooth-lag 0.4 want-old-fireworks #t # Live updates: -want-live-updates #t \ No newline at end of file +estate-day-night #t \ No newline at end of file diff --git a/toontown/ai/ToontownAIRepository.py b/toontown/ai/ToontownAIRepository.py index a61778c2..29514b17 100644 --- a/toontown/ai/ToontownAIRepository.py +++ b/toontown/ai/ToontownAIRepository.py @@ -86,7 +86,6 @@ class ToontownAIRepository(ToontownInternalRepository): self.wantEmblems = self.config.GetBool('want-emblems', True) self.wantCogbuildings = self.config.GetBool('want-cogbuildings', True) 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.wantGloveNpc = self.config.GetBool('want-glove-npc', True) self.baseXpMultiplier = self.config.GetFloat('base-xp-multiplier', 1.0) @@ -155,7 +154,7 @@ class ToontownAIRepository(ToontownInternalRepository): self.hoods.append(DGHoodAI.DGHoodAI(self)) if self.config.GetBool('want-minnies-melodyland', True): self.hoods.append(MMHoodAI.MMHoodAI(self)) - if self.config.GetBool('want-the-burrrgh', True): + if self.config.GetBool('want-the-brrrgh', True): self.hoods.append(BRHoodAI.BRHoodAI(self)) if self.config.GetBool('want-donalds-dreamland', True): self.hoods.append(DLHoodAI.DLHoodAI(self)) diff --git a/toontown/chat/ResistanceChat.py b/toontown/chat/ResistanceChat.py index 633aa3d0..48b7dfa0 100644 --- a/toontown/chat/ResistanceChat.py +++ b/toontown/chat/ResistanceChat.py @@ -19,20 +19,7 @@ EFFECT_RADIUS = 30 RESISTANCE_TOONUP = 0 RESISTANCE_RESTOCK = 1 RESISTANCE_MONEY = 2 -RESISTANCE_DANCE = 3 -allowedResistanceMessages = [] -if config.GetBool('want-resistance-toonup', True): - allowedResistanceMessages.append(RESISTANCE_TOONUP) -if config.GetBool('want-resistance-restock', True): - allowedResistanceMessages.append(RESISTANCE_RESTOCK) -if config.GetBool('want-resistance-money', True): - allowedResistanceMessages.append(RESISTANCE_MONEY) -if config.GetBool('want-resistance-dance', True): - allowedResistanceMessages.append(RESISTANCE_DANCE) -resistanceMenu = [ - RESISTANCE_TOONUP, RESISTANCE_RESTOCK, RESISTANCE_MONEY, - RESISTANCE_DANCE -] +resistanceMenu = [RESISTANCE_TOONUP, RESISTANCE_RESTOCK, RESISTANCE_MONEY] resistanceDict = { RESISTANCE_TOONUP: { 'menuName': TTLocalizer.ResistanceToonupMenu, @@ -73,13 +60,6 @@ resistanceDict = { TTLocalizer.MovieNPCSOSAll ], 'items': [0, 1, 2, 3, 4, 5, 6, 7] - }, - RESISTANCE_DANCE: { - 'menuName': TTLocalizer.ResistanceDanceMenu, - 'itemText': TTLocalizer.ResistanceDanceItem, - 'chatText': TTLocalizer.ResistanceDanceChat, - 'values': ['Dance'], - 'items': [0] } } @@ -139,7 +119,7 @@ def getItemValue(textId): def getRandomId(): - menuIndex = random.choice(allowedResistanceMessages) + menuIndex = random.choice(resistanceMenu) itemIndex = random.choice(getItems(menuIndex)) return encodeId(menuIndex, itemIndex) @@ -197,13 +177,6 @@ def doEffect(textId, speakingToon, nearbyToons): p = effect.getParticlesNamed(name) p.renderer.setFromNode(icon) fadeColor = VBase4(0, 0, 1, 1) - elif menuIndex == RESISTANCE_DANCE: - effect = BattleParticles.loadParticleFile('resistanceEffectSparkle.ptf') - fadeColor = VBase4(1, 0.5, 1, 1) - for toonId in nearbyToons: - toon = base.cr.doId2do.get(toonId) - if toon and (not toon.ghostMode): - toon.setAnimState('victory') else: return recolorToons = Parallel() diff --git a/toontown/effects/FireworkShowMixin.py b/toontown/effects/FireworkShowMixin.py index d5cfb81a..8ab116e3 100644 --- a/toontown/effects/FireworkShowMixin.py +++ b/toontown/effects/FireworkShowMixin.py @@ -132,18 +132,6 @@ class FireworkShowMixin: if self.fireworkShow and not self.fireworkShow.isEmpty(): self.fireworkShow.setColorScaleOff(0) return - # Election Only - self.electionFloor = base.render.find('**/ShowFloor') - self.slappyBalloon = base.render.find('**/airballoon.egg') - if self.__checkHoodValidity() and hasattr(base.cr.playGame, 'hood') and base.cr.playGame.hood and hasattr(base.cr.playGame.hood, 'sky') and base.cr.playGame.hood.sky: - # Election Only - hood = self.getHood() - if hood.id == ToontownCentral: - preShow = Sequence(Func(base.localAvatar.setSystemMessage, 0, startMessage), Parallel(LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(0.0, 0.0, 0.0, 1.0)), LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 2.5, Vec4(0.25, 0.25, 0.35, 1)), LerpColorScaleInterval(self.electionFloor, 2.5, Vec4(0.25, 0.25, 0.35, 1)), LerpColorScaleInterval(self.slappyBalloon, 2.5, Vec4(0.55, 0.55, 0.65, 1)), LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(0.85, 0.85, 0.85, 1)), Func(__lightDecorationOn__)), Func(base.setBackgroundColor, Vec4(0, 0, 0, 1)), Func(self.__checkDDFog), Func(base.camLens.setFar, 1000.0), Func(base.cr.playGame.hood.sky.hide), Func(base.localAvatar.setSystemMessage, 0, instructionMessage), Func(self.getLoader().music.stop), Wait(2.0), Func(base.playMusic, self.showMusic, 0, 1, 0.8, max(0, startT))) - else: - preShow = Sequence(Func(base.localAvatar.setSystemMessage, 0, startMessage), Parallel(LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(0.0, 0.0, 0.0, 1.0)), LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 2.5, Vec4(0.25, 0.25, 0.35, 1)), LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(0.85, 0.85, 0.85, 1)), Func(__lightDecorationOn__)), Func(base.setBackgroundColor, Vec4(0, 0, 0, 1)), Func(self.__checkDDFog), Func(base.camLens.setFar, 1000.0), Func(base.cr.playGame.hood.sky.hide), Func(base.localAvatar.setSystemMessage, 0, instructionMessage), Func(self.getLoader().music.stop), Wait(2.0), Func(base.playMusic, self.showMusic, 0, 1, 0.8, max(0, startT))) - #preShow = Sequence(Func(base.localAvatar.setSystemMessage, 0, startMessage), Parallel(LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(0.0, 0.0, 0.0, 1.0)), LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 2.5, Vec4(0.25, 0.25, 0.35, 1)), LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(0.85, 0.85, 0.85, 1)), Func(__lightDecorationOn__)), Func(base.setBackgroundColor, Vec4(0, 0, 0, 1)), Func(self.__checkDDFog), Func(base.camLens.setFar, 1000.0), Func(base.cr.playGame.hood.sky.hide), Func(base.localAvatar.setSystemMessage, 0, instructionMessage), Func(self.getLoader().music.stop), Wait(2.0), Func(base.playMusic, self.showMusic, 0, 1, 0.8, max(0, startT))) - return preShow return None def restoreCameraLens(self): diff --git a/toontown/estate/EstateLoader.py b/toontown/estate/EstateLoader.py index db5e3f72..e44eb2c3 100644 --- a/toontown/estate/EstateLoader.py +++ b/toontown/estate/EstateLoader.py @@ -47,19 +47,6 @@ class EstateLoader(SafeZoneLoader.SafeZoneLoader): self.submergeSound = base.loadSfx('phase_5.5/audio/sfx/AV_jump_in_water.ogg') self.birdSound = map(base.loadSfx, ['phase_4/audio/sfx/SZ_TC_bird1.ogg', 'phase_4/audio/sfx/SZ_TC_bird2.ogg', 'phase_4/audio/sfx/SZ_TC_bird3.ogg']) self.cricketSound = map(base.loadSfx, ['phase_4/audio/sfx/SZ_TC_bird1.ogg', 'phase_4/audio/sfx/SZ_TC_bird2.ogg', 'phase_4/audio/sfx/SZ_TC_bird3.ogg']) - if base.goonsEnabled: - invModel = loader.loadModel('phase_3.5/models/gui/inventory_icons') - self.invModels = [] - from toontown.toonbase import ToontownBattleGlobals - for track in xrange(len(ToontownBattleGlobals.AvPropsNew)): - itemList = [] - for item in xrange(len(ToontownBattleGlobals.AvPropsNew[track])): - itemList.append(invModel.find('**/' + ToontownBattleGlobals.AvPropsNew[track][item])) - - self.invModels.append(itemList) - - invModel.removeNode() - del invModel def unload(self): self.ignoreAll() diff --git a/toontown/estate/HouseGlobals.py b/toontown/estate/HouseGlobals.py index a8c5035d..5eb73683 100644 --- a/toontown/estate/HouseGlobals.py +++ b/toontown/estate/HouseGlobals.py @@ -103,11 +103,11 @@ PROP_SNOWFLAKE = 2 FURNITURE_MODE_OFF = 0 FURNITURE_MODE_STOP = 1 FURNITURE_MODE_START = 2 -DAY_NIGHT_PERIOD = 2700 -DAY_PERIOD = 2100 -NIGHT_PERIOD = 600 -HALF_DAY_PERIOD = 1050 -HALF_NIGHT_PERIOD = 300 +DAY_NIGHT_PERIOD = 270 +DAY_PERIOD = 210 +NIGHT_PERIOD = 60 +HALF_DAY_PERIOD = 105 +HALF_NIGHT_PERIOD = 30 FIREWORKS_MOVIE_CLEAR = 0 FIREWORKS_MOVIE_GUI = 1 diff --git a/toontown/minigame/PatternGameGlobals.py b/toontown/minigame/PatternGameGlobals.py index 0c27251f..80a97447 100644 --- a/toontown/minigame/PatternGameGlobals.py +++ b/toontown/minigame/PatternGameGlobals.py @@ -1,17 +1,9 @@ import MinigameGlobals - -if config.GetBool('want-long-pattern-game', False): - INITIAL_ROUND_LENGTH = 1 - ROUND_LENGTH_INCREMENT = 1 - NUM_ROUNDS = 100 - InputTime = 120 -else: - INITIAL_ROUND_LENGTH = 2 - ROUND_LENGTH_INCREMENT = 2 - NUM_ROUNDS = 4 - InputTime = 10 - +INITIAL_ROUND_LENGTH = 2 +ROUND_LENGTH_INCREMENT = 2 +NUM_ROUNDS = 4 +InputTime = 10 TOONTOWN_WORK = 1 ClientsReadyTimeout = 5 + MinigameGlobals.latencyTolerance -InputTimeout = InputTime + MinigameGlobals.latencyTolerance +InputTimeout = InputTime + MinigameGlobals.latencyTolerance \ No newline at end of file diff --git a/toontown/toon/DistributedToonAI.py b/toontown/toon/DistributedToonAI.py index 4cb96fa0..66cef4db 100644 --- a/toontown/toon/DistributedToonAI.py +++ b/toontown/toon/DistributedToonAI.py @@ -2166,11 +2166,10 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo def setCatalogSchedule(self, currentWeek, nextTime): self.catalogScheduleCurrentWeek = currentWeek self.catalogScheduleNextTime = nextTime - if self.air.doLiveUpdates: - taskName = self.uniqueName('next-catalog') - taskMgr.remove(taskName) - duration = max(10.0, nextTime * 60 - time.time()) - taskMgr.doMethodLater(duration, self.__deliverCatalog, taskName) + taskName = self.uniqueName('next-catalog') + taskMgr.remove(taskName) + duration = max(10.0, nextTime * 60 - time.time()) + taskMgr.doMethodLater(duration, self.__deliverCatalog, taskName) def getCatalogSchedule(self): return (self.catalogScheduleCurrentWeek, self.catalogScheduleNextTime) @@ -2232,7 +2231,7 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo self.onGiftOrder = CatalogItemList.CatalogItemList(onGiftOrder, store=CatalogItem.Customization | CatalogItem.DeliveryDate) if not hasattr(self, 'air') or self.air == None: return - if doUpdateLater and self.air.doLiveUpdates and hasattr(self, 'name'): + if doUpdateLater and hasattr(self, 'name'): taskName = 'next-bothDelivery-%s' % self.doId now = int(time.time() / 60 + 0.5) nextItem = None @@ -3945,7 +3944,7 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo def setAwardSchedule(self, onAwardOrder, doUpdateLater = True): self.onAwardOrder = CatalogItemList.CatalogItemList(onAwardOrder, store=CatalogItem.Customization | CatalogItem.DeliveryDate) if hasattr(self, 'name'): - if doUpdateLater and self.air.doLiveUpdates and hasattr(self, 'air'): + if doUpdateLater and hasattr(self, 'air'): taskName = self.uniqueName('next-award-delivery') taskMgr.remove(taskName) now = int(time.time() / 60 + 0.5) diff --git a/toontown/toonbase/TTLocalizerEnglish.py b/toontown/toonbase/TTLocalizerEnglish.py index a82f234b..3b1ec474 100644 --- a/toontown/toonbase/TTLocalizerEnglish.py +++ b/toontown/toonbase/TTLocalizerEnglish.py @@ -7714,9 +7714,6 @@ ResistanceToonupMenu = 'Toon-up' ResistanceToonupItem = '%s Toon-up' ResistanceToonupItemMax = 'Max' ResistanceToonupChat = 'Toons of the World, Toon-up!' -ResistanceDanceMenu = 'Dance' -ResistanceDanceItem = 'Make them %s' -ResistanceDanceChat = 'Toons of the World, Dance with me!' ResistanceRestockMenu = 'Gag-up' ResistanceRestockItem = 'Gag-up %s' ResistanceRestockItemAll = 'All' diff --git a/toontown/toonbase/ToonBase.py b/toontown/toonbase/ToonBase.py index 3ee8c2dd..714764dc 100644 --- a/toontown/toonbase/ToonBase.py +++ b/toontown/toonbase/ToonBase.py @@ -204,7 +204,6 @@ class ToonBase(OTPBase.OTPBase): self.dayNightEnabled = self.config.GetBool('estate-day-night', 0) self.cloudPlatformsEnabled = self.config.GetBool('estate-clouds', 0) self.greySpacing = self.config.GetBool('allow-greyspacing', 0) - self.goonsEnabled = self.config.GetBool('estate-goon', 0) self.slowQuietZone = self.config.GetBool('slow-quiet-zone', 0) self.slowQuietZoneDelay = self.config.GetFloat('slow-quiet-zone-delay', 5) self.killInterestResponse = self.config.GetBool('kill-interest-response', 0)