This commit is contained in:
DenialMC 2015-05-13 14:00:52 +03:00
parent 7e227afa55
commit 36bb543af6
18 changed files with 34 additions and 292 deletions

View file

@ -26,20 +26,14 @@ want-lawbot-cogdo #t
want-achievements #f want-achievements #f
want-anim-props #t want-anim-props #t
want-game-tables #t want-game-tables #t
want-find-four #f want-find-four #t
want-chinese-checkers #t want-chinese-checkers #t
want-checkers #f want-checkers #t
# Chat: # Chat:
want-whitelist #f want-whitelist #f
# Cashbot boss:
want-resistance-toonup #t
want-resistance-restock #t
want-resistance-dance #t
# Optional: # Optional:
want-glove-npc #t
want-jor-el-cam #f want-jor-el-cam #f
# Developer options: # Developer options:

View file

@ -1,46 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.ClockDelta import *
from direct.interval.IntervalGlobal import *
import HolidayDecorator
from toontown.toonbase import ToontownGlobals
from pandac.PandaModules import Vec4, TransformState, NodePath, TransparencyAttrib
from toontown.hood import GSHood
class CrashedLeaderBoardDecorator(HolidayDecorator.HolidayDecorator):
notify = DirectNotifyGlobal.directNotify.newCategory('CrashedLeaderBoardDecorator')
def __init__(self):
HolidayDecorator.HolidayDecorator.__init__(self)
def decorate(self):
self.updateHoodDNAStore()
self.swapIval = self.getSwapVisibleIval()
if self.swapIval:
self.swapIval.start()
holidayIds = base.cr.newsManager.getDecorationHolidayId()
if ToontownGlobals.CRASHED_LEADERBOARD not in holidayIds:
return
if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1):
self.startSmokeEffect()
def startSmokeEffect(self):
if isinstance(base.cr.playGame.getPlace().loader.hood, GSHood.GSHood):
base.cr.playGame.getPlace().loader.startSmokeEffect()
def stopSmokeEffect(self):
if isinstance(base.cr.playGame.getPlace().loader.hood, GSHood.GSHood):
base.cr.playGame.getPlace().loader.stopSmokeEffect()
def undecorate(self):
if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1):
self.stopSmokeEffect()
holidayIds = base.cr.newsManager.getDecorationHolidayId()
if len(holidayIds) > 0:
self.decorate()
return
storageFile = base.cr.playGame.hood.storageDNAFile
if storageFile:
loadDNAFile(self.dnaStore, storageFile, CSDefault)
self.swapIval = self.getSwapVisibleIval()
if self.swapIval:
self.swapIval.start()

View file

@ -1,30 +1,22 @@
from otp.ai.MagicWordGlobal import *
from pandac.PandaModules import * from pandac.PandaModules import *
from direct.distributed import DistributedObject from direct.distributed import DistributedObject
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import ToontownBattleGlobals
from toontown.battle import SuitBattleGlobals
from toontown.toonbase import TTLocalizer
import HolidayDecorator
import HalloweenHolidayDecorator
import CrashedLeaderBoardDecorator
from direct.interval.IntervalGlobal import * from direct.interval.IntervalGlobal import *
import calendar from toontown.toonbase import TTLocalizer, ToontownGlobals, ToontownBattleGlobals
from copy import deepcopy from toontown.battle import SuitBattleGlobals
from toontown.suit import SuitDNA from toontown.suit import SuitDNA
from otp.ai.MagicWordGlobal import * from copy import deepcopy
import HolidayDecorator, HalloweenHolidayDecorator, calendar
decorationHolidays = [ToontownGlobals.WINTER_DECORATIONS, decorationHolidays = [ToontownGlobals.WINTER_DECORATIONS,
ToontownGlobals.WACKY_WINTER_DECORATIONS, ToontownGlobals.WACKY_WINTER_DECORATIONS,
ToontownGlobals.HALLOWEEN_PROPS, ToontownGlobals.HALLOWEEN_PROPS,
ToontownGlobals.SPOOKY_PROPS, ToontownGlobals.SPOOKY_PROPS,
ToontownGlobals.HALLOWEEN_COSTUMES, ToontownGlobals.HALLOWEEN_COSTUMES,
ToontownGlobals.SPOOKY_COSTUMES, ToontownGlobals.SPOOKY_COSTUMES]
ToontownGlobals.CRASHED_LEADERBOARD]
promotionalSpeedChatHolidays = [] promotionalSpeedChatHolidays = []
class NewsManager(DistributedObject.DistributedObject): class NewsManager(DistributedObject.DistributedObject):
notify = DirectNotifyGlobal.directNotify.newCategory('NewsManager') notify = DirectNotifyGlobal.directNotify.newCategory('NewsManager')
neverDisable = 1 neverDisable = 1
@ -186,8 +178,6 @@ class NewsManager(DistributedObject.DistributedObject):
if hasattr(base.cr.playGame, 'dnaStore') and hasattr(base.cr.playGame, 'hood') and hasattr(base.cr.playGame.hood, 'loader'): if hasattr(base.cr.playGame, 'dnaStore') and hasattr(base.cr.playGame, 'hood') and hasattr(base.cr.playGame.hood, 'loader'):
if holidayId == ToontownGlobals.HALLOWEEN_COSTUMES or holidayId == ToontownGlobals.SPOOKY_COSTUMES: if holidayId == ToontownGlobals.HALLOWEEN_COSTUMES or holidayId == ToontownGlobals.SPOOKY_COSTUMES:
self.holidayDecorator = HalloweenHolidayDecorator.HalloweenHolidayDecorator() self.holidayDecorator = HalloweenHolidayDecorator.HalloweenHolidayDecorator()
elif holidayId == ToontownGlobals.CRASHED_LEADERBOARD:
self.holidayDecorator = CrashedLeaderBoardDecorator.CrashedLeaderBoardDecorator()
else: else:
self.holidayDecorator = HolidayDecorator.HolidayDecorator() self.holidayDecorator = HolidayDecorator.HolidayDecorator()
self.holidayDecorator.decorate() self.holidayDecorator.decorate()
@ -303,8 +293,6 @@ class NewsManager(DistributedObject.DistributedObject):
if hasattr(base.cr.playGame, 'dnaStore') and hasattr(base.cr.playGame, 'hood') and hasattr(base.cr.playGame.hood, 'loader'): if hasattr(base.cr.playGame, 'dnaStore') and hasattr(base.cr.playGame, 'hood') and hasattr(base.cr.playGame.hood, 'loader'):
if holidayId == ToontownGlobals.HALLOWEEN_COSTUMES or holidayId == ToontownGlobals.SPOOKY_COSTUMES: if holidayId == ToontownGlobals.HALLOWEEN_COSTUMES or holidayId == ToontownGlobals.SPOOKY_COSTUMES:
self.holidayDecorator = HalloweenHolidayDecorator.HalloweenHolidayDecorator() self.holidayDecorator = HalloweenHolidayDecorator.HalloweenHolidayDecorator()
elif holidayId == ToontownGlobals.CRASHED_LEADERBOARD:
self.holidayDecorator = CrashedLeaderBoardDecorator.CrashedLeaderBoardDecorator()
else: else:
self.holidayDecorator = HolidayDecorator.HolidayDecorator() self.holidayDecorator = HolidayDecorator.HolidayDecorator()
self.holidayDecorator.undecorate() self.holidayDecorator.undecorate()

View file

@ -87,7 +87,6 @@ class ToontownAIRepository(ToontownInternalRepository):
self.wantCogbuildings = self.config.GetBool('want-cogbuildings', True) self.wantCogbuildings = self.config.GetBool('want-cogbuildings', True)
self.wantCogdominiums = self.config.GetBool('want-cogdominiums', True) self.wantCogdominiums = self.config.GetBool('want-cogdominiums', True)
self.wantTrackClsends = self.config.GetBool('want-track-clsends', 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) self.baseXpMultiplier = self.config.GetFloat('base-xp-multiplier', 1.0)
self.wantHalloween = self.config.GetBool('want-halloween', False) self.wantHalloween = self.config.GetBool('want-halloween', False)
self.wantChristmas = self.config.GetBool('want-christmas', False) self.wantChristmas = self.config.GetBool('want-christmas', False)

View file

