Remove Polar Bear manager (Dr Surlee from TTR)

This commit is contained in:
DenialMC 2015-04-29 11:36:27 +03:00
parent 20309174ee
commit 0a0f8bfa3b
4 changed files with 2 additions and 83 deletions

View file

@ -406,7 +406,6 @@ from toontown.coghq import BattleBlocker/AI
from toontown.ai import DistributedAprilToonsMgr/AI
from toontown.ai import DistributedBlackCatMgr/AI
from toontown.ai import DistributedReportMgr/AI
from toontown.ai import DistributedPolarBearMgr/AI
from toontown.ai import DistributedPolarPlaceEffectMgr/AI
from toontown.ai import DistributedGreenToonEffectMgr/AI
from toontown.ai import DistributedResistanceEmoteMgr/AI
@ -2539,11 +2538,6 @@ dclass DistributedReportMgr : DistributedObject {
sendReport(uint32, string) airecv clsend;
};
dclass DistributedPolarBearMgr : DistributedObject {
doPolarBearTransformation(uint32 avId) broadcast;
requestPolarBearTransformation() airecv clsend;
};
dclass DistributedPolarPlaceEffectMgr : DistributedObject {
addPolarPlaceEffect() airecv clsend;
};

View file

@ -2,7 +2,7 @@
from pandac.PandaModules import *
hashVal = 1355680248
hashVal = 2698095309L
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
@ -14,7 +14,7 @@ from otp.level import DistributedLevel, DistributedEntity, DistributedInteractiv
from toontown.shtiker import DeleteManager, PurchaseManager, NewbiePurchaseManager
from toontown.groups import GroupManager
from toontown.uberdog.ClientServicesManager import ClientServicesManager
from toontown.ai import WelcomeValleyManager, NewsManager, DistributedAprilToonsMgr, DistributedBlackCatMgr, DistributedReportMgr, DistributedPolarBearMgr, DistributedPolarPlaceEffectMgr, DistributedGreenToonEffectMgr, DistributedResistanceEmoteMgr, DistributedScavengerHuntTarget, DistributedTrickOrTreatTarget, DistributedWinterCarolingTarget, DistributedSillyMeterMgr
from toontown.ai import WelcomeValleyManager, NewsManager, DistributedAprilToonsMgr, DistributedBlackCatMgr, DistributedReportMgr, DistributedPolarPlaceEffectMgr, DistributedGreenToonEffectMgr, DistributedResistanceEmoteMgr, DistributedScavengerHuntTarget, DistributedTrickOrTreatTarget, DistributedWinterCarolingTarget, DistributedSillyMeterMgr
from otp.chat import ChatAgent
from toontown.parties.GlobalPartyManager import GlobalPartyManager
from toontown.racing.DistributedStartingBlock import DistributedViewingBlock

View file

@ -1,54 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from direct.distributed import DistributedObject
from direct.interval.IntervalGlobal import *
from toontown.effects import DustCloud
def getDustCloudIval(toon):
dustCloud = DustCloud.DustCloud(fBillboard=0)
dustCloud.setBillboardAxis(2.0)
dustCloud.setZ(3)
dustCloud.setScale(0.4)
dustCloud.createTrack()
if getattr(toon, 'laffMeter', None):
toon.laffMeter.color = toon.style.getWhiteColor()
seq = Sequence(Wait(0.5), Func(dustCloud.reparentTo, toon), dustCloud.track, Func(dustCloud.destroy))
seq.append(Func(messenger.send, 'polarbear-transformed'))
if getattr(toon, 'laffMeter', None):
seq.append(Func(toon.laffMeter.adjustFace, toon.hp, toon.maxHp))
return seq
class DistributedPolarBearMgr(DistributedObject.DistributedObject):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPolarBearMgr')
ActivateEvent = 'DistributedPolarBearMgr-activate'
def __init__(self, cr):
DistributedObject.DistributedObject.__init__(self, cr)
def announceGenerate(self):
DistributedPolarBearMgr.notify.debug('announceGenerate')
DistributedObject.DistributedObject.announceGenerate(self)
self.acceptOnce(DistributedPolarBearMgr.ActivateEvent, self.d_requestPolarBearTransformation)
self.dustCloudIval = None
return
def delete(self):
if self.dustCloudIval:
self.dustCloudIval.finish()
del self.dustCloudIval
self.ignore(DistributedPolarBearMgr.ActivateEvent)
DistributedObject.DistributedObject.delete(self)
def d_requestPolarBearTransformation(self):
self.sendUpdate('requestPolarBearTransformation', [])
def doPolarBearTransformation(self, avId):
DistributedPolarBearMgr.notify.debug('doPolarBearTransformation')
toon = self.cr.doId2do.get(avId)
if not toon:
DistributedPolarBearMgr.notify.warning("couldn't find Toon %s" % avId)
return
if toon.style.getAnimal() != 'bear':
DistributedPolarBearMgr.notify.warning('not a bear: %s' % avId)
return
self.dustCloudIval = getDustCloudIval(toon)
self.dustCloudIval.start()

View file

@ -1,21 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI
from toontown.toon.ToonDNA import ToonDNA
class DistributedPolarBearMgrAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedPolarBearMgrAI")
def requestPolarBearTransformation(self):
avId = self.air.getAvatarIdFromSender()
av = self.air.doId2do.get(avId)
if not av: return
if av.dna.getAnimal() == 'bear' and av.dna.headColor != 0x00:
newDNA = ToonDNA()
newDNA.makeFromNetString(av.getDNAString())
newDNA.headColor = 0x00
newDNA.armColor = 0x00
newDNA.legColor = 0x00
taskMgr.doMethodLater(1.0, lambda task: av.b_setDNAString(newDNA.makeNetString()), 'transform-%d' %avId)
self.sendUpdate('doPolarBearTransformation', [avId])