mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
Upstream
This commit is contained in:
parent
7e227afa55
commit
36bb543af6
18 changed files with 34 additions and 292 deletions
|
@ -26,20 +26,14 @@ want-lawbot-cogdo #t
|
|||
want-achievements #f
|
||||
want-anim-props #t
|
||||
want-game-tables #t
|
||||
want-find-four #f
|
||||
want-find-four #t
|
||||
want-chinese-checkers #t
|
||||
want-checkers #f
|
||||
want-checkers #t
|
||||
|
||||
# Chat:
|
||||
want-whitelist #f
|
||||
|
||||
# Cashbot boss:
|
||||
want-resistance-toonup #t
|
||||
want-resistance-restock #t
|
||||
want-resistance-dance #t
|
||||
|
||||
# Optional:
|
||||
want-glove-npc #t
|
||||
want-jor-el-cam #f
|
||||
|
||||
# Developer options:
|
||||
|
|
|
@ -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()
|
|
@ -1,30 +1,22 @@
|
|||
from otp.ai.MagicWordGlobal import *
|
||||
from pandac.PandaModules import *
|
||||
from direct.distributed import DistributedObject
|
||||
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 *
|
||||
import calendar
|
||||
from copy import deepcopy
|
||||
from toontown.toonbase import TTLocalizer, ToontownGlobals, ToontownBattleGlobals
|
||||
from toontown.battle import SuitBattleGlobals
|
||||
from toontown.suit import SuitDNA
|
||||
from otp.ai.MagicWordGlobal import *
|
||||
|
||||
from copy import deepcopy
|
||||
import HolidayDecorator, HalloweenHolidayDecorator, calendar
|
||||
|
||||
decorationHolidays = [ToontownGlobals.WINTER_DECORATIONS,
|
||||
ToontownGlobals.WACKY_WINTER_DECORATIONS,
|
||||
ToontownGlobals.HALLOWEEN_PROPS,
|
||||
ToontownGlobals.SPOOKY_PROPS,
|
||||
ToontownGlobals.HALLOWEEN_COSTUMES,
|
||||
ToontownGlobals.SPOOKY_COSTUMES,
|
||||
ToontownGlobals.CRASHED_LEADERBOARD]
|
||||
ToontownGlobals.SPOOKY_COSTUMES]
|
||||
promotionalSpeedChatHolidays = []
|
||||
|
||||
|
||||
class NewsManager(DistributedObject.DistributedObject):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('NewsManager')
|
||||
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 holidayId == ToontownGlobals.HALLOWEEN_COSTUMES or holidayId == ToontownGlobals.SPOOKY_COSTUMES:
|
||||
self.holidayDecorator = HalloweenHolidayDecorator.HalloweenHolidayDecorator()
|
||||
elif holidayId == ToontownGlobals.CRASHED_LEADERBOARD:
|
||||
self.holidayDecorator = CrashedLeaderBoardDecorator.CrashedLeaderBoardDecorator()
|
||||
else:
|
||||
self.holidayDecorator = HolidayDecorator.HolidayDecorator()
|
||||
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 holidayId == ToontownGlobals.HALLOWEEN_COSTUMES or holidayId == ToontownGlobals.SPOOKY_COSTUMES:
|
||||
self.holidayDecorator = HalloweenHolidayDecorator.HalloweenHolidayDecorator()
|
||||
elif holidayId == ToontownGlobals.CRASHED_LEADERBOARD:
|
||||
self.holidayDecorator = CrashedLeaderBoardDecorator.CrashedLeaderBoardDecorator()
|
||||
else:
|
||||
self.holidayDecorator = HolidayDecorator.HolidayDecorator()
|
||||
self.holidayDecorator.undecorate()
|
||||
|
|
|
@ -87,7 +87,6 @@ class ToontownAIRepository(ToontownInternalRepository):
|
|||
self.wantCogbuildings = self.config.GetBool('want-cogbuildings', True)
|
||||
self.wantCogdominiums = self.config.GetBool('want-cogdominiums', True)
|
||||
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.wantHalloween = self.config.GetBool('want-halloween', False)
|
||||
self.wantChristmas = self.config.GetBool('want-christmas', False)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
from direct.particles.ParticleEffect import *
|
||||
import os
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.showbase import AppRunnerGlobal
|
||||
import ParticleDefs
|
||||
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('BattleParticles')
|
||||
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')
|
||||
|
@ -13,8 +12,6 @@ def loadParticles():
|
|||
global particleModel
|
||||
if particleModel == None:
|
||||
particleModel = loader.loadModel('phase_3.5/models/props/suit-particles')
|
||||
return
|
||||
|
||||
|
||||
def unloadParticles():
|
||||
global particleModel
|
||||
|
@ -22,8 +19,6 @@ def unloadParticles():
|
|||
particleModel.removeNode()
|
||||
del particleModel
|
||||
particleModel = None
|
||||
return
|
||||
|
||||
|
||||
def getParticle(name):
|
||||
if name in ParticleNames:
|
||||
|
@ -34,7 +29,6 @@ def getParticle(name):
|
|||
return None
|
||||
return None
|
||||
|
||||
|
||||
def loadParticleFile(name):
|
||||
assert name.endswith('.ptf')
|
||||
name = name[:-4] # Strip .ptf
|
||||
|
@ -44,7 +38,6 @@ def loadParticleFile(name):
|
|||
particleFunc(effect)
|
||||
return effect
|
||||
|
||||
|
||||
def createParticleEffect(name = None, file = None, numParticles = None, color = None):
|
||||
if not name:
|
||||
fileName = file + '.ptf'
|
||||
|
@ -111,7 +104,6 @@ def createParticleEffect(name = None, file = None, numParticles = None, color =
|
|||
notify.warning('createParticleEffect() - no name: %s' % name)
|
||||
return None
|
||||
|
||||
|
||||
def setEffectTexture(effect, name, color = None):
|
||||
particles = effect.getParticlesNamed('particles-1')
|
||||
np = getParticle(name)
|
||||
|
@ -119,7 +111,6 @@ def setEffectTexture(effect, name, color = None):
|
|||
particles.renderer.setColor(color)
|
||||
particles.renderer.setFromNode(np)
|
||||
|
||||
|
||||
def __makeGearExplosion(numParticles = None, style = 'Normal'):
|
||||
if style == 'Normal':
|
||||
effect = loadParticleFile('gearExplosion.ptf')
|
||||
|
@ -132,7 +123,6 @@ def __makeGearExplosion(numParticles = None, style = 'Normal'):
|
|||
particles.setPoolSize(numParticles)
|
||||
return effect
|
||||
|
||||
|
||||
def __makeRubOut(color = None):
|
||||
effect = loadParticleFile('demotionUnFreeze.ptf')
|
||||
loadParticles()
|
||||
|
@ -148,7 +138,6 @@ def __makeRubOut(color = None):
|
|||
particles.renderer.setColor(Vec4(0.54, 0.92, 0.32, 0.7))
|
||||
return effect
|
||||
|
||||
|
||||
def __makeShiftLift():
|
||||
effect = loadParticleFile('pixieDrop.ptf')
|
||||
particles = effect.getParticlesNamed('particles-1')
|
||||
|
@ -157,4 +146,4 @@ def __makeShiftLift():
|
|||
particles.emitter.setRadius(0.01)
|
||||
effect.setHpr(0, 180, 0)
|
||||
effect.setPos(0, 0, 0)
|
||||
return effect
|
||||
return effect
|
|
@ -1,7 +1,5 @@
|
|||
from pandac.PandaModules import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.showbase import AppRunnerGlobal
|
||||
import os
|
||||
|
||||
class BattleSounds:
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('BattleSounds')
|
||||
|
@ -15,7 +13,6 @@ class BattleSounds:
|
|||
self.mgr.setCacheLimit(limit)
|
||||
base.addSfxManager(self.mgr)
|
||||
self.setupSearchPath()
|
||||
return
|
||||
|
||||
def setupSearchPath(self):
|
||||
self.sfxSearchPath = DSearchPath()
|
||||
|
@ -46,5 +43,4 @@ class BattleSounds:
|
|||
return self.mgr.getSound(filename.getFullpath())
|
||||
return self.mgr.getNullSound()
|
||||
|
||||
|
||||
globalBattleSoundCache = BattleSounds()
|
||||
globalBattleSoundCache = BattleSounds()
|
|
@ -65,61 +65,6 @@ def gearExplosion(self):
|
|||
f0.addForce(force0)
|
||||
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
|
||||
def gearExplosionSmall(self):
|
||||
self.reset()
|
||||
|
|
|
@ -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
|
|
@ -2,7 +2,6 @@ from toontown.safezone.GSSafeZoneLoader import GSSafeZoneLoader
|
|||
from toontown.toonbase import ToontownGlobals
|
||||
from toontown.hood.ToonHood import ToonHood
|
||||
|
||||
|
||||
class GSHood(ToonHood):
|
||||
notify = directNotify.newCategory('GSHood')
|
||||
|
||||
|
@ -13,9 +12,6 @@ class GSHood(ToonHood):
|
|||
SPOOKY_SKY_FILE = 'phase_3.5/models/props/BR_sky'
|
||||
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):
|
||||
ToonHood.enter(self, requestStatus)
|
||||
|
||||
|
|
|
@ -28,11 +28,10 @@ class TTHoodAI(HoodAI.HoodAI):
|
|||
if simbase.config.GetBool('want-butterflies', True):
|
||||
self.createButterflies()
|
||||
|
||||
if simbase.air.wantGloveNpc:
|
||||
NPCToons.createNPC(
|
||||
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, posIndex=0)
|
||||
NPCToons.createNPC(
|
||||
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, posIndex=0)
|
||||
|
||||
if simbase.air.wantHalloween:
|
||||
self.TrickOrTreatTargetManager = DistributedTrickOrTreatTargetAI.DistributedTrickOrTreatTargetAI(self.air)
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
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 toontown.toonbase import TTLocalizer, ToontownGlobals
|
||||
import random
|
||||
|
||||
class NameGenerator:
|
||||
text = TextNode('text')
|
||||
|
@ -364,4 +359,4 @@ class NameGenerator:
|
|||
totalTitleFirstLasts = neutralTitleFirstLasts + boyTitleFirstLasts + girlTitleFirstLasts
|
||||
print 'Total title first lasts: ' + str(totalTitleFirstLasts)
|
||||
totalNames = firsts + lasts + totalTitleFirsts + totalTitleLasts + totalFirstLasts + totalTitleFirstLasts
|
||||
print 'Total Names: ' + str(totalNames)
|
||||
print 'Total Names: ' + str(totalNames)
|
|
@ -67,4 +67,4 @@ CornerPosTable = {'daisys_garden_5200_english': [Point3(781.219727, 476.963623,
|
|||
'daisys_garden_5100_english': [Point3(760.089722, 526.236206, 0), Point3(-139.510132, -373.3638, 0)],
|
||||
'toontown_central_2300_english': [Point3(870.224243, 536.165771, 0), Point3(-89.175751, -423.234344, 0)],
|
||||
'toontown_central_2100_english': [Point3(161.735336, -59.985107, 0), Point3(-512.664612, -734.385193, 0)],
|
||||
'the_burrrgh_3200_english': [Point3(429.647949, 561.224304, 0), Point3(-31.951935, 99.624283, 0)]}
|
||||
'the_burrrgh_3200_english': [Point3(429.647949, 561.224304, 0), Point3(-31.951935, 99.624283, 0)]}
|
|
@ -1,17 +1,12 @@
|
|||
from pandac.PandaModules import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from direct.showbase import AppRunnerGlobal
|
||||
from direct.showbase import DirectObject
|
||||
from direct.showbase import PythonUtil
|
||||
from pandac.PandaModules import *
|
||||
from otp.speedchat import SpeedChatGlobals
|
||||
from toontown.ai import DistributedBlackCatMgr
|
||||
from toontown.chat.ChatGlobals import *
|
||||
from toontown.suit import Suit
|
||||
from toontown.suit import SuitDNA
|
||||
from toontown.suit import Suit, SuitDNA
|
||||
from toontown.toon import ToonHeadFrame
|
||||
from toontown.toonbase import TTLocalizer
|
||||
from toontown.toonbase import ToontownBattleGlobals
|
||||
from toontown.toonbase import TTLocalizer, ToontownBattleGlobals
|
||||
from toontown.quest import QuestScripts
|
||||
import copy, re, tokenize, BlinkingArrows, StringIO
|
||||
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
from pandac.PandaModules import *
|
||||
from direct.distributed import DistributedObject
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from toontown.toonbase import TTLocalizer
|
||||
from toontown.racing import KartShopGlobals
|
||||
from toontown.toonbase import TTLocalizer
|
||||
from toontown.toonbase.ToonBaseGlobal import *
|
||||
from pandac.PandaModules import *
|
||||
from toontown.toonbase.ToontownGlobals import *
|
||||
import random
|
||||
import cPickle
|
||||
|
||||
class DistributedLeaderBoard(DistributedObject.DistributedObject):
|
||||
|
@ -20,7 +19,6 @@ class DistributedLeaderBoard(DistributedObject.DistributedObject):
|
|||
self.updateCount = 0
|
||||
self.board = None
|
||||
self.surface = None
|
||||
return
|
||||
|
||||
def generateInit(self):
|
||||
DistributedObject.DistributedObject.generateInit(self)
|
||||
|
@ -33,18 +31,6 @@ class DistributedLeaderBoard(DistributedObject.DistributedObject):
|
|||
def announceGenerate(self):
|
||||
DistributedObject.DistributedObject.announceGenerate(self)
|
||||
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):
|
||||
self.surface.setPosHpr(x, y, z, h, p, r)
|
||||
|
@ -165,4 +151,4 @@ class DistributedLeaderBoard(DistributedObject.DistributedObject):
|
|||
self.notify.debug('delete: deleting local leaderboard')
|
||||
self.ignoreAll()
|
||||
self.board.removeNode()
|
||||
DistributedObject.DistributedObject.delete(self)
|
||||
DistributedObject.DistributedObject.delete(self)
|
|
@ -1,13 +1,9 @@
|
|||
from pandac.PandaModules import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.fsm import ClassicFSM, State
|
||||
from direct.fsm import State
|
||||
from pandac.PandaModules import *
|
||||
from toontown.hood import ZoneUtil
|
||||
from toontown.safezone.SafeZoneLoader import SafeZoneLoader
|
||||
from toontown.safezone.GSPlayground import GSPlayground
|
||||
from toontown.effects.CarSmoke import CarSmoke
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
import random
|
||||
|
||||
class GSSafeZoneLoader(SafeZoneLoader):
|
||||
|
||||
|
@ -24,23 +20,14 @@ class GSSafeZoneLoader(SafeZoneLoader):
|
|||
State.State('quietZone', self.enterQuietZone, self.exitQuietZone, ['playground', 'toonInterior', 'racetrack']),
|
||||
State.State('racetrack', self.enterRacetrack, self.exitRacetrack, ['quietZone', 'playground']),
|
||||
State.State('final', self.enterFinal, self.exitFinal, ['start'])], 'start', 'final')
|
||||
self.smoke = None
|
||||
return
|
||||
|
||||
def 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'])
|
||||
|
||||
def unload(self):
|
||||
del self.birdSound
|
||||
if self.smoke != None:
|
||||
self.stopSmokeEffect()
|
||||
SafeZoneLoader.unload(self)
|
||||
return
|
||||
|
||||
def enterPlayground(self, requestStatus):
|
||||
self.playgroundClass = GSPlayground
|
||||
|
@ -51,7 +38,6 @@ class GSSafeZoneLoader(SafeZoneLoader):
|
|||
self.hood.hideTitleText()
|
||||
SafeZoneLoader.exitPlayground(self)
|
||||
self.playgroundClass = None
|
||||
return
|
||||
|
||||
def handlePlaygroundDone(self):
|
||||
status = self.place.doneStatus
|
||||
|
@ -63,7 +49,6 @@ class GSSafeZoneLoader(SafeZoneLoader):
|
|||
else:
|
||||
self.doneStatus = status
|
||||
messenger.send(self.doneEvent)
|
||||
return
|
||||
|
||||
def enteringARace(self, status):
|
||||
if not status['where'] == 'racetrack':
|
||||
|
@ -93,21 +78,4 @@ class GSSafeZoneLoader(SafeZoneLoader):
|
|||
'hoodId': 8000,
|
||||
'shardId': None}
|
||||
self.fsm.request('quietZone', [req])
|
||||
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
|
||||
return
|
|
@ -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 toontown.battle import SuitBattleGlobals
|
||||
from toontown.nametag import NametagGlobals
|
||||
from direct.actor import Actor
|
||||
from direct.task.Task import Task
|
||||
from toontown.battle import BattleProps
|
||||
from toontown.toonbase import TTLocalizer
|
||||
from pandac.PandaModules import VirtualFileMountHTTP, VirtualFileSystem, Filename, DSearchPath
|
||||
from direct.showbase import AppRunnerGlobal
|
||||
from toontown.nametag import NametagGroup
|
||||
import string
|
||||
import os
|
||||
from otp.avatar import Avatar
|
||||
from toontown.battle import BattleProps, SuitBattleGlobals
|
||||
from toontown.nametag import NametagGlobals
|
||||
from toontown.toonbase import TTLocalizer, ToontownGlobals
|
||||
from toontown.suit import SuitGlobals
|
||||
import SuitDNA, string
|
||||
|
||||
aSize = 6.06
|
||||
bSize = 5.29
|
||||
|
|
|
@ -119,7 +119,7 @@ def createNPC(air, npcId, desc, zoneId, posIndex = 0, questCallback = None):
|
|||
npc = DistributedNPCScientistAI.DistributedNPCScientistAI(air, npcId)
|
||||
elif type == NPC_SMART:
|
||||
npc = DistributedSmartNPCAI.DistributedSmartNPCAI(air, npcId)
|
||||
elif type == NPC_GLOVE and simbase.air.wantGloveNpc:
|
||||
elif type == NPC_GLOVE:
|
||||
npc = DistributedNPCGloveAI.DistributedNPCGloveAI(air, npcId)
|
||||
elif type == NPC_LAFF_RESTOCK:
|
||||
npc = DistributedNPCLaffRestockAI.DistributedNPCLaffRestockAI(air, npcId)
|
||||
|
|
|
@ -852,7 +852,6 @@ HALLOWEEN_PROPS = 26
|
|||
HALLOWEEN_COSTUMES = 27
|
||||
DECEMBER_INVASION = 28
|
||||
APRIL_FOOLS_COSTUMES = 29
|
||||
CRASHED_LEADERBOARD = 30
|
||||
OCTOBER31_FIREWORKS = 31
|
||||
NOVEMBER19_FIREWORKS = 32
|
||||
SELLBOT_SURPRISE_1 = 33
|
||||
|
|
Loading…
Reference in a new issue