@ -1,8 +1,7 @@
from direct.particles.ParticleEffect import * from direct.particles.ParticleEffect import *
import os
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.showbase import AppRunnerGlobal
import ParticleDefs import ParticleDefs
notify = DirectNotifyGlobal.directNotify.newCategory('BattleParticles') notify = DirectNotifyGlobal.directNotify.newCategory('BattleParticles')
TutorialParticleEffects = ('gearExplosionBig.ptf', 'gearExplosionSmall.ptf', 'gearExplosion.ptf') TutorialParticleEffects = ('gearExplosionBig.ptf', 'gearExplosionSmall.ptf', 'gearExplosion.ptf')
ParticleNames = ('audit-div', 'audit-five', 'audit-four', 'audit-minus', 'audit-mult', 'audit-one', 'audit-plus', 'audit-six', 'audit-three', 'audit-two', 'blah', 'brainstorm-box', 'brainstorm-env', 'brainstorm-track', 'buzzwords-crash', 'buzzwords-inc', 'buzzwords-main', 'buzzwords-over', 'buzzwords-syn', 'confetti', 'doubletalk-double', 'doubletalk-dup', 'doubletalk-good', 'filibuster-cut', 'filibuster-fiscal', 'filibuster-impeach', 'filibuster-inc', 'jargon-brow', 'jargon-deep', 'jargon-hoop', 'jargon-ipo', 'legalese-hc', 'legalese-qpq', 'legalese-vd', 'mumbojumbo-boiler', 'mumbojumbo-creative', 'mumbojumbo-deben', 'mumbojumbo-high', 'mumbojumbo-iron', 'poundsign', 'schmooze-genius', 'schmooze-instant', 'schmooze-master', 'schmooze-viz', 'roll-o-dex', 'rollodex-card', 'dagger', 'fire', 'snow-particle', 'raindrop', 'gear', 'checkmark', 'dollar-sign', 'spark') ParticleNames = ('audit-div', 'audit-five', 'audit-four', 'audit-minus', 'audit-mult', 'audit-one', 'audit-plus', 'audit-six', 'audit-three', 'audit-two', 'blah', 'brainstorm-box', 'brainstorm-env', 'brainstorm-track', 'buzzwords-crash', 'buzzwords-inc', 'buzzwords-main', 'buzzwords-over', 'buzzwords-syn', 'confetti', 'doubletalk-double', 'doubletalk-dup', 'doubletalk-good', 'filibuster-cut', 'filibuster-fiscal', 'filibuster-impeach', 'filibuster-inc', 'jargon-brow', 'jargon-deep', 'jargon-hoop', 'jargon-ipo', 'legalese-hc', 'legalese-qpq', 'legalese-vd', 'mumbojumbo-boiler', 'mumbojumbo-creative', 'mumbojumbo-deben', 'mumbojumbo-high', 'mumbojumbo-iron', 'poundsign', 'schmooze-genius', 'schmooze-instant', 'schmooze-master', 'schmooze-viz', 'roll-o-dex', 'rollodex-card', 'dagger', 'fire', 'snow-particle', 'raindrop', 'gear', 'checkmark', 'dollar-sign', 'spark')
@ -13,8 +12,6 @@ def loadParticles():
global particleModel global particleModel
if particleModel == None: if particleModel == None:
particleModel = loader.loadModel('phase_3.5/models/props/suit-particles') particleModel = loader.loadModel('phase_3.5/models/props/suit-particles')
return
def unloadParticles(): def unloadParticles():
global particleModel global particleModel
@ -22,8 +19,6 @@ def unloadParticles():
particleModel.removeNode() particleModel.removeNode()
del particleModel del particleModel
particleModel = None particleModel = None
return
def getParticle(name): def getParticle(name):
if name in ParticleNames: if name in ParticleNames:
@ -34,7 +29,6 @@ def getParticle(name):
return None return None
return None return None
def loadParticleFile(name): def loadParticleFile(name):
assert name.endswith('.ptf') assert name.endswith('.ptf')
name = name[:-4] # Strip .ptf name = name[:-4] # Strip .ptf
@ -44,7 +38,6 @@ def loadParticleFile(name):
particleFunc(effect) particleFunc(effect)
return effect return effect
def createParticleEffect(name = None, file = None, numParticles = None, color = None): def createParticleEffect(name = None, file = None, numParticles = None, color = None):
if not name: if not name:
fileName = file + '.ptf' fileName = file + '.ptf'
@ -111,7 +104,6 @@ def createParticleEffect(name = None, file = None, numParticles = None, color =
notify.warning('createParticleEffect() - no name: %s' % name) notify.warning('createParticleEffect() - no name: %s' % name)
return None return None
def setEffectTexture(effect, name, color = None): def setEffectTexture(effect, name, color = None):
particles = effect.getParticlesNamed('particles-1') particles = effect.getParticlesNamed('particles-1')
np = getParticle(name) np = getParticle(name)
@ -119,7 +111,6 @@ def setEffectTexture(effect, name, color = None):
particles.renderer.setColor(color) particles.renderer.setColor(color)
particles.renderer.setFromNode(np) particles.renderer.setFromNode(np)
def __makeGearExplosion(numParticles = None, style = 'Normal'): def __makeGearExplosion(numParticles = None, style = 'Normal'):
if style == 'Normal': if style == 'Normal':
effect = loadParticleFile('gearExplosion.ptf') effect = loadParticleFile('gearExplosion.ptf')
@ -132,7 +123,6 @@ def __makeGearExplosion(numParticles = None, style = 'Normal'):
particles.setPoolSize(numParticles) particles.setPoolSize(numParticles)
return effect return effect
def __makeRubOut(color = None): def __makeRubOut(color = None):
effect = loadParticleFile('demotionUnFreeze.ptf') effect = loadParticleFile('demotionUnFreeze.ptf')
loadParticles() loadParticles()
@ -148,7 +138,6 @@ def __makeRubOut(color = None):
particles.renderer.setColor(Vec4(0.54, 0.92, 0.32, 0.7)) particles.renderer.setColor(Vec4(0.54, 0.92, 0.32, 0.7))
return effect return effect
def __makeShiftLift(): def __makeShiftLift():
effect = loadParticleFile('pixieDrop.ptf') effect = loadParticleFile('pixieDrop.ptf')
particles = effect.getParticlesNamed('particles-1') particles = effect.getParticlesNamed('particles-1')

View file

@ -1,7 +1,5 @@
from pandac.PandaModules import * from pandac.PandaModules import *
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.showbase import AppRunnerGlobal
import os
class BattleSounds: class BattleSounds:
notify = DirectNotifyGlobal.directNotify.newCategory('BattleSounds') notify = DirectNotifyGlobal.directNotify.newCategory('BattleSounds')
@ -15,7 +13,6 @@ class BattleSounds:
self.mgr.setCacheLimit(limit) self.mgr.setCacheLimit(limit)
base.addSfxManager(self.mgr) base.addSfxManager(self.mgr)
self.setupSearchPath() self.setupSearchPath()
return
def setupSearchPath(self): def setupSearchPath(self):
self.sfxSearchPath = DSearchPath() self.sfxSearchPath = DSearchPath()
@ -46,5 +43,4 @@ class BattleSounds:
return self.mgr.getSound(filename.getFullpath()) return self.mgr.getSound(filename.getFullpath())
return self.mgr.getNullSound() return self.mgr.getNullSound()
globalBattleSoundCache = BattleSounds() globalBattleSoundCache = BattleSounds()

View file

@ -65,61 +65,6 @@ def gearExplosion(self):
f0.addForce(force0) f0.addForce(force0)
self.addForceGroup(f0) self.addForceGroup(f0)
@particle
def smokeTest4(self):
self.reset()
self.setPos(0.000, 0.000, 0.000)
self.setHpr(0.000, 0.000, 0.000)
self.setScale(1.000, 1.000, 1.000)
p0 = Particles.Particles('particles-1')
p0.setFactory("PointParticleFactory")
p0.setRenderer("SpriteParticleRenderer")
p0.setEmitter("DiscEmitter")
p0.setPoolSize(30)
p0.setBirthRate(0.1000)
p0.setLitterSize(1)
p0.setLitterSpread(0)
p0.setSystemLifespan(0.0000)
p0.setLocalVelocityFlag(1)
p0.setSystemGrowsOlderFlag(0)
p0.factory.setLifespanBase(2.0000)
p0.factory.setLifespanSpread(0.5000)
p0.factory.setMassBase(1.0000)
p0.factory.setMassSpread(0.0000)
p0.factory.setTerminalVelocityBase(400.0000)
p0.factory.setTerminalVelocitySpread(0.0000)
p0.renderer.setAlphaMode(BaseParticleRenderer.PRALPHAINOUT)
p0.renderer.setUserAlpha(0.57)
p0.renderer.addTextureFromFile('../../ttmodels/src/maps/tt_t_efx_ext_smoke.tif')
p0.renderer.setColor(Vec4(1.00, 1.00, 1.00, 1.00))
p0.renderer.setXScaleFlag(1)
p0.renderer.setYScaleFlag(1)
p0.renderer.setAnimAngleFlag(0)
p0.renderer.setInitialXScale(2.0000)
p0.renderer.setFinalXScale(4.0000)
p0.renderer.setInitialYScale(2.0000)
p0.renderer.setFinalYScale(4.0000)
p0.renderer.setNonanimatedTheta(0.0000)
p0.renderer.setAlphaBlendMethod(BaseParticleRenderer.PPBLENDLINEAR)
p0.renderer.setAlphaDisable(0)
p0.renderer.getColorInterpolationManager().addLinear(0.0,1.0,Vec4(0.28235295414924622,0.28235295414924622,0.28235295414924622,1.0),Vec4(0.28235295414924622,0.28235295414924622,0.28235295414924622,1.0),1)
p0.emitter.setEmissionType(BaseParticleEmitter.ETRADIATE)
p0.emitter.setAmplitude(0.4000)
p0.emitter.setAmplitudeSpread(0.0000)
p0.emitter.setOffsetForce(Vec3(0.0000, 0.0000, 6.0000))
p0.emitter.setExplicitLaunchVector(Vec3(1.0000, 0.0000, 0.0000))
p0.emitter.setRadiateOrigin(Point3(0.0000, 0.0000, 0.0000))
p0.emitter.setRadius(1.0000)
self.addParticles(p0)
@particle @particle
def gearExplosionSmall(self): def gearExplosionSmall(self):
self.reset() self.reset()

View file

@ -1,54 +0,0 @@
from pandac.PandaModules import *
from direct.particles import ParticleEffect
from direct.directnotify import DirectNotifyGlobal
from direct.showbase import AppRunnerGlobal
import os
class CarSmoke(NodePath):
def __init__(self, parent):
NodePath.__init__(self)
notify = DirectNotifyGlobal.directNotify.newCategory('CarSmokeParticles')
self.effectNode = parent.attachNewNode('carSmoke')
self.effectNode.setBin('fixed', 1)
self.effectNode.setDepthWrite(0)
self.effect = ParticleEffect.ParticleEffect()
particleSearchPath = DSearchPath()
if AppRunnerGlobal.appRunner:
particleSearchPath.appendDirectory(Filename.expandFrom('$TT_3_5_ROOT/phase_3.5/etc'))
else:
basePath = os.path.expandvars('$TOONTOWN') or './toontown'
particleSearchPath.appendDirectory(Filename.fromOsSpecific(basePath + '/src/effects'))
particleSearchPath.appendDirectory(Filename('phase_3.5/etc'))
particleSearchPath.appendDirectory(Filename('phase_4/etc'))
particleSearchPath.appendDirectory(Filename('phase_5/etc'))
particleSearchPath.appendDirectory(Filename('phase_6/etc'))
particleSearchPath.appendDirectory(Filename('phase_7/etc'))
particleSearchPath.appendDirectory(Filename('phase_8/etc'))
particleSearchPath.appendDirectory(Filename('phase_9/etc'))
particleSearchPath.appendDirectory(Filename('.'))
pfile = Filename('smokeTest4.ptf')
found = vfs.resolveFilename(pfile, particleSearchPath)
if not found:
notify.warning('loadParticleFile() - no path: %s' % pfile)
return
notify.debug('Loading particle file: %s' % pfile)
self.effect.loadConfig(pfile)
ren = self.effect.getParticlesNamed('particles-1').getRenderer()
ren.setTextureFromNode('phase_4/models/props/tt_m_efx_ext_smoke', '**/*')
def start(self):
self.effect.start(parent=self.effectNode)
def stop(self):
try:
self.effect.disable()
except AttributeError:
pass
def destroy(self):
self.stop()
self.effect.cleanup()
self.effectNode.removeNode()
del self.effect
del self.effectNode

View file

@ -2,7 +2,6 @@ from toontown.safezone.GSSafeZoneLoader import GSSafeZoneLoader
from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals
from toontown.hood.ToonHood import ToonHood from toontown.hood.ToonHood import ToonHood
class GSHood(ToonHood): class GSHood(ToonHood):
notify = directNotify.newCategory('GSHood') notify = directNotify.newCategory('GSHood')
@ -13,9 +12,6 @@ class GSHood(ToonHood):
SPOOKY_SKY_FILE = 'phase_3.5/models/props/BR_sky' SPOOKY_SKY_FILE = 'phase_3.5/models/props/BR_sky'
TITLE_COLOR = (1.0, 0.5, 0.4, 1.0) TITLE_COLOR = (1.0, 0.5, 0.4, 1.0)
HOLIDAY_DNA = {
ToontownGlobals.CRASHED_LEADERBOARD: ['phase_6/dna/crashed_leaderboard_storage_GS.pdna']}
def enter(self, requestStatus): def enter(self, requestStatus):
ToonHood.enter(self, requestStatus) ToonHood.enter(self, requestStatus)

View file

@ -28,7 +28,6 @@ class TTHoodAI(HoodAI.HoodAI):
if simbase.config.GetBool('want-butterflies', True): if simbase.config.GetBool('want-butterflies', True):
self.createButterflies() self.createButterflies()
if simbase.air.wantGloveNpc:
NPCToons.createNPC( NPCToons.createNPC(
simbase.air, 2021, simbase.air, 2021,
(ToontownGlobals.ToontownCentral, TTLocalizer.NPCToonNames[2021], ('dss', 'ls', 's', 'm', 13, 41, 13, 13, 1, 6, 1, 6, 0, 18, 0), 'm', 1, NPCToons.NPC_GLOVE), (ToontownGlobals.ToontownCentral, TTLocalizer.NPCToonNames[2021], ('dss', 'ls', 's', 'm', 13, 41, 13, 13, 1, 6, 1, 6, 0, 18, 0), 'm', 1, NPCToons.NPC_GLOVE),

View file

@ -1,12 +1,7 @@
from pandac.PandaModules import * from pandac.PandaModules import *
import random
import string
import copy
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
import os
from direct.showbase import AppRunnerGlobal
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from toontown.toonbase import TTLocalizer, ToontownGlobals
import random
class NameGenerator: class NameGenerator:
text = TextNode('text') text = TextNode('text')

View file

@ -1,17 +1,12 @@
from pandac.PandaModules import *
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.interval.IntervalGlobal import * from direct.interval.IntervalGlobal import *
from direct.showbase import AppRunnerGlobal
from direct.showbase import DirectObject from direct.showbase import DirectObject
from direct.showbase import PythonUtil
from pandac.PandaModules import *
from otp.speedchat import SpeedChatGlobals from otp.speedchat import SpeedChatGlobals
from toontown.ai import DistributedBlackCatMgr
from toontown.chat.ChatGlobals import * from toontown.chat.ChatGlobals import *
from toontown.suit import Suit from toontown.suit import Suit, SuitDNA
from toontown.suit import SuitDNA
from toontown.toon import ToonHeadFrame from toontown.toon import ToonHeadFrame
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer, ToontownBattleGlobals
from toontown.toonbase import ToontownBattleGlobals
from toontown.quest import QuestScripts from toontown.quest import QuestScripts
import copy, re, tokenize, BlinkingArrows, StringIO import copy, re, tokenize, BlinkingArrows, StringIO

View file

@ -1,11 +1,10 @@
from pandac.PandaModules import *
from direct.distributed import DistributedObject from direct.distributed import DistributedObject
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from toontown.toonbase import TTLocalizer
from toontown.racing import KartShopGlobals from toontown.racing import KartShopGlobals
from toontown.toonbase import TTLocalizer
from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToonBaseGlobal import *
from pandac.PandaModules import *
from toontown.toonbase.ToontownGlobals import * from toontown.toonbase.ToontownGlobals import *
import random
import cPickle import cPickle
class DistributedLeaderBoard(DistributedObject.DistributedObject): class DistributedLeaderBoard(DistributedObject.DistributedObject):
@ -20,7 +19,6 @@ class DistributedLeaderBoard(DistributedObject.DistributedObject):
self.updateCount = 0 self.updateCount = 0
self.board = None self.board = None
self.surface = None self.surface = None
return
def generateInit(self): def generateInit(self):
DistributedObject.DistributedObject.generateInit(self) DistributedObject.DistributedObject.generateInit(self)
@ -33,18 +31,6 @@ class DistributedLeaderBoard(DistributedObject.DistributedObject):
def announceGenerate(self): def announceGenerate(self):
DistributedObject.DistributedObject.announceGenerate(self) DistributedObject.DistributedObject.announceGenerate(self)
self.board.reparentTo(render) self.board.reparentTo(render)
self.accept('decorator-holiday-%d-ending' % ToontownGlobals.CRASHED_LEADERBOARD, self.showLists)
self.accept('decorator-holiday-%d-starting' % ToontownGlobals.CRASHED_LEADERBOARD, self.hideLists)
newsManager = base.cr.newsManager
if newsManager:
if ToontownGlobals.CRASHED_LEADERBOARD in newsManager.holidayIdList:
self.hideLists()
def showLists(self):
self.board.show()
def hideLists(self):
self.board.hide()
def setPosHpr(self, x, y, z, h, p, r): def setPosHpr(self, x, y, z, h, p, r):
self.surface.setPosHpr(x, y, z, h, p, r) self.surface.setPosHpr(x, y, z, h, p, r)

View file

@ -1,13 +1,9 @@
from pandac.PandaModules import *
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State from direct.fsm import ClassicFSM, State
from direct.fsm import State
from pandac.PandaModules import *
from toontown.hood import ZoneUtil from toontown.hood import ZoneUtil
from toontown.safezone.SafeZoneLoader import SafeZoneLoader from toontown.safezone.SafeZoneLoader import SafeZoneLoader
from toontown.safezone.GSPlayground import GSPlayground from toontown.safezone.GSPlayground import GSPlayground
from toontown.effects.CarSmoke import CarSmoke
from toontown.toonbase import ToontownGlobals
import random
class GSSafeZoneLoader(SafeZoneLoader): class GSSafeZoneLoader(SafeZoneLoader):
@ -24,23 +20,14 @@ class GSSafeZoneLoader(SafeZoneLoader):
State.State('quietZone', self.enterQuietZone, self.exitQuietZone, ['playground', 'toonInterior', 'racetrack']), State.State('quietZone', self.enterQuietZone, self.exitQuietZone, ['playground', 'toonInterior', 'racetrack']),
State.State('racetrack', self.enterRacetrack, self.exitRacetrack, ['quietZone', 'playground']), State.State('racetrack', self.enterRacetrack, self.exitRacetrack, ['quietZone', 'playground']),
State.State('final', self.enterFinal, self.exitFinal, ['start'])], 'start', 'final') State.State('final', self.enterFinal, self.exitFinal, ['start'])], 'start', 'final')
self.smoke = None
return
def load(self): def load(self):
SafeZoneLoader.load(self) SafeZoneLoader.load(self)
if base.cr.newsManager:
holidayIds = base.cr.newsManager.getDecorationHolidayId()
if ToontownGlobals.CRASHED_LEADERBOARD in holidayIds:
self.startSmokeEffect()
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.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'])
def unload(self): def unload(self):
del self.birdSound del self.birdSound
if self.smoke != None:
self.stopSmokeEffect()
SafeZoneLoader.unload(self) SafeZoneLoader.unload(self)
return
def enterPlayground(self, requestStatus): def enterPlayground(self, requestStatus):
self.playgroundClass = GSPlayground self.playgroundClass = GSPlayground
@ -51,7 +38,6 @@ class GSSafeZoneLoader(SafeZoneLoader):
self.hood.hideTitleText() self.hood.hideTitleText()
SafeZoneLoader.exitPlayground(self) SafeZoneLoader.exitPlayground(self)
self.playgroundClass = None self.playgroundClass = None
return
def handlePlaygroundDone(self): def handlePlaygroundDone(self):
status = self.place.doneStatus status = self.place.doneStatus
@ -63,7 +49,6 @@ class GSSafeZoneLoader(SafeZoneLoader):
else: else:
self.doneStatus = status self.doneStatus = status
messenger.send(self.doneEvent) messenger.send(self.doneEvent)
return
def enteringARace(self, status): def enteringARace(self, status):
if not status['where'] == 'racetrack': if not status['where'] == 'racetrack':
@ -94,20 +79,3 @@ class GSSafeZoneLoader(SafeZoneLoader):
'shardId': None} 'shardId': None}
self.fsm.request('quietZone', [req]) self.fsm.request('quietZone', [req])
return return
def startSmokeEffect(self):
if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1):
leaderBoard = self.geom.find('**/*crashed*')
locator = leaderBoard.find('**/*locator_smoke*')
if locator != None:
self.smoke = CarSmoke(locator)
self.smoke.start()
return
def stopSmokeEffect(self):
if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1):
if self.smoke != None:
self.smoke.stop()
self.smoke.destroy()
self.smoke = None
return

View file

@ -1,19 +1,12 @@
from direct.actor import Actor
from otp.avatar import Avatar
import SuitDNA
from toontown.toonbase import ToontownGlobals
from pandac.PandaModules import * from pandac.PandaModules import *
from toontown.battle import SuitBattleGlobals from direct.actor import Actor
from toontown.nametag import NametagGlobals
from direct.task.Task import Task from direct.task.Task import Task
from toontown.battle import BattleProps from otp.avatar import Avatar
from toontown.toonbase import TTLocalizer from toontown.battle import BattleProps, SuitBattleGlobals
from pandac.PandaModules import VirtualFileMountHTTP, VirtualFileSystem, Filename, DSearchPath from toontown.nametag import NametagGlobals
from direct.showbase import AppRunnerGlobal from toontown.toonbase import TTLocalizer, ToontownGlobals
from toontown.nametag import NametagGroup
import string
import os
from toontown.suit import SuitGlobals from toontown.suit import SuitGlobals
import SuitDNA, string
aSize = 6.06 aSize = 6.06
bSize = 5.29 bSize = 5.29

View file

@ -119,7 +119,7 @@ def createNPC(air, npcId, desc, zoneId, posIndex = 0, questCallback = None):
npc = DistributedNPCScientistAI.DistributedNPCScientistAI(air, npcId) npc = DistributedNPCScientistAI.DistributedNPCScientistAI(air, npcId)
elif type == NPC_SMART: elif type == NPC_SMART:
npc = DistributedSmartNPCAI.DistributedSmartNPCAI(air, npcId) npc = DistributedSmartNPCAI.DistributedSmartNPCAI(air, npcId)
elif type == NPC_GLOVE and simbase.air.wantGloveNpc: elif type == NPC_GLOVE:
npc = DistributedNPCGloveAI.DistributedNPCGloveAI(air, npcId) npc = DistributedNPCGloveAI.DistributedNPCGloveAI(air, npcId)
elif type == NPC_LAFF_RESTOCK: elif type == NPC_LAFF_RESTOCK:
npc = DistributedNPCLaffRestockAI.DistributedNPCLaffRestockAI(air, npcId) npc = DistributedNPCLaffRestockAI.DistributedNPCLaffRestockAI(air, npcId)

View file

@ -852,7 +852,6 @@ HALLOWEEN_PROPS = 26
HALLOWEEN_COSTUMES = 27 HALLOWEEN_COSTUMES = 27
DECEMBER_INVASION = 28 DECEMBER_INVASION = 28
APRIL_FOOLS_COSTUMES = 29 APRIL_FOOLS_COSTUMES = 29
CRASHED_LEADERBOARD = 30
OCTOBER31_FIREWORKS = 31 OCTOBER31_FIREWORKS = 31
NOVEMBER19_FIREWORKS = 32 NOVEMBER19_FIREWORKS = 32
SELLBOT_SURPRISE_1 = 33 SELLBOT_SURPRISE_1 = 33