diff --git a/dependencies/astron/dclass/stride.dc b/dependencies/astron/dclass/stride.dc index 1702b997..2667f6d4 100644 --- a/dependencies/astron/dclass/stride.dc +++ b/dependencies/astron/dclass/stride.dc @@ -237,6 +237,7 @@ from toontown.safezone import SafeZoneManager/AI from toontown.tutorial import TutorialManager/AI from toontown.catalog import CatalogManager/AI from toontown.safezone import DistributedTreasure/AI +from toontown.safezone import DistributedEFlyingTreasure/AI from toontown.coghq import DistributedCashbotBossTreasure/AI from toontown.building import DistributedTrophyMgr/AI from toontown.building import DistributedBuilding/AI @@ -1522,6 +1523,9 @@ dclass DistributedTreasure : DistributedObject { setReject() broadcast; }; +dclass DistributedEFlyingTreasure : DistributedTreasure { +}; + dclass DistributedCashbotBossTreasure : DistributedTreasure { setGoonId(uint32) required broadcast ram; setFinalPosition(int16/10, int16/10, int16/10) required broadcast ram; diff --git a/toontown/estate/DistributedEstateAI.py b/toontown/estate/DistributedEstateAI.py index 028a1c87..7582d146 100755 --- a/toontown/estate/DistributedEstateAI.py +++ b/toontown/estate/DistributedEstateAI.py @@ -8,7 +8,7 @@ from toontown.fishing.DistributedFishingPondAI import DistributedFishingPondAI from toontown.fishing import FishingTargetGlobals, FishGlobals from toontown.safezone import TreasureGlobals from toontown.safezone.SZTreasurePlannerAI import SZTreasurePlannerAI -from toontown.safezone import DistributedTreasureAI +from toontown.safezone import DistributedEFlyingTreasureAI from toontown.safezone import ButterflyGlobals from toontown.safezone import DistributedButterflyAI from toontown.safezone.DistributedFishingSpotAI import DistributedFishingSpotAI @@ -431,7 +431,7 @@ class CannonRental(Rental): for i in xrange(20): x = random.randint(100, 300) - 200 y = random.randint(100, 300) - 200 - treasure = DistributedTreasureAI.DistributedTreasureAI(self.estate.air, self, 7, x, y, z) + treasure = DistributedEFlyingTreasureAI.DistributedEFlyingTreasureAI(self.estate.air, self, 7, x, y, z) treasure.generateWithRequired(self.estate.zoneId) self.objects.add(treasure) doIds.append(treasure.doId) diff --git a/toontown/safezone/DistributedEFlyingTreasure.py b/toontown/safezone/DistributedEFlyingTreasure.py index fe4a347d..a398761d 100755 --- a/toontown/safezone/DistributedEFlyingTreasure.py +++ b/toontown/safezone/DistributedEFlyingTreasure.py @@ -1,42 +1,26 @@ -from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -import DistributedSZTreasure -from direct.task.Task import Task -import math -import random +from DistributedTreasure import DistributedTreasure +import math, random -class DistributedEFlyingTreasure(DistributedSZTreasure.DistributedSZTreasure): +class DistributedEFlyingTreasure(DistributedTreasure): def __init__(self, cr): - DistributedSZTreasure.DistributedSZTreasure.__init__(self, cr) - self.modelPath = 'phase_5.5/models/props/popsicle_treasure' - self.grabSoundPath = 'phase_4/audio/sfx/SZ_DD_treasure.ogg' + DistributedTreasure.__init__(self, cr) self.scale = 2 self.delT = math.pi * 2.0 * random.random() self.shadow = 0 def disable(self): - DistributedSZTreasure.DistributedSZTreasure.disable(self) + DistributedTreasure.disable(self) taskMgr.remove(self.taskName('flying-treasure')) - def generateInit(self): - DistributedSZTreasure.DistributedSZTreasure.generateInit(self) - def setPosition(self, x, y, z): - DistributedSZTreasure.DistributedSZTreasure.setPosition(self, x, y, z) + DistributedTreasure.setPosition(self, x, y, z) self.initPos = self.nodePath.getPos() - self.pos = self.nodePath.getPos() - - def startAnimation(self): taskMgr.add(self.animateTask, self.taskName('flying-treasure')) def animateTask(self, task): pos = self.initPos t = 0.5 * math.pi * globalClock.getFrameTime() dZ = 5.0 * math.sin(t + self.delT) - dY = 2.0 * math.cos(t + self.delT) self.nodePath.setPos(pos[0], pos[1], pos[2] + dZ) - if self.pos: - del self.pos - self.pos = self.nodePath.getPos() - return Task.cont + return task.cont diff --git a/toontown/safezone/DistributedEFlyingTreasureAI.py b/toontown/safezone/DistributedEFlyingTreasureAI.py new file mode 100644 index 00000000..06e9952c --- /dev/null +++ b/toontown/safezone/DistributedEFlyingTreasureAI.py @@ -0,0 +1,4 @@ +import DistributedTreasureAI + +class DistributedEFlyingTreasureAI(DistributedTreasureAI.DistributedTreasureAI): + pass \ No newline at end of file