toontown\coghq is fully converted

This commit is contained in:
John Cote 2015-06-25 22:12:22 -04:00
parent 46cb2afda6
commit d109dd2a16
12 changed files with 25 additions and 30 deletions

View file

@ -10,7 +10,6 @@ import FactoryEntityCreator
import CountryClubRoomSpecs import CountryClubRoomSpecs
from otp.level import LevelSpec, LevelConstants from otp.level import LevelSpec, LevelConstants
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
from toontown.nametag.NametagGlobals import *
def getCountryClubRoomReadyPostName(doId): def getCountryClubRoomReadyPostName(doId):
return 'countryClubRoomReady-%s' % doId return 'countryClubRoomReady-%s' % doId

View file

@ -14,8 +14,6 @@ from toontown.toonbase import TTLocalizer
from toontown.coghq import FactoryCameraViews from toontown.coghq import FactoryCameraViews
from direct.controls.ControlManager import CollisionHandlerRayStart from direct.controls.ControlManager import CollisionHandlerRayStart
from otp.ai.MagicWordGlobal import * from otp.ai.MagicWordGlobal import *
from toontown.nametag.NametagGlobals import *
from toontown.chat.ChatGlobals import CFThought, CFTimeout
class DistributedFactory(DistributedLevel.DistributedLevel, FactoryBase.FactoryBase): class DistributedFactory(DistributedLevel.DistributedLevel, FactoryBase.FactoryBase):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFactory') notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFactory')

View file

@ -7,7 +7,7 @@ from pandac.PandaModules import CollisionSphere, CollisionNode
from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals
from toontown.estate import DistributedCannon from toontown.estate import DistributedCannon
from toontown.estate import CannonGlobals from toontown.estate import CannonGlobals
from toontown.nametag import NametagGlobals from otp.nametag import NametagGlobals
from direct.gui.DirectGui import * from direct.gui.DirectGui import *
from panda3d.core import * from panda3d.core import *
from toontown.toon import NPCToons from toontown.toon import NPCToons
@ -253,7 +253,7 @@ class DistributedLawbotCannon(DistributedObject.DistributedObject):
def __makeGui(self): def __makeGui(self):
if self.madeGui: if self.madeGui:
return return
NametagGlobals.setWant2dNametags(False) NametagGlobals.setMasterArrowsOn(0)
guiModel = 'phase_4/models/gui/cannon_game_gui' guiModel = 'phase_4/models/gui/cannon_game_gui'
cannonGui = loader.loadModel(guiModel) cannonGui = loader.loadModel(guiModel)
self.aimPad = DirectFrame(image=cannonGui.find('**/CannonFire_PAD'), relief=None, pos=(0.7, 0, -0.553333), scale=0.8) self.aimPad = DirectFrame(image=cannonGui.find('**/CannonFire_PAD'), relief=None, pos=(0.7, 0, -0.553333), scale=0.8)
@ -297,7 +297,7 @@ class DistributedLawbotCannon(DistributedObject.DistributedObject):
if self.flashingLabel: if self.flashingLabel:
self.flashingLabel.finish() self.flashingLabel.finish()
self.flashingLabel = None self.flashingLabel = None
NametagGlobals.setWant2dNametags(True) NametagGlobals.setMasterArrowsOn(1)
self.__disableAimInterface() self.__disableAimInterface()
self.upButton.unbind(DGG.B1PRESS) self.upButton.unbind(DGG.B1PRESS)
self.upButton.unbind(DGG.B1RELEASE) self.upButton.unbind(DGG.B1RELEASE)

View file

@ -9,9 +9,8 @@ from otp.avatar import Emote
from toontown.battle import DistributedBattle from toontown.battle import DistributedBattle
from toontown.battle import SuitBattleGlobals from toontown.battle import SuitBattleGlobals
from toontown.battle.BattleBase import * from toontown.battle.BattleBase import *
from toontown.chat.ChatGlobals import * from otp.nametag.NametagConstants import *
from toontown.nametag import NametagGlobals from otp.nametag import NametagGlobals
from toontown.nametag.NametagGlobals import *
from toontown.suit import SuitDNA from toontown.suit import SuitDNA
from toontown.toon import TTEmote from toontown.toon import TTEmote
from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals
@ -179,7 +178,7 @@ class DistributedLevelBattle(DistributedBattle.DistributedBattle):
camTrack.append(Func(camera.lookAt, suit)) camTrack.append(Func(camera.lookAt, suit))
mtrack = Parallel(suitTrack, toonTrack) mtrack = Parallel(suitTrack, toonTrack)
if self.hasLocalToon(): if self.hasLocalToon():
NametagGlobals.setWant2dNametags(False) NametagGlobals.setMasterArrowsOn(0)
mtrack = Parallel(mtrack, camTrack) mtrack = Parallel(mtrack, camTrack)
done = Func(callback) done = Func(callback)
track = Sequence(mtrack, done, name=name) track = Sequence(mtrack, done, name=name)
@ -229,6 +228,6 @@ class DistributedLevelBattle(DistributedBattle.DistributedBattle):
self.notify.info('exitReward()') self.notify.info('exitReward()')
self.clearInterval(self.uniqueName('floorReward')) self.clearInterval(self.uniqueName('floorReward'))
self._removeMembersKeep() self._removeMembersKeep()
NametagGlobals.setWant2dNametags(True) NametagGlobals.setMasterArrowsOn(1)
for toon in self.toons: for toon in self.toons:
toon.startSmooth() toon.startSmooth()

View file

@ -11,7 +11,7 @@ from toontown.suit import SuitDNA
from direct.fsm import State from direct.fsm import State
from direct.fsm import ClassicFSM, State from direct.fsm import ClassicFSM, State
from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals
from toontown.nametag import NametagGlobals from otp.nametag import NametagGlobals
class DistributedMintBattle(DistributedLevelBattle.DistributedLevelBattle): class DistributedMintBattle(DistributedLevelBattle.DistributedLevelBattle):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMintBattle') notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMintBattle')
@ -29,7 +29,7 @@ class DistributedMintBattle(DistributedLevelBattle.DistributedLevelBattle):
self.disableCollision() self.disableCollision()
self.delayDeleteMembers() self.delayDeleteMembers()
if self.hasLocalToon(): if self.hasLocalToon():
NametagGlobals.setWant2dNametags(False) NametagGlobals.setMasterArrowsOn(0)
if self.bossBattle: if self.bossBattle:
messenger.send('localToonConfrontedMintBoss') messenger.send('localToonConfrontedMintBoss')
self.movie.playReward(ts, self.uniqueName('building-reward'), self.__handleMintRewardDone, noSkip=True) self.movie.playReward(ts, self.uniqueName('building-reward'), self.__handleMintRewardDone, noSkip=True)
@ -45,4 +45,4 @@ class DistributedMintBattle(DistributedLevelBattle.DistributedLevelBattle):
self.notify.debug('exitMintReward()') self.notify.debug('exitMintReward()')
self.movie.resetReward(finish=1) self.movie.resetReward(finish=1)
self._removeMembersKeep() self._removeMembersKeep()
NametagGlobals.setWant2dNametags(True) NametagGlobals.setMasterArrowsOn(1)

View file

@ -9,7 +9,6 @@ import MintRoomBase, MintRoom
import MintRoomSpecs import MintRoomSpecs
from otp.level import DistributedLevel from otp.level import DistributedLevel
from otp.level import LevelSpec, LevelConstants from otp.level import LevelSpec, LevelConstants
from toontown.nametag.NametagGlobals import *
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
from toontown.toonbase.ToontownGlobals import * from toontown.toonbase.ToontownGlobals import *

View file

@ -11,7 +11,7 @@ from toontown.suit import SuitDNA
from direct.fsm import State from direct.fsm import State
from direct.fsm import ClassicFSM, State from direct.fsm import ClassicFSM, State
from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals
from toontown.nametag import NametagGlobals from otp.nametag import NametagGlobals
class DistributedStageBattle(DistributedLevelBattle.DistributedLevelBattle): class DistributedStageBattle(DistributedLevelBattle.DistributedLevelBattle):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStageBattle') notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStageBattle')
@ -29,7 +29,7 @@ class DistributedStageBattle(DistributedLevelBattle.DistributedLevelBattle):
self.disableCollision() self.disableCollision()
self.delayDeleteMembers() self.delayDeleteMembers()
if self.hasLocalToon(): if self.hasLocalToon():
NametagGlobals.setWant2dNametags(False) NametagGlobals.setMasterArrowsOn(0)
if self.bossBattle: if self.bossBattle:
messenger.send('localToonConfrontedStageBoss') messenger.send('localToonConfrontedStageBoss')
self.movie.playReward(ts, self.uniqueName('building-reward'), self.__handleStageRewardDone, noSkip=True) self.movie.playReward(ts, self.uniqueName('building-reward'), self.__handleStageRewardDone, noSkip=True)
@ -45,4 +45,4 @@ class DistributedStageBattle(DistributedLevelBattle.DistributedLevelBattle):
self.notify.debug('exitStageReward()') self.notify.debug('exitStageReward()')
self.movie.resetReward(finish=1) self.movie.resetReward(finish=1)
self._removeMembersKeep() self._removeMembersKeep()
NametagGlobals.setWant2dNametags(True) NametagGlobals.setMasterArrowsOn(1)

View file

@ -10,7 +10,6 @@ import FactoryEntityCreator
import StageRoomSpecs import StageRoomSpecs
from otp.level import LevelSpec, LevelConstants from otp.level import LevelSpec, LevelConstants
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
from toontown.nametag.NametagGlobals import *
def getStageRoomReadyPostName(doId): def getStageRoomReadyPostName(doId):
return 'stageRoomReady-%s' % doId return 'stageRoomReady-%s' % doId

View file

@ -2,7 +2,7 @@ from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State from direct.fsm import ClassicFSM, State
from direct.fsm import State from direct.fsm import State
from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs
from toontown.nametag import NametagGlobals from otp.nametag import NametagGlobals
from panda3d.core import * from panda3d.core import *
from toontown.battle import BattlePlace from toontown.battle import BattlePlace
from toontown.building import Elevator from toontown.building import Elevator
@ -93,7 +93,7 @@ class FactoryExterior(BattlePlace.BattlePlace):
self._telemLimiter = TLGatherAllAvs('FactoryExterior', RotationLimitToH) self._telemLimiter = TLGatherAllAvs('FactoryExterior', RotationLimitToH)
self.accept('doorDoneEvent', self.handleDoorDoneEvent) self.accept('doorDoneEvent', self.handleDoorDoneEvent)
self.accept('DistributedDoor_doorTrigger', self.handleDoorTrigger) self.accept('DistributedDoor_doorTrigger', self.handleDoorTrigger)
NametagGlobals.setWant2dNametags(True) NametagGlobals.setMasterArrowsOn(1)
self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.nodeList) self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.nodeList)
how = requestStatus['how'] how = requestStatus['how']
self.fsm.request(how, [requestStatus]) self.fsm.request(how, [requestStatus])

View file

@ -11,7 +11,8 @@ from toontown.toonbase import TTLocalizer
from toontown.toontowngui import TTDialog from toontown.toontowngui import TTDialog
from toontown.toonbase import ToontownBattleGlobals from toontown.toonbase import ToontownBattleGlobals
from toontown.building import Elevator from toontown.building import Elevator
from toontown.nametag import NametagGlobals from otp.nametag.NametagConstants import *
from otp.nametag import NametagGlobals
class FactoryInterior(BattlePlace.BattlePlace): class FactoryInterior(BattlePlace.BattlePlace):
notify = DirectNotifyGlobal.directNotify.newCategory('FactoryInterior') notify = DirectNotifyGlobal.directNotify.newCategory('FactoryInterior')
@ -79,7 +80,7 @@ class FactoryInterior(BattlePlace.BattlePlace):
self._telemLimiter = TLGatherAllAvs('FactoryInterior', RotationLimitToH) self._telemLimiter = TLGatherAllAvs('FactoryInterior', RotationLimitToH)
def commence(self = self): def commence(self = self):
NametagGlobals.setWant2dNametags(True) NametagGlobals.setMasterArrowsOn(1)
self.fsm.request(requestStatus['how'], [requestStatus]) self.fsm.request(requestStatus['how'], [requestStatus])
base.playMusic(self.music, looping=1, volume=0.8) base.playMusic(self.music, looping=1, volume=0.8)
base.transitions.irisIn() base.transitions.irisIn()
@ -100,7 +101,7 @@ class FactoryInterior(BattlePlace.BattlePlace):
self.acceptOnce('localToonConfrontedForeman', handleConfrontedForeman) self.acceptOnce('localToonConfrontedForeman', handleConfrontedForeman)
def exit(self): def exit(self):
NametagGlobals.setWant2dNametags(False) NametagGlobals.setMasterArrowsOn(0)
self._telemLimiter.destroy() self._telemLimiter.destroy()
del self._telemLimiter del self._telemLimiter
if hasattr(base, 'factoryReady'): if hasattr(base, 'factoryReady'):

View file

@ -12,7 +12,7 @@ from toontown.toonbase import TTLocalizer
from toontown.toontowngui import TTDialog from toontown.toontowngui import TTDialog
from toontown.toonbase import ToontownBattleGlobals from toontown.toonbase import ToontownBattleGlobals
from toontown.coghq import DistributedMint from toontown.coghq import DistributedMint
from toontown.nametag import NametagGlobals from otp.nametag import NametagGlobals
class MintInterior(BattlePlace.BattlePlace): class MintInterior(BattlePlace.BattlePlace):
notify = DirectNotifyGlobal.directNotify.newCategory('MintInterior') notify = DirectNotifyGlobal.directNotify.newCategory('MintInterior')
@ -80,7 +80,7 @@ class MintInterior(BattlePlace.BattlePlace):
self._telemLimiter = TLGatherAllAvs('MintInterior', RotationLimitToH) self._telemLimiter = TLGatherAllAvs('MintInterior', RotationLimitToH)
def commence(self = self): def commence(self = self):
NametagGlobals.setWant2dNametags(True) NametagGlobals.setMasterArrowsOn(1)
self.fsm.request(requestStatus['how'], [requestStatus]) self.fsm.request(requestStatus['how'], [requestStatus])
base.playMusic(self.music, looping=1, volume=0.8) base.playMusic(self.music, looping=1, volume=0.8)
base.transitions.irisIn() base.transitions.irisIn()
@ -100,7 +100,7 @@ class MintInterior(BattlePlace.BattlePlace):
self.acceptOnce('localToonConfrontedMintBoss', handleConfrontedBoss) self.acceptOnce('localToonConfrontedMintBoss', handleConfrontedBoss)
def exit(self): def exit(self):
NametagGlobals.setWant2dNametags(False) NametagGlobals.setMasterArrowsOn(0)
bboard.remove(DistributedMint.DistributedMint.ReadyPost) bboard.remove(DistributedMint.DistributedMint.ReadyPost)
self._telemLimiter.destroy() self._telemLimiter.destroy()
del self._telemLimiter del self._telemLimiter

View file

@ -13,7 +13,7 @@ from toontown.toontowngui import TTDialog
from toontown.toonbase import ToontownBattleGlobals from toontown.toonbase import ToontownBattleGlobals
from toontown.coghq import DistributedStage from toontown.coghq import DistributedStage
from toontown.building import Elevator from toontown.building import Elevator
from toontown.nametag import NametagGlobals from otp.nametag import NametagGlobals
class StageInterior(BattlePlace.BattlePlace): class StageInterior(BattlePlace.BattlePlace):
notify = DirectNotifyGlobal.directNotify.newCategory('StageInterior') notify = DirectNotifyGlobal.directNotify.newCategory('StageInterior')
@ -82,7 +82,7 @@ class StageInterior(BattlePlace.BattlePlace):
base.cr.forbidCheesyEffects(1) base.cr.forbidCheesyEffects(1)
def commence(self = self): def commence(self = self):
NametagGlobals.setWant2dNametags(True) NametagGlobals.setMasterArrowsOn(1)
self.fsm.request(requestStatus['how'], [requestStatus]) self.fsm.request(requestStatus['how'], [requestStatus])
base.playMusic(self.music, looping=1, volume=0.8) base.playMusic(self.music, looping=1, volume=0.8)
base.transitions.irisIn() base.transitions.irisIn()
@ -102,7 +102,7 @@ class StageInterior(BattlePlace.BattlePlace):
self.acceptOnce('localToonConfrontedStageBoss', handleConfrontedBoss) self.acceptOnce('localToonConfrontedStageBoss', handleConfrontedBoss)
def exit(self): def exit(self):
NametagGlobals.setWant2dNametags(False) NametagGlobals.setMasterArrowsOn(0)
self._telemLimiter.destroy() self._telemLimiter.destroy()
del self._telemLimiter del self._telemLimiter
bboard.remove(DistributedStage.DistributedStage.ReadyPost) bboard.remove(DistributedStage.DistributedStage.ReadyPost)