mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
POPSICLES
This commit is contained in:
parent
1d8fe20587
commit
e2d7b9b674
4 changed files with 17 additions and 25 deletions
4
dependencies/astron/dclass/stride.dc
vendored
4
dependencies/astron/dclass/stride.dc
vendored
|
@ -237,6 +237,7 @@ from toontown.safezone import SafeZoneManager/AI
|
||||||
from toontown.tutorial import TutorialManager/AI
|
from toontown.tutorial import TutorialManager/AI
|
||||||
from toontown.catalog import CatalogManager/AI
|
from toontown.catalog import CatalogManager/AI
|
||||||
from toontown.safezone import DistributedTreasure/AI
|
from toontown.safezone import DistributedTreasure/AI
|
||||||
|
from toontown.safezone import DistributedEFlyingTreasure/AI
|
||||||
from toontown.coghq import DistributedCashbotBossTreasure/AI
|
from toontown.coghq import DistributedCashbotBossTreasure/AI
|
||||||
from toontown.building import DistributedTrophyMgr/AI
|
from toontown.building import DistributedTrophyMgr/AI
|
||||||
from toontown.building import DistributedBuilding/AI
|
from toontown.building import DistributedBuilding/AI
|
||||||
|
@ -1522,6 +1523,9 @@ dclass DistributedTreasure : DistributedObject {
|
||||||
setReject() broadcast;
|
setReject() broadcast;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dclass DistributedEFlyingTreasure : DistributedTreasure {
|
||||||
|
};
|
||||||
|
|
||||||
dclass DistributedCashbotBossTreasure : DistributedTreasure {
|
dclass DistributedCashbotBossTreasure : DistributedTreasure {
|
||||||
setGoonId(uint32) required broadcast ram;
|
setGoonId(uint32) required broadcast ram;
|
||||||
setFinalPosition(int16/10, int16/10, int16/10) required broadcast ram;
|
setFinalPosition(int16/10, int16/10, int16/10) required broadcast ram;
|
||||||
|
|
|
@ -8,7 +8,7 @@ from toontown.fishing.DistributedFishingPondAI import DistributedFishingPondAI
|
||||||
from toontown.fishing import FishingTargetGlobals, FishGlobals
|
from toontown.fishing import FishingTargetGlobals, FishGlobals
|
||||||
from toontown.safezone import TreasureGlobals
|
from toontown.safezone import TreasureGlobals
|
||||||
from toontown.safezone.SZTreasurePlannerAI import SZTreasurePlannerAI
|
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 ButterflyGlobals
|
||||||
from toontown.safezone import DistributedButterflyAI
|
from toontown.safezone import DistributedButterflyAI
|
||||||
from toontown.safezone.DistributedFishingSpotAI import DistributedFishingSpotAI
|
from toontown.safezone.DistributedFishingSpotAI import DistributedFishingSpotAI
|
||||||
|
@ -431,7 +431,7 @@ class CannonRental(Rental):
|
||||||
for i in xrange(20):
|
for i in xrange(20):
|
||||||
x = random.randint(100, 300) - 200
|
x = random.randint(100, 300) - 200
|
||||||
y = 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)
|
treasure.generateWithRequired(self.estate.zoneId)
|
||||||
self.objects.add(treasure)
|
self.objects.add(treasure)
|
||||||
doIds.append(treasure.doId)
|
doIds.append(treasure.doId)
|
||||||
|
|
|
@ -1,42 +1,26 @@
|
||||||
from panda3d.core import *
|
from DistributedTreasure import DistributedTreasure
|
||||||
from toontown.toonbase.ToonBaseGlobal import *
|
import math, random
|
||||||
import DistributedSZTreasure
|
|
||||||
from direct.task.Task import Task
|
|
||||||
import math
|
|
||||||
import random
|
|
||||||
|
|
||||||
class DistributedEFlyingTreasure(DistributedSZTreasure.DistributedSZTreasure):
|
class DistributedEFlyingTreasure(DistributedTreasure):
|
||||||
|
|
||||||
def __init__(self, cr):
|
def __init__(self, cr):
|
||||||
DistributedSZTreasure.DistributedSZTreasure.__init__(self, cr)
|
DistributedTreasure.__init__(self, cr)
|
||||||
self.modelPath = 'phase_5.5/models/props/popsicle_treasure'
|
|
||||||
self.grabSoundPath = 'phase_4/audio/sfx/SZ_DD_treasure.ogg'
|
|
||||||
self.scale = 2
|
self.scale = 2
|
||||||
self.delT = math.pi * 2.0 * random.random()
|
self.delT = math.pi * 2.0 * random.random()
|
||||||
self.shadow = 0
|
self.shadow = 0
|
||||||
|
|
||||||
def disable(self):
|
def disable(self):
|
||||||
DistributedSZTreasure.DistributedSZTreasure.disable(self)
|
DistributedTreasure.disable(self)
|
||||||
taskMgr.remove(self.taskName('flying-treasure'))
|
taskMgr.remove(self.taskName('flying-treasure'))
|
||||||
|
|
||||||
def generateInit(self):
|
|
||||||
DistributedSZTreasure.DistributedSZTreasure.generateInit(self)
|
|
||||||
|
|
||||||
def setPosition(self, x, y, z):
|
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.initPos = self.nodePath.getPos()
|
||||||
self.pos = self.nodePath.getPos()
|
|
||||||
|
|
||||||
def startAnimation(self):
|
|
||||||
taskMgr.add(self.animateTask, self.taskName('flying-treasure'))
|
taskMgr.add(self.animateTask, self.taskName('flying-treasure'))
|
||||||
|
|
||||||
def animateTask(self, task):
|
def animateTask(self, task):
|
||||||
pos = self.initPos
|
pos = self.initPos
|
||||||
t = 0.5 * math.pi * globalClock.getFrameTime()
|
t = 0.5 * math.pi * globalClock.getFrameTime()
|
||||||
dZ = 5.0 * math.sin(t + self.delT)
|
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)
|
self.nodePath.setPos(pos[0], pos[1], pos[2] + dZ)
|
||||||
if self.pos:
|
return task.cont
|
||||||
del self.pos
|
|
||||||
self.pos = self.nodePath.getPos()
|
|
||||||
return Task.cont
|
|
||||||
|
|
4
toontown/safezone/DistributedEFlyingTreasureAI.py
Normal file
4
toontown/safezone/DistributedEFlyingTreasureAI.py
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
import DistributedTreasureAI
|
||||||
|
|
||||||
|
class DistributedEFlyingTreasureAI(DistributedTreasureAI.DistributedTreasureAI):
|
||||||
|
pass
|
Loading…
Reference in a new issue