fix party fireworks
This commit is contained in:
parent
50a3720b83
commit
89104e47d7
2 changed files with 14 additions and 18 deletions
|
@ -4,7 +4,6 @@ from direct.interval.IntervalGlobal import *
|
||||||
from toontown.toonbase.ToontownGlobals import *
|
from toontown.toonbase.ToontownGlobals import *
|
||||||
from toontown.toonbase import TTLocalizer
|
from toontown.toonbase import TTLocalizer
|
||||||
from toontown.parties import PartyGlobals
|
from toontown.parties import PartyGlobals
|
||||||
from toontown.hood import *
|
|
||||||
from . import Fireworks
|
from . import Fireworks
|
||||||
from . import FireworkShows
|
from . import FireworkShows
|
||||||
from .FireworkGlobals import skyTransitionDuration, preShowPauseDuration, postShowPauseDuration, preNormalMusicPauseDuration
|
from .FireworkGlobals import skyTransitionDuration, preShowPauseDuration, postShowPauseDuration, preNormalMusicPauseDuration
|
||||||
|
@ -111,16 +110,16 @@ class FireworkShowMixin:
|
||||||
if not self.__checkStreetValidity():
|
if not self.__checkStreetValidity():
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
place.halloweenLights = base.cr.playGame.getPlace().loader.geom.findAllMatches('**/*light*').asList()
|
place.halloweenLights = list(base.cr.playGame.getPlace().loader.geom.findAllMatches('**/*light*'))
|
||||||
place.halloweenLights.extend(base.cr.playGame.getPlace().loader.geom.findAllMatches('**/*lamp*').asList())
|
place.halloweenLights.extend(list(base.cr.playGame.getPlace().loader.geom.findAllMatches('**/*lamp*')))
|
||||||
for light in place.halloweenLights:
|
for light in place.halloweenLights:
|
||||||
light.setColorScaleOff(0)
|
light.setColorScaleOff(0)
|
||||||
|
|
||||||
elif not self.__checkHoodValidity():
|
elif not self.__checkHoodValidity():
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
place.loader.hood.halloweenLights = base.cr.playGame.hood.loader.geom.findAllMatches('**/*light*').asList()
|
place.loader.hood.halloweenLights = list(base.cr.playGame.hood.loader.geom.findAllMatches('**/*light*'))
|
||||||
place.loader.hood.halloweenLights.extend(base.cr.playGame.hood.loader.geom.findAllMatches('**/*lamp*').asList())
|
place.loader.hood.halloweenLights.extend(list(base.cr.playGame.hood.loader.geom.findAllMatches('**/*lamp*')))
|
||||||
for light in base.cr.playGame.hood.halloweenLights:
|
for light in base.cr.playGame.hood.halloweenLights:
|
||||||
light.setColorScaleOff(0)
|
light.setColorScaleOff(0)
|
||||||
|
|
||||||
|
@ -135,6 +134,7 @@ class FireworkShowMixin:
|
||||||
|
|
||||||
def restoreCameraLens(self):
|
def restoreCameraLens(self):
|
||||||
hood = self.getHood()
|
hood = self.getHood()
|
||||||
|
from toontown.hood import OZHood, GSHood
|
||||||
if isinstance(hood, OZHood.OZHood):
|
if isinstance(hood, OZHood.OZHood):
|
||||||
base.camLens.setFar(SpeedwayCameraFar)
|
base.camLens.setFar(SpeedwayCameraFar)
|
||||||
elif isinstance(hood, GSHood.GSHood):
|
elif isinstance(hood, GSHood.GSHood):
|
||||||
|
@ -176,6 +176,7 @@ class FireworkShowMixin:
|
||||||
self.fireworkShow.begin(timeStamp)
|
self.fireworkShow.begin(timeStamp)
|
||||||
self.fireworkShow.reparentTo(root)
|
self.fireworkShow.reparentTo(root)
|
||||||
hood = self.getHood()
|
hood = self.getHood()
|
||||||
|
from toontown.hood import TTHood, BRHood, MMHood, DGHood, DLHood, GSHood, DDHood, OZHood, PartyHood
|
||||||
if isinstance(hood, TTHood.TTHood):
|
if isinstance(hood, TTHood.TTHood):
|
||||||
self.fireworkShow.setPos(150, 0, 80)
|
self.fireworkShow.setPos(150, 0, 80)
|
||||||
self.fireworkShow.setHpr(90, 0, 0)
|
self.fireworkShow.setHpr(90, 0, 0)
|
||||||
|
|
|
@ -19,19 +19,14 @@ class RocketExplosion(NodePath):
|
||||||
self.effect = ParticleEffect.ParticleEffect('RocketFire')
|
self.effect = ParticleEffect.ParticleEffect('RocketFire')
|
||||||
self.smokeEffect = ParticleEffect.ParticleEffect('RocketSmoke')
|
self.smokeEffect = ParticleEffect.ParticleEffect('RocketSmoke')
|
||||||
particleSearchPath = DSearchPath()
|
particleSearchPath = DSearchPath()
|
||||||
if AppRunnerGlobal.appRunner:
|
if __debug__:
|
||||||
particleSearchPath.appendDirectory(Filename.expandFrom('$TT_3_5_ROOT/phase_3.5/etc'))
|
particleSearchPath.appendDirectory(Filename('resources/phase_3.5/etc'))
|
||||||
else:
|
particleSearchPath.appendDirectory(Filename('resources/phase_4/etc'))
|
||||||
basePath = os.path.expandvars('$TOONTOWN') or './toontown'
|
particleSearchPath.appendDirectory(Filename('resources/phase_5/etc'))
|
||||||
particleSearchPath.appendDirectory(Filename.fromOsSpecific(basePath + '/src/effects'))
|
particleSearchPath.appendDirectory(Filename('resources/phase_6/etc'))
|
||||||
particleSearchPath.appendDirectory(Filename('phase_3.5/etc'))
|
particleSearchPath.appendDirectory(Filename('resources/phase_7/etc'))
|
||||||
particleSearchPath.appendDirectory(Filename('phase_4/etc'))
|
particleSearchPath.appendDirectory(Filename('resources/phase_8/etc'))
|
||||||
particleSearchPath.appendDirectory(Filename('phase_5/etc'))
|
particleSearchPath.appendDirectory(Filename('resources/phase_9/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('tt_p_efx_rocketLaunchFire.ptf')
|
pfile = Filename('tt_p_efx_rocketLaunchFire.ptf')
|
||||||
found = vfs.resolveFilename(pfile, particleSearchPath)
|
found = vfs.resolveFilename(pfile, particleSearchPath)
|
||||||
if not found:
|
if not found:
|
||||||
|
|
Loading…
Reference in a new issue