fix party fireworks

This commit is contained in:
Open Toontown 2022-01-18 23:42:23 -05:00
parent 50a3720b83
commit 89104e47d7
2 changed files with 14 additions and 18 deletions

View file

@ -4,7 +4,6 @@ from direct.interval.IntervalGlobal import *
from toontown.toonbase.ToontownGlobals import *
from toontown.toonbase import TTLocalizer
from toontown.parties import PartyGlobals
from toontown.hood import *
from . import Fireworks
from . import FireworkShows
from .FireworkGlobals import skyTransitionDuration, preShowPauseDuration, postShowPauseDuration, preNormalMusicPauseDuration
@ -111,16 +110,16 @@ class FireworkShowMixin:
if not self.__checkStreetValidity():
return
else:
place.halloweenLights = base.cr.playGame.getPlace().loader.geom.findAllMatches('**/*light*').asList()
place.halloweenLights.extend(base.cr.playGame.getPlace().loader.geom.findAllMatches('**/*lamp*').asList())
place.halloweenLights = list(base.cr.playGame.getPlace().loader.geom.findAllMatches('**/*light*'))
place.halloweenLights.extend(list(base.cr.playGame.getPlace().loader.geom.findAllMatches('**/*lamp*')))
for light in place.halloweenLights:
light.setColorScaleOff(0)
elif not self.__checkHoodValidity():
return
else:
place.loader.hood.halloweenLights = base.cr.playGame.hood.loader.geom.findAllMatches('**/*light*').asList()
place.loader.hood.halloweenLights.extend(base.cr.playGame.hood.loader.geom.findAllMatches('**/*lamp*').asList())
place.loader.hood.halloweenLights = list(base.cr.playGame.hood.loader.geom.findAllMatches('**/*light*'))
place.loader.hood.halloweenLights.extend(list(base.cr.playGame.hood.loader.geom.findAllMatches('**/*lamp*')))
for light in base.cr.playGame.hood.halloweenLights:
light.setColorScaleOff(0)
@ -135,6 +134,7 @@ class FireworkShowMixin:
def restoreCameraLens(self):
hood = self.getHood()
from toontown.hood import OZHood, GSHood
if isinstance(hood, OZHood.OZHood):
base.camLens.setFar(SpeedwayCameraFar)
elif isinstance(hood, GSHood.GSHood):
@ -176,6 +176,7 @@ class FireworkShowMixin:
self.fireworkShow.begin(timeStamp)
self.fireworkShow.reparentTo(root)
hood = self.getHood()
from toontown.hood import TTHood, BRHood, MMHood, DGHood, DLHood, GSHood, DDHood, OZHood, PartyHood
if isinstance(hood, TTHood.TTHood):
self.fireworkShow.setPos(150, 0, 80)
self.fireworkShow.setHpr(90, 0, 0)

View file

@ -19,19 +19,14 @@ class RocketExplosion(NodePath):
self.effect = ParticleEffect.ParticleEffect('RocketFire')
self.smokeEffect = ParticleEffect.ParticleEffect('RocketSmoke')
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('.'))
if __debug__:
particleSearchPath.appendDirectory(Filename('resources/phase_3.5/etc'))
particleSearchPath.appendDirectory(Filename('resources/phase_4/etc'))
particleSearchPath.appendDirectory(Filename('resources/phase_5/etc'))
particleSearchPath.appendDirectory(Filename('resources/phase_6/etc'))
particleSearchPath.appendDirectory(Filename('resources/phase_7/etc'))
particleSearchPath.appendDirectory(Filename('resources/phase_8/etc'))
particleSearchPath.appendDirectory(Filename('resources/phase_9/etc'))
pfile = Filename('tt_p_efx_rocketLaunchFire.ptf')
found = vfs.resolveFilename(pfile, particleSearchPath)
if not found: