Top Toons: More appropriate

This commit is contained in:
Loudrob 2015-07-21 12:04:01 -04:00
parent a06c6a7543
commit ba42dcb7d8
4 changed files with 8 additions and 10 deletions

View file

@ -51,7 +51,7 @@ from toontown.toon import NPCToons
from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals
from toontown.tutorial.TutorialManagerAI import TutorialManagerAI from toontown.tutorial.TutorialManagerAI import TutorialManagerAI
from toontown.uberdog.DistributedPartyManagerAI import DistributedPartyManagerAI from toontown.uberdog.DistributedPartyManagerAI import DistributedPartyManagerAI
from toontown.uberdog.DistributedTopToonsManagerAI import DistributedTopToonsManagerAI from toontown.uberdog.TopToonsManagerAI import TopToonsManagerAI
#from toontown.uberdog.DistributedLobbyManagerAI import DistributedLobbyManagerAI #from toontown.uberdog.DistributedLobbyManagerAI import DistributedLobbyManagerAI
class ToontownAIRepository(ToontownInternalRepository): class ToontownAIRepository(ToontownInternalRepository):
@ -73,7 +73,6 @@ class ToontownAIRepository(ToontownInternalRepository):
self.lawOfficeMgr = None self.lawOfficeMgr = None
self.countryClubMgr = None self.countryClubMgr = None
self.groupManager = GroupManagerAI(self) self.groupManager = GroupManagerAI(self)
self.topToonsMgr = DistributedTopToonsManagerAI(self)
self.zoneAllocator = UniqueIdAllocator(ToontownGlobals.DynamicZonesBegin, self.zoneAllocator = UniqueIdAllocator(ToontownGlobals.DynamicZonesBegin,
ToontownGlobals.DynamicZonesEnd) ToontownGlobals.DynamicZonesEnd)
@ -122,6 +121,7 @@ class ToontownAIRepository(ToontownInternalRepository):
self.buildingQueryMgr = DistributedBuildingQueryMgrAI(self) self.buildingQueryMgr = DistributedBuildingQueryMgrAI(self)
self.buildingQueryMgr.generateWithRequired(2) self.buildingQueryMgr.generateWithRequired(2)
self.groupManager.generateWithRequired(2) self.groupManager.generateWithRequired(2)
self.topToonsMgr = TopToonsManagerAI(self)
if self.wantKarts: if self.wantKarts:
self.leaderboardMgr = LeaderboardMgrAI(self) self.leaderboardMgr = LeaderboardMgrAI(self)
if self.wantFishing: if self.wantFishing:

View file

@ -4,7 +4,7 @@ from otp.distributed.OtpDoGlobals import *
from otp.distributed.DistributedDirectoryAI import DistributedDirectoryAI from otp.distributed.DistributedDirectoryAI import DistributedDirectoryAI
from toontown.distributed.ToontownInternalRepository import ToontownInternalRepository from toontown.distributed.ToontownInternalRepository import ToontownInternalRepository
import toontown.minigame.MinigameCreatorAI import toontown.minigame.MinigameCreatorAI
from toontown.uberdog.DistributedTopToonsManagerUD import DistributedTopToonsManagerUD from toontown.uberdog.TopToonsManagerUD import TopToonsManagerUD
if config.GetBool('want-rpc-server', False): if config.GetBool('want-rpc-server', False):
from toontown.rpc.ToontownRPCServer import ToontownRPCServer from toontown.rpc.ToontownRPCServer import ToontownRPCServer
@ -39,5 +39,5 @@ class ToontownUberRepository(ToontownInternalRepository):
self.friendsManager = simbase.air.generateGlobalObject(OTP_DO_ID_TTS_FRIENDS_MANAGER, 'TTSFriendsManager') self.friendsManager = simbase.air.generateGlobalObject(OTP_DO_ID_TTS_FRIENDS_MANAGER, 'TTSFriendsManager')
self.globalPartyMgr = simbase.air.generateGlobalObject(OTP_DO_ID_GLOBAL_PARTY_MANAGER, 'GlobalPartyManager') self.globalPartyMgr = simbase.air.generateGlobalObject(OTP_DO_ID_GLOBAL_PARTY_MANAGER, 'GlobalPartyManager')
self.groupManager = simbase.air.generateGlobalObject(OPT_DO_ID_GROUP_MANAGER, 'GroupManager') self.groupManager = simbase.air.generateGlobalObject(OPT_DO_ID_GROUP_MANAGER, 'GroupManager')
self.topToonsMgr = DistributedTopToonsManagerUD(self) self.topToonsMgr = TopToonsManagerUD(self)

View file

@ -1,8 +1,7 @@
from direct.distributed.DistributedObjectAI import *
from direct.showbase.DirectObject import * from direct.showbase.DirectObject import *
import TopToonsGlobals import TopToonsGlobals
class DistributedTopToonsManagerAI(DirectObject): class TopToonsManagerAI(DirectObject):
def __init__(self, air): def __init__(self, air):
self.air = air self.air = air

View file

@ -2,7 +2,6 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.fsm.FSM import FSM from direct.fsm.FSM import FSM
from direct.distributed.DistributedObjectUD import *
from direct.showbase.DirectObject import * from direct.showbase.DirectObject import *
from toontown.toon.ToonDNA import ToonDNA, getSpeciesName from toontown.toon.ToonDNA import ToonDNA, getSpeciesName
import TopToonsGlobals import TopToonsGlobals
@ -186,8 +185,8 @@ class SiteUploadFSM(FSM):
return (success, error), res return (success, error), res
class DistributedTopToonsManagerUD(DirectObject): class TopToonsManagerUD(DirectObject):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTopToonsManagerUD') notify = DirectNotifyGlobal.directNotify.newCategory('TopToonsManagerUD')
def __init__(self, air): def __init__(self, air):
self.air = air self.air = air
@ -225,7 +224,7 @@ class DistributedTopToonsManagerUD(DirectObject):
return task.done return task.done
taskMgr.doMethodLater(timeToNextMonth() + 1, _nm, 'DistributedTopToonsManagerUD-nextMonth') taskMgr.doMethodLater(timeToNextMonth() + 1, _nm, 'TopToonsManagerUD-nextMonth')
def saveSite(self): def saveSite(self):
if self.air.dbConn: if self.air.dbConn: