def __init__(self, hood, parentFSM, doneEvent): SafeZoneLoader.__init__(self, hood, parentFSM, doneEvent) self.musicFile = 'phase_6/audio/bgm/GS_SZ.mid' self.activityMusicFile = 'phase_6/audio/bgm/GS_KartShop.mid' self.dnaFile = 'phase_6/dna/goofy_speedway_sz.dna' self.safeZoneStorageDNAFile = 'phase_6/dna/storage_GS_sz.dna' del self.fsm self.fsm = ClassicFSM.ClassicFSM('SafeZoneLoader', [ State.State('start', self.enterStart, self.exitStart, [ 'quietZone', 'playground', 'toonInterior']), State.State('playground', self.enterPlayground, self.exitPlayground, [ 'quietZone', 'racetrack']), State.State('toonInterior', self.enterToonInterior, self.exitToonInterior, [ 'quietZone']), 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
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.mp3', 'phase_4/audio/sfx/SZ_TC_bird2.mp3', 'phase_4/audio/sfx/SZ_TC_bird3.mp3'])
def __init__(self, hood, parentFSM, doneEvent): SafeZoneLoader.__init__(self, hood, parentFSM, doneEvent) self.musicFile = 'phase_6/audio/bgm/GZ_SZ.mid' self.activityMusicFile = 'phase_6/audio/bgm/GS_KartShop.mid' self.dnaFile = 'phase_6/dna/golf_zone_sz.dna' self.safeZoneStorageDNAFile = 'phase_6/dna/storage_GZ_sz.dna' del self.fsm self.fsm = ClassicFSM.ClassicFSM('SafeZoneLoader', [ State.State('start', self.enterStart, self.exitStart, [ 'quietZone', 'playground', 'toonInterior']), State.State('playground', self.enterPlayground, self.exitPlayground, [ 'quietZone', 'golfcourse']), State.State('toonInterior', self.enterToonInterior, self.exitToonInterior, [ 'quietZone']), State.State('quietZone', self.enterQuietZone, self.exitQuietZone, [ 'playground', 'toonInterior', 'golfcourse']), State.State('golfcourse', self.enterGolfCourse, self.exitGolfCourse, [ 'quietZone', 'playground']), State.State('final', self.enterFinal, self.exitFinal, [ 'start'])], 'start', 'final')
def unload(self): del self.birdSound SafeZoneLoader.unload(self) self.done = 1 self.collBase.removeNode() if self.geyserTrack: self.geyserTrack.finish() self.geyserTrack = None self.geyserActor.cleanup() self.geyserModel.removeNode() self.waterfallActor.cleanup() self.waterfallModel.removeNode() self.bubbles.destroy() del self.bubbles self.geyserPoolSoundInterval.finish() self.geyserPoolSfx.stop() self.geyserPoolSfx = None self.geyserPoolSoundInterval = None self.geyserSoundInterval.finish() self.geyserSound.stop() self.geyserSoundInterval = None self.geyserSound = None self.geyserSoundNoToonInterval.finish() self.geyserSoundNoToon.stop() self.geyserSoundNoToonInterval = None self.geyserSoundNoToon = None return
def load(self): SafeZoneLoader.load(self) 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 enterPlayground(self, requestStatus): self.playgroundClass = GZPlayground SafeZoneLoader.enterPlayground(self, requestStatus) top = self.geom.find('**/linktunnel_bosshq_10000_DNARoot') sign = top.find('**/Sign_5') sign.node().setEffect(DecalEffect.make()) locator = top.find('**/sign_origin') signText = DirectGui.OnscreenText(text=TextEncoder.upper(TTLocalizer.BossbotHQ[-1]), font=ToontownGlobals.getSuitFont(), scale=TTLocalizer.GZSZLsignText, fg=(0, 0, 0, 1), mayChange=False, parent=sign) signText.setPosHpr(locator, 0, 0, -0.3, 0, 0, 0) signText.setDepthWrite(0)
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.mp3', 'phase_4/audio/sfx/SZ_TC_bird2.mp3', 'phase_4/audio/sfx/SZ_TC_bird3.mp3'])
def enterPlayground(self, requestStatus): self.playgroundClass = GZPlayground SafeZoneLoader.enterPlayground(self, requestStatus) top = self.geom.find('**/linktunnel_bosshq_10000_DNARoot') sign = top.find('**/Sign_5') sign.node().setEffect(DecalEffect.make()) locator = top.find('**/sign_origin') signText = DirectGui.OnscreenText(text=TextEncoder.upper(TTLocalizer.BossbotHQ[(-1)]), font=ToontownGlobals.getSuitFont(), scale=TTLocalizer.GZSZLsignText, fg=(0, 0, 0, 1), mayChange=False, parent=sign) signText.setPosHpr(locator, 0, 0, -0.3, 0, 0, 0) signText.setDepthWrite(0)
def __init__(self, hood, parentFSM, doneEvent): SafeZoneLoader.__init__(self, hood, parentFSM, doneEvent) self.musicFile = 'phase_6/audio/bgm/GZ_SZ.ogg' self.activityMusicFile = 'phase_6/audio/bgm/GS_KartShop.ogg' self.dnaFile = 'phase_6/dna/golf_zone_sz.pdna' self.safeZoneStorageDNAFile = 'phase_6/dna/storage_GZ_sz.pdna' del self.fsm self.fsm = ClassicFSM.ClassicFSM('SafeZoneLoader', [State.State('start', self.enterStart, self.exitStart, ['quietZone', 'playground', 'toonInterior']), State.State('playground', self.enterPlayground, self.exitPlayground, ['quietZone', 'golfcourse']), State.State('toonInterior', self.enterToonInterior, self.exitToonInterior, ['quietZone']), State.State('quietZone', self.enterQuietZone, self.exitQuietZone, ['playground', 'toonInterior', 'golfcourse']), State.State('golfcourse', self.enterGolfCourse, self.exitGolfCourse, ['quietZone', 'playground']), State.State('final', self.enterFinal, self.exitFinal, ['start'])], 'start', 'final')
def load(self): self.done = 0 SafeZoneLoader.load(self) self.birdSound = map(base.loader.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.underwaterSound = base.loader.loadSfx('phase_4/audio/sfx/AV_ambient_water.ogg') self.swimSound = base.loader.loadSfx('phase_4/audio/sfx/AV_swim_single_stroke.ogg') self.submergeSound = base.loader.loadSfx('phase_5.5/audio/sfx/AV_jump_in_water.ogg') binMgr = CullBinManager.getGlobalPtr() binMgr.addBin('water', CullBinManager.BTFixed, 29) binMgr = CullBinManager.getGlobalPtr() water = self.geom.find('**/Water*') water.setTransparency(1) water.setColorScale(0, 0, 1, 0.9) water.setBin('water', 51, 1)
def __init__(self, hood, parentFSM, doneEvent): SafeZoneLoader.__init__(self, hood, parentFSM, doneEvent) self.musicFile = 'phase_6/audio/bgm/GS_SZ.mid' self.activityMusicFile = 'phase_6/audio/bgm/GS_KartShop.mid' self.dnaFile = 'phase_6/dna/goofy_speedway_sz.dna' self.safeZoneStorageDNAFile = 'phase_6/dna/storage_GS_sz.dna' del self.fsm self.fsm = ClassicFSM.ClassicFSM('SafeZoneLoader', [State.State('start', self.enterStart, self.exitStart, ['quietZone', 'playground', 'toonInterior']), State.State('playground', self.enterPlayground, self.exitPlayground, ['quietZone', 'racetrack']), State.State('toonInterior', self.enterToonInterior, self.exitToonInterior, ['quietZone']), 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 __init__( self, hood, parentFSM, doneEvent ): """ """ # Initialize Super Class SafeZoneLoader.__init__( self, hood, parentFSM, doneEvent ) # Initialize Instance Variables self.musicFile = "phase_6/audio/bgm/GS_SZ.mid" self.activityMusicFile = "phase_6/audio/bgm/GS_KartShop.mid" self.dnaFile = "phase_6/dna/goofy_speedway_sz.dna" self.safeZoneStorageDNAFile = "phase_6/dna/storage_GS_sz.dna" # Override Super Class FSM del self.fsm self.fsm = ClassicFSM.ClassicFSM('SafeZoneLoader', [State.State('start', self.enterStart, self.exitStart, ['quietZone', 'playground', 'toonInterior',]), State.State('playground', self.enterPlayground, self.exitPlayground, ['quietZone', 'racetrack' ]), State.State('toonInterior', self.enterToonInterior, self.exitToonInterior, ['quietZone']), 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'])], # Initial State 'start', # Final State 'final', ) self.smoke = None
def unload(self): del self.birdSound SafeZoneLoader.unload(self) self.done = 1 self.collBase.removeNode() if self.geyserTrack: self.geyserTrack.finish() self.geyserTrack = None self.geyserActor.cleanup() self.geyserModel.removeNode() self.waterfallActor.cleanup() self.waterfallModel.removeNode() self.bubbles.destroy() del self.bubbles self.geyserPoolSoundInterval.finish() self.geyserPoolSfx.stop() self.geyserPoolSfx = None self.geyserPoolSoundInterval = None self.geyserSoundInterval.finish() self.geyserSound.stop() self.geyserSoundInterval = None self.geyserSound = None self.geyserSoundNoToonInterval.finish() self.geyserSoundNoToon.stop() self.geyserSoundNoToonInterval = None self.geyserSoundNoToon = None if hasattr(self, 'constructionSite'): if hasattr(self, 'painterPete'): self.painterPeteSpeech.pause() self.painterPete.delete() self.paintersWantedSign.removeNode() self.ladder.removeNode() self.cone0.cleanup() self.cone1.cleanup() self.coneModel.removeNode() self.constructionSite.removeNode() del self.paintersWantedSign del self.ladder del self.cone0 del self.cone1 del self.coneModel del self.constructionSiteBlocker del self.constructionSite if self.constructionSign is not None: self.constructionSign.removeNode() self.constructionSign = None
def __init__(self, hood, parentFSM, doneEvent): """ """ # Initialize Super Class SafeZoneLoader.__init__(self, hood, parentFSM, doneEvent) # Initialize Instance Variables self.musicFile = "phase_6/audio/bgm/OZ_SZ.mid" self.activityMusicFile = "phase_6/audio/bgm/GS_KartShop.mid" self.dnaFile = "phase_6/dna/outdoor_zone_sz.dna" self.safeZoneStorageDNAFile = "phase_6/dna/storage_OZ_sz.dna" # Tracks on toons, for starting and stopping # stored by avId : track. There is only a need for one at a time, # in fact the point of the dict is to ensure only one is playing at a time self.__toonTracks = {} # Override Super Class FSM del self.fsm self.fsm = ClassicFSM.ClassicFSM( 'SafeZoneLoader', [ State.State('start', self.enterStart, self.exitStart, [ 'quietZone', 'playground', 'toonInterior', ]), State.State('playground', self.enterPlayground, self.exitPlayground, ['quietZone', 'golfcourse']), State.State('toonInterior', self.enterToonInterior, self.exitToonInterior, ['quietZone']), State.State('quietZone', self.enterQuietZone, self.exitQuietZone, ['playground', 'toonInterior', 'golfcourse']), State.State('golfcourse', self.enterGolfCourse, self.exitGolfCourse, ['quietZone', 'playground']), State.State('final', self.enterFinal, self.exitFinal, ['start']) ], # Initial State 'start', # Final State 'final', )
def unload(self): del self.birdSound SafeZoneLoader.unload(self) self.done = 1 self.collBase.removeNode() if self.geyserTrack: self.geyserTrack.finish() self.geyserTrack = None del self.geyserTrack if self.geyserActor is not None: self.geyserActor.cleanup() self.geyserActor = None del self.geyserActor if self.geyserModel is not None: self.geyserModel.removeNode() self.geyserModel = None del self.geyserModel if self.waterfallActor is not None: self.waterfallActor.cleanup() self.waterfallActor = None del self.waterfallActor if self.waterfallModel is not None: self.waterfallModel.removeNode() self.waterfallModel = None del self.waterfallModel if self.bubbles is not None: self.bubbles.destroy() self.bubbles = None del self.bubbles self.geyserPoolSoundInterval.finish() self.geyserPoolSfx.stop() self.geyserPoolSfx = None self.geyserPoolSoundInterval = None self.geyserSoundInterval.finish() self.geyserSound.stop() self.geyserSoundInterval = None self.geyserSound = None self.geyserSoundNoToonInterval.finish() self.geyserSoundNoToon.stop() self.geyserSoundNoToonInterval = None self.geyserSoundNoToon = None return
def enterPlayground(self, requestStatus): """ """ self.playgroundClass = GZPlayground SafeZoneLoader.enterPlayground(self, requestStatus) # add the bbhq sign top = self.geom.find("**/linktunnel_bosshq_10000_DNARoot") sign = top.find("**/Sign_5") sign.node().setEffect(DecalEffect.make()) locator = top.find("**/sign_origin") signText = DirectGui.OnscreenText( text=TextEncoder.upper(TTLocalizer.BossbotHQ[-1]), font=ToontownGlobals.getSuitFont(), scale=TTLocalizer.GSZLbossbotSignScale, fg=(0, 0, 0, 1), # required for DecalEffect (must be a GeomNode, not a TextNode) mayChange=False, parent=sign) signText.setPosHpr(locator, 0, 0, -0.3, 0, 0, 0) signText.setDepthWrite(0)
def __init__(self, hood, parentFSM, doneEvent): SafeZoneLoader.__init__(self, hood, parentFSM, doneEvent) self.musicFile = "phase_6/audio/bgm/GZ_SZ.ogg" self.activityMusicFile = "phase_6/audio/bgm/GS_KartShop.ogg" self.dnaFile = "phase_6/dna/golf_zone_sz.dna" self.safeZoneStorageDNAFile = "phase_6/dna/storage_GZ_sz.dna" del self.fsm self.fsm = ClassicFSM.ClassicFSM( "SafeZoneLoader", [ State.State("start", self.enterStart, self.exitStart, ["quietZone", "playground", "toonInterior"]), State.State("playground", self.enterPlayground, self.exitPlayground, ["quietZone", "golfcourse"]), State.State("toonInterior", self.enterToonInterior, self.exitToonInterior, ["quietZone"]), State.State( "quietZone", self.enterQuietZone, self.exitQuietZone, ["playground", "toonInterior", "golfcourse"] ), State.State("golfcourse", self.enterGolfCourse, self.exitGolfCourse, ["quietZone", "playground"]), State.State("final", self.enterFinal, self.exitFinal, ["start"]), ], "start", "final", )
def __init__(self, hood, parentFSM, doneEvent): """ """ # Initialize Super Class SafeZoneLoader.__init__(self, hood, parentFSM, doneEvent) # Initialize Instance Variables self.musicFile = "phase_6/audio/bgm/GZ_SZ.ogg" self.activityMusicFile = "phase_6/audio/bgm/GS_KartShop.ogg" self.dnaFile = "phase_6/dna/golf_zone_sz.dna" self.safeZoneStorageDNAFile = "phase_6/dna/storage_GZ_sz.dna" # Override Super Class FSM del self.fsm self.fsm = ClassicFSM.ClassicFSM( 'SafeZoneLoader', [ State.State('start', self.enterStart, self.exitStart, [ 'quietZone', 'playground', 'toonInterior', ]), State.State('playground', self.enterPlayground, self.exitPlayground, ['quietZone', 'golfcourse']), State.State('toonInterior', self.enterToonInterior, self.exitToonInterior, ['quietZone']), State.State('quietZone', self.enterQuietZone, self.exitQuietZone, ['playground', 'toonInterior', 'golfcourse']), State.State('golfcourse', self.enterGolfCourse, self.exitGolfCourse, ['quietZone', 'playground']), State.State('final', self.enterFinal, self.exitFinal, ['start']) ], # Initial State 'start', # Final State 'final', )
def __init__(self, hood, parentFSM, doneEvent): SafeZoneLoader.__init__(self, hood, parentFSM, doneEvent) self.musicFile = "phase_6/audio/bgm/GS_SZ.ogg" self.activityMusicFile = "phase_6/audio/bgm/GS_KartShop.ogg" self.dnaFile = "phase_6/dna/goofy_speedway_sz.pdna" self.safeZoneStorageDNAFile = "phase_6/dna/storage_GS_sz.pdna" del self.fsm self.fsm = ClassicFSM.ClassicFSM( "SafeZoneLoader", [ State.State("start", self.enterStart, self.exitStart, ["quietZone", "playground", "toonInterior"]), State.State("playground", self.enterPlayground, self.exitPlayground, ["quietZone", "racetrack"]), State.State("toonInterior", self.enterToonInterior, self.exitToonInterior, ["quietZone"]), 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 exitPlayground(self): taskMgr.remove('titleText') self.hood.hideTitleText() SafeZoneLoader.exitPlayground(self) self.playgroundClass = None return
def unload(self): del self.birdSound SafeZoneLoader.unload(self) self.done = 1
def exit(self): SafeZoneLoader.exit(self)
def load(self): self.done = 0 self.geyserTrack = None SafeZoneLoader.load(self) self.birdSound = map(base.loader.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.underwaterSound = base.loader.loadSfx( 'phase_4/audio/sfx/AV_ambient_water.ogg') self.swimSound = base.loader.loadSfx( 'phase_4/audio/sfx/AV_swim_single_stroke.ogg') self.submergeSound = base.loader.loadSfx( 'phase_5.5/audio/sfx/AV_jump_in_water.ogg') geyserPlacer = self.geom.find('**/geyser*') waterfallPlacer = self.geom.find('**/waterfall*') binMgr = CullBinManager.getGlobalPtr() binMgr.addBin('water', CullBinManager.BTFixed, 29) pool = self.geom.find('**/pPlane5*') pool.setTransparency(1) pool.setColorScale(1.0, 1.0, 1.0, 1.0) pool.setBin('water', 50, 1) self.geyserModel = loader.loadModel( 'phase_6/models/golf/golf_geyser_model') self.geyserSound = loader.loadSfx('phase_6/audio/sfx/OZ_Geyser.ogg') self.geyserSoundInterval = SoundInterval(self.geyserSound, node=geyserPlacer, listenerNode=base.camera, seamlessLoop=False, volume=1.0, cutOff=120) self.geyserSoundNoToon = loader.loadSfx( 'phase_6/audio/sfx/OZ_Geyser_No_Toon.ogg') self.geyserSoundNoToonInterval = SoundInterval( self.geyserSoundNoToon, node=geyserPlacer, listenerNode=base.camera, seamlessLoop=False, volume=1.0, cutOff=120) if self.geyserModel: self.geyserActor = Actor.Actor(self.geyserModel) self.geyserActor.loadAnims( {'idle': 'phase_6/models/golf/golf_geyser'}) self.geyserActor.reparentTo(render) self.geyserActor.setPlayRate(8.6, 'idle') self.geyserActor.loop('idle') self.geyserActor.setDepthWrite(0) self.geyserActor.setTwoSided(True, 11) self.geyserActor.setColorScale(1.0, 1.0, 1.0, 1.0) self.geyserActor.setBin('fixed', 0) mesh = self.geyserActor.find('**/mesh_tide1') joint = self.geyserActor.find('**/uvj_WakeWhiteTide1') mesh.setTexProjector(mesh.findTextureStage('default'), joint, self.geyserActor) self.geyserActor.setPos(geyserPlacer.getPos()) self.geyserActor.setZ(geyserPlacer.getZ() - 100.0) self.geyserPos = geyserPlacer.getPos() self.geyserPlacer = geyserPlacer self.startGeyser() base.sfxPlayer.setCutoffDistance(160) self.geyserPoolSfx = loader.loadSfx( 'phase_6/audio/sfx/OZ_Geyser_BuildUp_Loop.ogg') self.geyserPoolSoundInterval = SoundInterval( self.geyserPoolSfx, node=self.geyserPlacer, listenerNode=base.camera, seamlessLoop=True, volume=1.0, cutOff=120) self.geyserPoolSoundInterval.loop() self.bubbles = Bubbles.Bubbles(self.geyserPlacer, render) self.bubbles.renderParent.setDepthWrite(0) self.bubbles.start() self.collBase = render.attachNewNode('collisionBase') self.geyserCollSphere = CollisionSphere(0, 0, 0, 7.5) self.geyserCollSphere.setTangible(1) self.geyserCollNode = CollisionNode('barrelSphere') self.geyserCollNode.setIntoCollideMask(OTPGlobals.WallBitmask) self.geyserCollNode.addSolid(self.geyserCollSphere) self.geyserNodePath = self.collBase.attachNewNode(self.geyserCollNode) self.geyserNodePath.setPos(self.geyserPos[0], self.geyserPos[1], self.geyserPos[2] - 100.0) self.waterfallModel = loader.loadModel( 'phase_6/models/golf/golf_waterfall_model') if self.waterfallModel: self.waterfallActor = Actor.Actor(self.waterfallModel) self.waterfallActor.loadAnims( {'idle': 'phase_6/models/golf/golf_waterfall'}) self.waterfallActor.reparentTo(render) self.waterfallActor.setPlayRate(3.5, 'idle') self.waterfallActor.loop('idle') mesh = self.waterfallActor.find('**/mesh_tide1') joint = self.waterfallActor.find('**/uvj_WakeWhiteTide1') mesh.setTexProjector(mesh.findTextureStage('default'), joint, self.waterfallActor) self.waterfallActor.setPos(waterfallPlacer.getPos()) self.accept('clientLogout', self._handleLogout)
def exit(self): self.clearToonTracks() SafeZoneLoader.exit(self) self.ignore('clientLogout')
def load(self): self.done = 0 self.geyserTrack = None SafeZoneLoader.load(self) self.birdSound = map(base.loader.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.underwaterSound = base.loader.loadSfx( 'phase_4/audio/sfx/AV_ambient_water.ogg') self.swimSound = base.loader.loadSfx( 'phase_4/audio/sfx/AV_swim_single_stroke.ogg') self.submergeSound = base.loader.loadSfx( 'phase_5.5/audio/sfx/AV_jump_in_water.ogg') geyserPlacer = self.geom.find('**/geyser*') waterfallPlacer = self.geom.find('**/waterfall*') binMgr = CullBinManager.getGlobalPtr() binMgr.addBin('water', CullBinManager.BTFixed, 29) binMgr = CullBinManager.getGlobalPtr() water = self.geom.find('**/water1*') water.setTransparency(1) water.setColorScale(1, 1, 1, 1) water.setBin('water', 51, 1) pool = self.geom.find('**/pPlane5*') pool.setTransparency(1) pool.setColorScale(1.0, 1.0, 1.0, 1.0) pool.setBin('water', 50, 1) self.geyserModel = loader.loadModel( 'phase_6/models/golf/golf_geyser_model') self.geyserSound = loader.loadSfx('phase_6/audio/sfx/OZ_Geyser.ogg') self.geyserSoundInterval = SoundInterval(self.geyserSound, node=geyserPlacer, listenerNode=base.camera, seamlessLoop=False, volume=1.0, cutOff=120) self.geyserSoundNoToon = loader.loadSfx( 'phase_6/audio/sfx/OZ_Geyser_No_Toon.ogg') self.geyserSoundNoToonInterval = SoundInterval( self.geyserSoundNoToon, node=geyserPlacer, listenerNode=base.camera, seamlessLoop=False, volume=1.0, cutOff=120) if self.geyserModel: self.geyserActor = Actor.Actor(self.geyserModel) self.geyserActor.loadAnims( {'idle': 'phase_6/models/golf/golf_geyser'}) self.geyserActor.reparentTo(render) self.geyserActor.setPlayRate(8.6, 'idle') self.geyserActor.loop('idle') self.geyserActor.setDepthWrite(0) self.geyserActor.setTwoSided(True, 11) self.geyserActor.setColorScale(1.0, 1.0, 1.0, 1.0) self.geyserActor.setBin('fixed', 0) mesh = self.geyserActor.find('**/mesh_tide1') joint = self.geyserActor.find('**/uvj_WakeWhiteTide1') mesh.setTexProjector(mesh.findTextureStage('default'), joint, self.geyserActor) self.geyserActor.setPos(geyserPlacer.getPos()) self.geyserActor.setZ(geyserPlacer.getZ() - 100.0) self.geyserPos = geyserPlacer.getPos() self.geyserPlacer = geyserPlacer self.startGeyser() base.sfxPlayer.setCutoffDistance(160) self.geyserPoolSfx = loader.loadSfx( 'phase_6/audio/sfx/OZ_Geyser_BuildUp_Loop.ogg') self.geyserPoolSoundInterval = SoundInterval( self.geyserPoolSfx, node=self.geyserPlacer, listenerNode=base.camera, seamlessLoop=True, volume=1.0, cutOff=120) self.geyserPoolSoundInterval.loop() self.bubbles = Bubbles.Bubbles(self.geyserPlacer, render) self.bubbles.renderParent.setDepthWrite(0) self.bubbles.start() self.collBase = render.attachNewNode('collisionBase') self.geyserCollSphere = CollisionSphere(0, 0, 0, 7.5) self.geyserCollSphere.setTangible(1) self.geyserCollNode = CollisionNode('barrelSphere') self.geyserCollNode.setIntoCollideMask(OTPGlobals.WallBitmask) self.geyserCollNode.addSolid(self.geyserCollSphere) self.geyserNodePath = self.collBase.attachNewNode(self.geyserCollNode) self.geyserNodePath.setPos(self.geyserPos[0], self.geyserPos[1], self.geyserPos[2] - 100.0) self.waterfallModel = loader.loadModel( 'phase_6/models/golf/golf_waterfall_model') if self.waterfallModel: self.waterfallActor = Actor.Actor(self.waterfallModel) self.waterfallActor.loadAnims( {'idle': 'phase_6/models/golf/golf_waterfall'}) self.waterfallActor.reparentTo(render) self.waterfallActor.setPlayRate(3.5, 'idle') self.waterfallActor.loop('idle') mesh = self.waterfallActor.find('**/mesh_tide1') joint = self.waterfallActor.find('**/uvj_WakeWhiteTide1') mesh.setTexProjector(mesh.findTextureStage('default'), joint, self.waterfallActor) self.waterfallActor.setPos(waterfallPlacer.getPos()) self.accept('clientLogout', self._handleLogout) # If Chestnut Park is under construction, create the construction site: if base.config.GetBool('want-chestnut-park-construction', False): self.constructionSite = render.attachNewNode('constructionSite') self.constructionSiteBlocker = self.constructionSite.attachNewNode( CollisionNode('constructionSiteBlocker')) self.constructionSiteBlocker.setPos(-48, -154.5, 0) self.constructionSiteBlocker.node().addSolid( CollisionSphere(0, 0, 0, 35)) self.coneModel = loader.loadModel( 'phase_3.5/models/props/unpainted_barrier_cone.bam') self.cone0 = Actor.Actor(self.coneModel) self.cone0.loadAnims({ 'jumptwist': 'phase_3.5/models/props/barrier_cone_chan_jumptwist.bam' }) self.cone0.reparentTo(self.constructionSite) self.cone0.loop('jumptwist') self.cone0.setPos(-43, -142, 0.025) self.cone1 = Actor.Actor(self.coneModel) self.cone1.loadAnims({ 'walktrip': 'phase_3.5/models/props/barrier_cone_chan_walktrip.bam' }) self.cone1.reparentTo(self.constructionSite) self.cone1.loop('walktrip') self.cone1.setPos(-52, -145, 0.025) self.ladder = loader.loadModel('phase_5/models/props/ladder2.bam') self.ladder.reparentTo(self.constructionSite) self.ladder.setPosHpr(-36.460, -130.828, 0.30, 61, -90, 0) self.ladder.find('**/shadow').removeNode() self.paintersWantedSign = loader.loadModel( 'phase_6/models/props/tti_painters_wanted_sign.bam') self.paintersWantedSign.reparentTo(self.constructionSite) self.paintersWantedSign.setPosHpr(-57, -129.613, 0.025, 160, 0, 0) self.constructionSign = loader.loadModel( 'phase_4/models/props/construction_sign.bam') self.constructionSign.reparentTo(self.constructionSite) self.constructionSign.setPosHpr(-47.941, -138.724, 0.122, 181, 0, 0) if base.config.GetBool('want-oz-painter-pete', False): self.painterPete = Toon.Toon() self.painterPete.setName('Painter Pete') self.painterPete.setPickable(0) self.painterPete.setPlayerType(NametagGlobals.CCNonPlayer) dna = ToonDNA.ToonDNA() dna.newToonFromProperties('hls', 'ss', 'm', 'm', 18, 0, 13, 9, 0, 0, 0, 0, 2, 15) self.painterPete.setDNA(dna) self.painterPete.setHat(43, 0, 0) self.painterPete.animFSM.request('neutral') self.painterPete.reparentTo(self.constructionSite) self.painterPete.setPosHpr(-52.5, -133.5, 0.025, 338, 0, 0) self.painterPete.sadEyes() self.painterPete.blinkEyes() speechTextList = ( "Oh, brother. How am I going to clean up all of this? Those painters left a big mess here, and I can't finish the job without them!", "I'm beginning to feel nervous about where all of my painters went off to. Construction can't continue without them!", "These cones are out of my control. They're disobedient, and they will not listen to what I say.", "What's a playground without color, anyway? Walking into something like that would be surreal for you all. As a painter, though, I'm pretty used to it.", "The Cogs couldn't have done this... could they?", "If anyone sees my painters anywhere, please let me know. Then maybe we'll get this playground done!", "Looks like I'll have to finish this sign myself.", 'The documents for this project were just sitting right by this tunnel... Where could they have gone?' ) self.painterPeteSpeech = Sequence() for speechText in speechTextList: self.painterPeteSpeech.append( Func(self.painterPete.setChatAbsolute, speechText, CFSpeech)) self.painterPeteSpeech.append( Wait(0.55 * len(speechText.split(' ')))) self.painterPeteSpeech.append( Func(self.painterPete.clearChat)) self.painterPeteSpeech.append(Wait(6)) self.painterPeteSpeech.loop(0)
def load(self): self.done = 0 self.geyserTrack = None SafeZoneLoader.load(self) self.birdSound = map(base.loader.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.underwaterSound = base.loader.loadSfx('phase_4/audio/sfx/AV_ambient_water.ogg') self.swimSound = base.loader.loadSfx('phase_4/audio/sfx/AV_swim_single_stroke.ogg') self.submergeSound = base.loader.loadSfx('phase_5.5/audio/sfx/AV_jump_in_water.ogg') geyserPlacer = self.geom.find('**/geyser*') waterfallPlacer = self.geom.find('**/waterfall*') binMgr = CullBinManager.getGlobalPtr() binMgr.addBin('water', CullBinManager.BTFixed, 29) binMgr = CullBinManager.getGlobalPtr() water = self.geom.find('**/water1*') water.setTransparency(1) water.setColorScale(1, 1, 1, 1) water.setBin('water', 51, 1) pool = self.geom.find('**/pPlane5*') pool.setTransparency(1) pool.setColorScale(1.0, 1.0, 1.0, 1.0) pool.setBin('water', 50, 1) self.geyserModel = loader.loadModel('phase_6/models/golf/golf_geyser_model') self.geyserSound = loader.loadSfx('phase_6/audio/sfx/OZ_Geyser.ogg') self.geyserSoundInterval = SoundInterval(self.geyserSound, node=geyserPlacer, listenerNode=base.camera, seamlessLoop=False, volume=1.0, cutOff=120) self.geyserSoundNoToon = loader.loadSfx('phase_6/audio/sfx/OZ_Geyser_No_Toon.ogg') self.geyserSoundNoToonInterval = SoundInterval(self.geyserSoundNoToon, node=geyserPlacer, listenerNode=base.camera, seamlessLoop=False, volume=1.0, cutOff=120) if self.geyserModel: self.geyserActor = Actor.Actor(self.geyserModel) self.geyserActor.loadAnims({'idle': 'phase_6/models/golf/golf_geyser'}) self.geyserActor.reparentTo(render) self.geyserActor.setPlayRate(8.6, 'idle') self.geyserActor.loop('idle') self.geyserActor.setDepthWrite(0) self.geyserActor.setTwoSided(True, 11) self.geyserActor.setColorScale(1.0, 1.0, 1.0, 1.0) self.geyserActor.setBin('fixed', 0) mesh = self.geyserActor.find('**/mesh_tide1') joint = self.geyserActor.find('**/uvj_WakeWhiteTide1') mesh.setTexProjector(mesh.findTextureStage('default'), joint, self.geyserActor) self.geyserActor.setPos(geyserPlacer.getPos()) self.geyserActor.setZ(geyserPlacer.getZ() - 100.0) self.geyserPos = geyserPlacer.getPos() self.geyserPlacer = geyserPlacer self.startGeyser() base.sfxPlayer.setCutoffDistance(160) self.geyserPoolSfx = loader.loadSfx('phase_6/audio/sfx/OZ_Geyser_BuildUp_Loop.ogg') self.geyserPoolSoundInterval = SoundInterval(self.geyserPoolSfx, node=self.geyserPlacer, listenerNode=base.camera, seamlessLoop=True, volume=1.0, cutOff=120) self.geyserPoolSoundInterval.loop() self.bubbles = Bubbles.Bubbles(self.geyserPlacer, render) self.bubbles.renderParent.setDepthWrite(0) self.bubbles.start() self.collBase = render.attachNewNode('collisionBase') self.geyserCollSphere = CollisionSphere(0, 0, 0, 7.5) self.geyserCollSphere.setTangible(1) self.geyserCollNode = CollisionNode('barrelSphere') self.geyserCollNode.setIntoCollideMask(OTPGlobals.WallBitmask) self.geyserCollNode.addSolid(self.geyserCollSphere) self.geyserNodePath = self.collBase.attachNewNode(self.geyserCollNode) self.geyserNodePath.setPos(self.geyserPos[0], self.geyserPos[1], self.geyserPos[2] - 100.0) self.waterfallModel = loader.loadModel('phase_6/models/golf/golf_waterfall_model') if self.waterfallModel: self.waterfallActor = Actor.Actor(self.waterfallModel) self.waterfallActor.loadAnims({'idle': 'phase_6/models/golf/golf_waterfall'}) self.waterfallActor.reparentTo(render) self.waterfallActor.setPlayRate(3.5, 'idle') self.waterfallActor.loop('idle') mesh = self.waterfallActor.find('**/mesh_tide1') joint = self.waterfallActor.find('**/uvj_WakeWhiteTide1') mesh.setTexProjector(mesh.findTextureStage('default'), joint, self.waterfallActor) self.waterfallActor.setPos(waterfallPlacer.getPos()) self.accept('clientLogout', self._handleLogout) # If Chestnut Park is under construction, create the construction site: if base.config.GetBool('want-chestnut-park-construction', False): self.constructionSite = render.attachNewNode('constructionSite') self.constructionSiteBlocker = self.constructionSite.attachNewNode(CollisionNode('constructionSiteBlocker')) self.constructionSiteBlocker.setPos(-48, -154.5, 0) self.constructionSiteBlocker.node().addSolid(CollisionSphere(0, 0, 0, 35)) self.coneModel = loader.loadModel('phase_3.5/models/props/unpainted_barrier_cone.bam') self.cone0 = Actor.Actor(self.coneModel) self.cone0.loadAnims({'jumptwist': 'phase_3.5/models/props/barrier_cone_chan_jumptwist.bam'}) self.cone0.reparentTo(self.constructionSite) self.cone0.loop('jumptwist') self.cone0.setPos(-43, -142, 0.025) self.cone1 = Actor.Actor(self.coneModel) self.cone1.loadAnims({'walktrip': 'phase_3.5/models/props/barrier_cone_chan_walktrip.bam'}) self.cone1.reparentTo(self.constructionSite) self.cone1.loop('walktrip') self.cone1.setPos(-52, -145, 0.025) self.ladder = loader.loadModel('phase_5/models/props/ladder2.bam') self.ladder.reparentTo(self.constructionSite) self.ladder.setPosHpr(-36.460, -130.828, 0.30, 61, -90, 0) self.ladder.find('**/shadow').removeNode() self.paintersWantedSign = loader.loadModel('phase_6/models/props/tti_painters_wanted_sign.bam') self.paintersWantedSign.reparentTo(self.constructionSite) self.paintersWantedSign.setPosHpr(-57, -129.613, 0.025, 160, 0, 0) self.constructionSign = loader.loadModel('phase_4/models/props/construction_sign.bam') self.constructionSign.reparentTo(self.constructionSite) self.constructionSign.setPosHpr(-47.941, -138.724, 0.122, 181, 0, 0) if base.config.GetBool('want-oz-painter-pete', False): self.painterPete = Toon.Toon() self.painterPete.setName('Painter Pete') self.painterPete.setPickable(0) self.painterPete.setPlayerType(NametagGlobals.CCNonPlayer) dna = ToonDNA.ToonDNA() dna.newToonFromProperties('hls', 'ss', 'm', 'm', 18, 0, 13, 9, 0, 0, 0, 0, 2, 15) self.painterPete.setDNA(dna) self.painterPete.setHat(43, 0, 0) self.painterPete.animFSM.request('neutral') self.painterPete.reparentTo(self.constructionSite) self.painterPete.setPosHpr(-52.5, -133.5, 0.025, 338, 0, 0) self.painterPete.sadEyes() self.painterPete.blinkEyes() speechTextList = ( "Oh, brother. How am I going to clean up all of this? Those painters left a big mess here, and I can't finish the job without them!", "I'm beginning to feel nervous about where all of my painters went off to. Construction can't continue without them!", "These cones are out of my control. They're disobedient, and they will not listen to what I say.", "What's a playground without color, anyway? Walking into something like that would be surreal for you all. As a painter, though, I'm pretty used to it.", "The Cogs couldn't have done this... could they?", "If anyone sees my painters anywhere, please let me know. Then maybe we'll get this playground done!", "Looks like I'll have to finish this sign myself.", 'The documents for this project were just sitting right by this tunnel... Where could they have gone?' ) self.painterPeteSpeech = Sequence() for speechText in speechTextList: self.painterPeteSpeech.append(Func(self.painterPete.setChatAbsolute, speechText, CFSpeech)) self.painterPeteSpeech.append(Wait(0.55 * len(speechText.split(' ')))) self.painterPeteSpeech.append(Func(self.painterPete.clearChat)) self.painterPeteSpeech.append(Wait(6)) self.painterPeteSpeech.loop(0)
def unload(self): del self.birdSound SafeZoneLoader.unload(self)
def load(self): SafeZoneLoader.load(self) 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 load(self): self.done = 0 self.geyserTrack = None SafeZoneLoader.load(self) 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.underwaterSound = base.loadSfx('phase_4/audio/sfx/AV_ambient_water.ogg') self.swimSound = base.loadSfx('phase_4/audio/sfx/AV_swim_single_stroke.ogg') self.submergeSound = base.loadSfx('phase_5.5/audio/sfx/AV_jump_in_water.ogg') geyserPlacer = self.geom.find('**/geyser*') waterfallPlacer = self.geom.find('**/waterfall*') binMgr = CullBinManager.getGlobalPtr() binMgr.addBin('water', CullBinManager.BTFixed, 29) water = self.geom.find('**/water1*') water.setTransparency(1) water.setColorScale(1.0, 1.0, 1.0, 1.0) water.setBin('water', 51, 1) pool = self.geom.find('**/pPlane5*') pool.setTransparency(1) pool.setColorScale(1.0, 1.0, 1.0, 1.0) pool.setBin('water', 50, 1) self.geyserModel = loader.loadModel('phase_6/models/golf/golf_geyser_model') self.geyserSound = loader.loadSfx('phase_6/audio/sfx/OZ_Geyser.ogg') self.geyserSoundInterval = SoundInterval(self.geyserSound, node=geyserPlacer, listenerNode=base.camera, seamlessLoop=False, volume=1.0, cutOff=120) self.geyserSoundNoToon = loader.loadSfx('phase_6/audio/sfx/OZ_Geyser_No_Toon.ogg') self.geyserSoundNoToonInterval = SoundInterval(self.geyserSoundNoToon, node=geyserPlacer, listenerNode=base.camera, seamlessLoop=False, volume=1.0, cutOff=120) if self.geyserModel: self.geyserActor = Actor.Actor(self.geyserModel) self.geyserActor.loadAnims({'idle': 'phase_6/models/golf/golf_geyser'}) self.geyserActor.reparentTo(render) self.geyserActor.setPlayRate(8.6, 'idle') self.geyserActor.loop('idle') self.geyserActor.setDepthWrite(0) self.geyserActor.setTwoSided(True, 11) self.geyserActor.setColorScale(1.0, 1.0, 1.0, 1.0) self.geyserActor.setBin('fixed', 0) mesh = self.geyserActor.find('**/mesh_tide1') joint = self.geyserActor.find('**/uvj_WakeWhiteTide1') mesh.setTexProjector(mesh.findTextureStage('default'), joint, self.geyserActor) self.geyserActor.setPos(geyserPlacer.getPos()) self.geyserActor.setZ(geyserPlacer.getZ() - 100.0) self.geyserPos = geyserPlacer.getPos() self.geyserPlacer = geyserPlacer self.startGeyser() base.sfxPlayer.setCutoffDistance(160) self.geyserPoolSfx = loader.loadSfx('phase_6/audio/sfx/OZ_Geyser_BuildUp_Loop.ogg') self.geyserPoolSoundInterval = SoundInterval(self.geyserPoolSfx, node=self.geyserPlacer, listenerNode=base.camera, seamlessLoop=True, volume=1.0, cutOff=120) self.geyserPoolSoundInterval.loop() self.bubbles = Bubbles.Bubbles(self.geyserPlacer, render) self.bubbles.renderParent.setDepthWrite(0) self.bubbles.start() self.collBase = render.attachNewNode('collisionBase') self.geyserCollSphere = CollisionSphere(0, 0, 0, 7.5) self.geyserCollSphere.setTangible(1) self.geyserCollNode = CollisionNode('barrelSphere') self.geyserCollNode.setIntoCollideMask(OTPGlobals.WallBitmask) self.geyserCollNode.addSolid(self.geyserCollSphere) self.geyserNodePath = self.collBase.attachNewNode(self.geyserCollNode) self.geyserNodePath.setPos(self.geyserPos[0], self.geyserPos[1], self.geyserPos[2] - 100.0) self.waterfallModel = loader.loadModel('phase_6/models/golf/golf_waterfall_model') if self.waterfallModel: self.waterfallActor = Actor.Actor(self.waterfallModel) self.waterfallActor.loadAnims({'idle': 'phase_6/models/golf/golf_waterfall'}) self.waterfallActor.reparentTo(render) self.waterfallActor.setPlayRate(3.5, 'idle') self.waterfallActor.loop('idle') mesh = self.waterfallActor.find('**/mesh_tide1') joint = self.waterfallActor.find('**/uvj_WakeWhiteTide1') mesh.setTexProjector(mesh.findTextureStage('default'), joint, self.waterfallActor) self.waterfallActor.setPos(waterfallPlacer.getPos()) self.accept('clientLogout', self._handleLogout) return
def enterPlayground(self, requestStatus): self.playgroundClass = GSPlayground SafeZoneLoader.enterPlayground(self, requestStatus)
def unload(self): del self.birdSound if self.smoke != None: self.stopSmokeEffect() SafeZoneLoader.unload(self) return
def unload(self): """ """ del self.birdSound SafeZoneLoader.unload(self)
def load(self): SafeZoneLoader.load(self) self.birdSound = map(base.loadSfx, ['phase_4/audio/sfx/SZ_TC_bird1.mp3', 'phase_4/audio/sfx/SZ_TC_bird2.mp3', 'phase_4/audio/sfx/SZ_TC_bird3.mp3'])
def load(self): self.done = 0 self.geyserTrack = None SafeZoneLoader.load(self) 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.underwaterSound = base.loadSfx( 'phase_4/audio/sfx/AV_ambient_water.ogg') self.swimSound = base.loadSfx( 'phase_4/audio/sfx/AV_swim_single_stroke.ogg') self.submergeSound = base.loadSfx( 'phase_5.5/audio/sfx/AV_jump_in_water.ogg') geyserPlacer = self.geom.find('**/geyser*') waterfallPlacer = self.geom.find('**/waterfall*') binMgr = CullBinManager.getGlobalPtr() binMgr.addBin('water', CullBinManager.BTFixed, 29) binMgr = CullBinManager.getGlobalPtr() water = self.geom.find('**/water1') water.setTransparency(1) water.setColorScale(1, 1, 1, 1) water.setBin('water', 51, 1) pool = self.geom.find('**/pPlane5*') pool.setTransparency(1) pool.setColorScale(1.0, 1.0, 1.0, 1.0) pool.setBin('water', 50, 1) self.geyserModel = loader.loadModel( 'phase_6/models/golf/golf_geyser_model') self.geyserSound = loader.loadSfx('phase_6/audio/sfx/OZ_Geyser.ogg') self.geyserSoundInterval = SoundInterval(self.geyserSound, node=geyserPlacer, listenerNode=base.camera, seamlessLoop=False, volume=1.0, cutOff=120) self.geyserSoundNoToon = loader.loadSfx( 'phase_6/audio/sfx/OZ_Geyser_No_Toon.ogg') self.geyserSoundNoToonInterval = SoundInterval( self.geyserSoundNoToon, node=geyserPlacer, listenerNode=base.camera, seamlessLoop=False, volume=1.0, cutOff=120) if self.geyserModel: self.geyserActor = Actor.Actor(self.geyserModel) self.geyserActor.loadAnims( {'idle': 'phase_6/models/golf/golf_geyser'}) self.geyserActor.reparentTo(render) self.geyserActor.setPlayRate(8.6, 'idle') self.geyserActor.loop('idle') self.geyserActor.setDepthWrite(0) self.geyserActor.setTwoSided(True, 11) self.geyserActor.setColorScale(1.0, 1.0, 1.0, 1.0) self.geyserActor.setBin('fixed', 0) mesh = self.geyserActor.find('**/mesh_tide1') joint = self.geyserActor.find('**/uvj_WakeWhiteTide1') mesh.setTexProjector(mesh.findTextureStage('default'), joint, self.geyserActor) self.geyserActor.setPos(geyserPlacer.getPos()) self.geyserActor.setZ(geyserPlacer.getZ() - 100.0) self.geyserPos = geyserPlacer.getPos() self.geyserPlacer = geyserPlacer self.startGeyser() base.sfxPlayer.setCutoffDistance(160) self.geyserPoolSfx = loader.loadSfx( 'phase_6/audio/sfx/OZ_Geyser_BuildUp_Loop.ogg') self.geyserPoolSoundInterval = SoundInterval( self.geyserPoolSfx, node=self.geyserPlacer, listenerNode=base.camera, seamlessLoop=True, volume=1.0, cutOff=120) self.geyserPoolSoundInterval.loop() self.bubbles = Bubbles.Bubbles(self.geyserPlacer, render) self.bubbles.renderParent.setDepthWrite(0) self.bubbles.start() self.collBase = render.attachNewNode('collisionBase') self.geyserCollSphere = CollisionSphere(0, 0, 0, 7.5) self.geyserCollSphere.setTangible(1) self.geyserCollNode = CollisionNode('barrelSphere') self.geyserCollNode.setIntoCollideMask(OTPGlobals.WallBitmask) self.geyserCollNode.addSolid(self.geyserCollSphere) self.geyserNodePath = self.collBase.attachNewNode(self.geyserCollNode) self.geyserNodePath.setPos(self.geyserPos[0], self.geyserPos[1], self.geyserPos[2] - 100.0) self.waterfallModel = loader.loadModel( 'phase_6/models/golf/golf_waterfall_model') if self.waterfallModel: self.waterfallActor = Actor.Actor(self.waterfallModel) self.waterfallActor.loadAnims( {'idle': 'phase_6/models/golf/golf_waterfall'}) self.waterfallActor.reparentTo(render) self.waterfallActor.setPlayRate(3.5, 'idle') self.waterfallActor.loop('idle') mesh = self.waterfallActor.find('**/mesh_tide1') joint = self.waterfallActor.find('**/uvj_WakeWhiteTide1') mesh.setTexProjector(mesh.findTextureStage('default'), joint, self.waterfallActor) self.waterfallActor.setPos(waterfallPlacer.getPos()) self.accept('clientLogout', self._handleLogout) # If Chestnut Park is under construction, create the construction site: if base.config.GetBool('want-chestnut-park-construction', False): if base.config.GetBool('want-oz-painter-pete', False): self.painterPete = Toon.Toon() self.painterPete.setName('Painter Pete') self.painterPete.setPickable(0) self.painterPete.setPlayerType(NametagGlobals.CCNonPlayer) dna = ToonDNA.ToonDNA() dna.newToonFromProperties('hls', 'ss', 'm', 'm', 18, 0, 13, 9, 0, 0, 0, 0, 2, 15) self.painterPete.setDNA(dna) self.painterPete.setHat(43, 0, 0) self.painterPete.animFSM.request('neutral') self.painterPete.reparentTo(self.constructionSite) self.painterPete.setPosHpr(-52.5, -133.5, 0.025, 338, 0, 0) self.painterPete.sadEyes() self.painterPete.blinkEyes() return