mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
Remove unused StatusDatabase
This commit is contained in:
parent
3e660c2fa6
commit
45def83a34
5 changed files with 2 additions and 74 deletions
|
@ -20,7 +20,6 @@ from otp.distributed import DistributedDirectory/AI
|
|||
from otp.distributed import DistributedTestObject/AI
|
||||
from otp.chat import ChatAgent/UD
|
||||
from otp.distributed import CentralLogger/AI/UD
|
||||
from otp.status import StatusDatabase/UD
|
||||
from otp.avatar import AvatarHandle
|
||||
|
||||
typedef uint8 bool;
|
||||
|
@ -437,11 +436,6 @@ dclass CentralLogger : DistributedObject {
|
|||
logAIGarbage() airecv;
|
||||
};
|
||||
|
||||
dclass StatusDatabase : DistributedObject {
|
||||
requestOfflineAvatarStatus(uint32 []) airecv clsend;
|
||||
recvOfflineAvatarStatus(uint32, uint32);
|
||||
};
|
||||
|
||||
dclass CallbackObject {
|
||||
callback(uint32, bool, uint8);
|
||||
};
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
from pandac.PandaModules import *
|
||||
|
||||
|
||||
hashVal = 1411931781
|
||||
hashVal = 1516203465
|
||||
|
||||
|
||||
from toontown.cogdominium import DistributedCogdoInterior, DistributedCogdoBattleBldg, DistributedCogdoElevatorExt, DistributedCogdoElevatorInt, DistributedCogdoBarrel, DistCogdoGame, DistCogdoLevelGame, DistCogdoBoardroomGame, DistCogdoCraneGame, DistCogdoMazeGame, DistCogdoFlyingGame, DistCogdoCrane, DistCogdoCraneMoneyBag, DistCogdoCraneCog
|
||||
from toontown.coghq import DistributedCashbotBossSafe, DistributedCashbotBossCrane, DistributedBattleFactory, DistributedCashbotBossTreasure, DistributedCogHQDoor, DistributedSellbotHQDoor, DistributedFactoryElevatorExt, DistributedMintElevatorExt, DistributedLawOfficeElevatorExt, DistributedLawOfficeElevatorInt, LobbyManager, DistributedMegaCorp, DistributedFactory, DistributedLawOffice, DistributedLawOfficeFloor, DistributedLift, DistributedDoorEntity, DistributedSwitch, DistributedButton, DistributedTrigger, DistributedCrushableEntity, DistributedCrusherEntity, DistributedStomper, DistributedStomperPair, DistributedLaserField, DistributedGolfGreenGame, DistributedSecurityCamera, DistributedMover, DistributedElevatorMarker, DistributedBarrelBase, DistributedGagBarrel, DistributedBeanBarrel, DistributedHealBarrel, DistributedGrid, ActiveCell, DirectionalCell, CrusherCell, DistributedCrate, DistributedSinkingPlatform, BattleBlocker, DistributedMint, DistributedMintRoom, DistributedMintBattle, DistributedStage, DistributedStageRoom, DistributedStageBattle, DistributedLawbotBossGavel, DistributedLawbotCannon, DistributedLawbotChair, DistributedCogKart, DistributedCountryClub, DistributedCountryClubRoom, DistributedMoleField, DistributedCountryClubBattle, DistributedMaze, DistributedFoodBelt, DistributedBanquetTable, DistributedGolfSpot
|
||||
from toontown.golf import DistributedPhysicsWorld, DistributedGolfHole, DistributedGolfCourse
|
||||
from toontown.building import DistributedAnimatedProp, DistributedTrophyMgr, DistributedBuilding, DistributedAnimBuilding, DistributedBuildingQueryMgr, DistributedToonInterior, DistributedToonHallInterior, DistributedSuitInterior, DistributedHQInterior, DistributedGagshopInterior, DistributedPetshopInterior, DistributedKartShopInterior, DistributedBankInterior, DistributedBankCollectable, DistributedLibraryInterior, DistributedDoor, DistributedAnimDoor, DistributedKnockKnockDoor, DistributedElevator, DistributedElevatorFSM, DistributedElevatorExt, DistributedElevatorInt, DistributedElevatorFloor, DistributedBossElevator, DistributedVPElevator, DistributedCFOElevator, DistributedCJElevator, DistributedBBElevator, DistributedBoardingParty, DistributedTutorialInterior, DistributedClubElevator
|
||||
|
@ -41,7 +40,7 @@ from toontown.parties import DistributedParty, DistributedPartyActivity, Distrib
|
|||
from toontown.uberdog.DistributedInGameNewsMgr import DistributedInGameNewsMgr
|
||||
from toontown.coghq.InGameEditorDCImports import *
|
||||
from toontown.friends import TTPlayerFriendsManager, TTUFriendsManager
|
||||
from otp.status import StatusDatabase
|
||||
from toontown.cogdominium import DistributedCogdoInterior, DistributedCogdoBattleBldg, DistributedCogdoElevatorExt, DistributedCogdoElevatorInt, DistributedCogdoBarrel, DistCogdoGame, DistCogdoLevelGame, DistCogdoBoardroomGame, DistCogdoCraneGame, DistCogdoMazeGame, DistCogdoFlyingGame, DistCogdoCrane, DistCogdoCraneMoneyBag, DistCogdoCraneCog
|
||||
from toontown.uberdog.DistributedSecurityMgr import DistributedSecurityMgr
|
||||
from otp.distributed import Account, ObjectServer, DistributedDistrict, DistributedDirectory, DistributedTestObject, CentralLogger
|
||||
from toontown.estate import DistributedCannon, DistributedTarget, EstateManager, DistributedEstate, DistributedHouse, DistributedHouseInterior, DistributedGarden, DistributedHouseDoor, DistributedBankMgr, DistributedMailbox, DistributedFurnitureManager, DistributedFurnitureItem, DistributedBank, DistributedCloset, DistributedTrunk, DistributedPhone, DistributedFireworksCannon, DistributedLawnDecor, DistributedGardenPlot, DistributedGardenBox, DistributedFlower, DistributedGagTree, DistributedStatuary, DistributedToonStatuary, DistributedChangingStatuary, DistributedAnimatedStatuary, DistributedPlantBase, DistributedLawnDecor
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
import datetime
|
||||
import time
|
||||
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
from otp.otpbase import OTPLocalizer
|
||||
|
||||
class StatusDatabase(DistributedObjectGlobal):
|
||||
notify = directNotify.newCategory('StatusDatabase')
|
||||
|
||||
def __init__(self, cr):
|
||||
DistributedObjectGlobal.__init__(self, cr)
|
||||
self.avatarData = {}
|
||||
self.avatarQueue = []
|
||||
self.avatarRequestTaskName = 'StatusDataBase_RequestAvatarLastOnline'
|
||||
self.avatarRetreiveTaskName = 'StatusDataBase_GetAvatarLastOnline'
|
||||
self.avatarDoneTaskName = 'StatusDataBase GotAvatarData'
|
||||
|
||||
def requestOfflineAvatarStatus(self, avIds):
|
||||
self.notify.debugCall()
|
||||
self.sendUpdate('requestOfflineAvatarStatus', [avIds])
|
||||
|
||||
def queueOfflineAvatarStatus(self, avIds):
|
||||
for avId in avIds:
|
||||
if avId not in self.avatarQueue:
|
||||
self.avatarQueue.append(avId)
|
||||
|
||||
while taskMgr.hasTaskNamed(self.avatarRequestTaskName):
|
||||
taskMgr.remove(self.avatarRequestTaskName)
|
||||
|
||||
task = taskMgr.doMethodLater(1.0, self.requestAvatarQueue, self.avatarRequestTaskName)
|
||||
|
||||
def requestAvatarQueue(self, task):
|
||||
self.sendUpdate('requestOfflineAvatarStatus', [self.avatarQueue])
|
||||
self.avatarQueue = []
|
||||
|
||||
def recvOfflineAvatarStatus(self, avId, lastOnline):
|
||||
self.notify.debugCall()
|
||||
self.notify.debug('Got an update for offline avatar %s who was last online %s' % (avId, self.lastOnlineString(lastOnline)))
|
||||
self.avatarData[avId] = lastOnline
|
||||
while taskMgr.hasTaskNamed(self.avatarRetreiveTaskName):
|
||||
taskMgr.remove(self.avatarRetreiveTaskName)
|
||||
|
||||
task = taskMgr.doMethodLater(1.0, self.announceNewAvatarData, self.avatarRetreiveTaskName)
|
||||
|
||||
def announceNewAvatarData(self, task):
|
||||
messenger.send(self.avatarDoneTaskName)
|
||||
|
||||
def lastOnlineString(self, timestamp):
|
||||
if timestamp == 0:
|
||||
return ''
|
||||
now = datetime.datetime.utcnow()
|
||||
td = abs(now - datetime.datetime.fromtimestamp(timestamp))
|
||||
return OTPLocalizer.timeElapsedString(td)
|
|
@ -1,12 +0,0 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.DistributedObjectUD import DistributedObjectUD
|
||||
|
||||
class StatusDatabaseUD(DistributedObjectUD):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory("StatusDatabaseUD")
|
||||
|
||||
def requestOfflineAvatarStatus(self, todo0):
|
||||
pass
|
||||
|
||||
def recvOfflineAvatarStatus(self, todo0, todo1):
|
||||
pass
|
||||
|
Loading…
Reference in a new issue