mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
RIP Pillows
This commit is contained in:
parent
ba8df1addf
commit
18f600b593
4 changed files with 2 additions and 120 deletions
4
dependencies/astron/dclass/stride.dc
vendored
4
dependencies/astron/dclass/stride.dc
vendored
|
@ -180,7 +180,6 @@ dclass FriendManager : DistributedObject {
|
|||
from toontown.building import DistributedAnimatedProp/AI
|
||||
from toontown.toon import DistributedToon/AI/UD
|
||||
from toontown.safezone import DistributedTrolley/AI
|
||||
from toontown.safezone import DistributedPillow/AI
|
||||
from toontown.safezone import DistributedPartyGate/AI
|
||||
from toontown.suit import DistributedSuitPlanner/AI
|
||||
from toontown.suit import DistributedSuitBase/AI
|
||||
|
@ -770,9 +769,6 @@ dclass DistributedTrolley : DistributedObject {
|
|||
setMinigameZone(uint32, uint16);
|
||||
};
|
||||
|
||||
dclass DistributedPillow : DistributedObject {
|
||||
};
|
||||
|
||||
dclass DistributedSuitPlanner : DistributedObject {
|
||||
setZoneId(uint32) required broadcast ram;
|
||||
suitListQuery() airecv clsend;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from toontown.hood import HoodAI
|
||||
from toontown.safezone import DistributedTrolleyAI, DistributedPillowAI
|
||||
from toontown.safezone import DistributedTrolleyAI
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
from toontown.ai import DistributedResistanceEmoteMgrAI
|
||||
from toontown.ai import DistributedEffectMgrAI
|
||||
|
@ -29,13 +29,7 @@ class DLHoodAI(HoodAI.HoodAI):
|
|||
self.winterCarolingMgr = DistributedEffectMgrAI.DistributedEffectMgrAI(self.air, ToontownGlobals.CHRISTMAS, 14)
|
||||
self.winterCarolingMgr.generateWithRequired(9722) # Dream On Talent Agency, Pajama Place
|
||||
|
||||
self.createPillow()
|
||||
|
||||
def createTrolley(self):
|
||||
self.trolley = DistributedTrolleyAI.DistributedTrolleyAI(self.air)
|
||||
self.trolley.generateWithRequired(self.zoneId)
|
||||
self.trolley.start()
|
||||
|
||||
def createPillow(self):
|
||||
self.pillow = DistributedPillowAI.DistributedPillowAI(self.air)
|
||||
self.pillow.generateWithRequired(self.zoneId)
|
||||
|
|
|
@ -1,95 +0,0 @@
|
|||
from panda3d.core import Point3, NodePath
|
||||
from pandac.PandaModules import CollisionPolygon
|
||||
from otp.otpbase import OTPGlobals
|
||||
from direct.distributed.DistributedObject import DistributedObject
|
||||
from direct.fsm import ClassicFSM, State
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
|
||||
class DistributedPillow(DistributedObject):
|
||||
|
||||
points = [
|
||||
Point3(-62.2896, 59.2746, -6.0),
|
||||
Point3(-119.969, 59.2746, -6.0),
|
||||
Point3(-67.1297, 55.2920, -1.6),
|
||||
Point3(-120.063, 55.2920, -1.6),
|
||||
Point3(-64.9566, 35.6930, 1.0),
|
||||
Point3(-119.993, 35.6930, 1.0),
|
||||
Point3(-63.4717, 0.00000, 1.6),
|
||||
Point3(-119.670, 0.00000, 1.6),
|
||||
Point3(-64.9566, -35.6930, 1.0),
|
||||
Point3(-119.993, -35.6930, 1.0),
|
||||
Point3(-67.1297, -55.2920, -1.6),
|
||||
Point3(-120.063, -55.2920, -1.6),
|
||||
Point3(-62.2896, -58.3746, -6.0),
|
||||
Point3(-119.969, -58.3746, -6.0),
|
||||
Point3(-104.100, 59.2746, -6.0),
|
||||
Point3(-104.100, -58.3746, -6.0),
|
||||
Point3(-104.100, 55.2920, -6.0),
|
||||
Point3(-104.100, -55.2920, -6.0),
|
||||
]
|
||||
polygons = [[0, 1, 3, 2], [2, 3, 5, 4], [4, 5, 7, 6],
|
||||
[6, 7, 9, 8], [8, 9, 11, 10], [10, 11, 13, 12]]
|
||||
walls = [[0, 2], [2, 4], [4, 6], [6, 8], [8, 10], [10, 12],
|
||||
[3, 1], [5, 3], [7, 5], [9, 7], [11, 9], [13, 11],
|
||||
[3, 16], [17, 11], [16, 14], [15, 17]]
|
||||
|
||||
def __init__(self, cr):
|
||||
DistributedObject.__init__(self, cr)
|
||||
self.floorpolys = []
|
||||
self.wallpolys = []
|
||||
self.npaths = []
|
||||
self.np = None
|
||||
|
||||
def generate(self):
|
||||
DistributedObject.generate(self)
|
||||
self.loader = self.cr.playGame.hood.loader
|
||||
self.np = NodePath('Pillow')
|
||||
self.np.reparentTo(render)
|
||||
for point in DistributedPillow.polygons:
|
||||
orderedPoints = []
|
||||
for index in point:
|
||||
orderedPoints.append(DistributedPillow.points[index])
|
||||
self.floorpolys.append(CollisionPolygon(*orderedPoints))
|
||||
for n, p in enumerate(self.floorpolys):
|
||||
polyNode = CollisionNode("FloorPoly-%d" % n)
|
||||
polyNode.addSolid(p)
|
||||
polyNode.setFromCollideMask(OTPGlobals.FloorBitmask)
|
||||
polyNodePath = self.np.attachNewNode(polyNode)
|
||||
self.npaths.append(polyNodePath)
|
||||
self.accept("enterFloorPoly-%d" % n, self.gravityHigh)
|
||||
self.accept("enterdonalds_dreamland", self.gravityLow)
|
||||
for wall in DistributedPillow.walls:
|
||||
ab = DistributedPillow.points[wall[0]]
|
||||
bb = DistributedPillow.points[wall[1]]
|
||||
cb = Point3(bb.getX(), bb.getY(), bb.getZ() + 20)
|
||||
db = Point3(ab.getX(), ab.getY(), ab.getZ() + 20)
|
||||
self.wallpolys.append(CollisionPolygon(ab, bb, cb, db))
|
||||
for n, p in enumerate(self.wallpolys):
|
||||
polyNode = CollisionNode("WallPoly-%d" % n)
|
||||
polyNode.addSolid(p)
|
||||
polyNode.setFromCollideMask(OTPGlobals.FloorBitmask)
|
||||
polyNodePath = self.np.attachNewNode(polyNode)
|
||||
self.npaths.append(polyNodePath)
|
||||
|
||||
def disable(self):
|
||||
DistributedObject.disable(self)
|
||||
self.floorpolys = []
|
||||
self.wallpolys = []
|
||||
self.npaths = []
|
||||
if self.np:
|
||||
self.np.removeNode()
|
||||
self.np = None
|
||||
if hasattr(self, 'loader'):
|
||||
del self.loader
|
||||
|
||||
def delete(self):
|
||||
if self.np:
|
||||
self.np.removeNode()
|
||||
self.np = None
|
||||
DistributedObject.delete(self)
|
||||
|
||||
def gravityLow(self, entry):
|
||||
base.localAvatar.controlManager.currentControls.setGravity(ToontownGlobals.GravityValue * 1.25)
|
||||
|
||||
def gravityHigh(self, entry):
|
||||
base.localAvatar.controlManager.currentControls.setGravity(ToontownGlobals.GravityValue * 2.00)
|
|
@ -1,13 +0,0 @@
|
|||
from direct.distributed.DistributedObjectAI import DistributedObjectAI
|
||||
from direct.fsm import ClassicFSM, State
|
||||
|
||||
class DistributedPillowAI(DistributedObjectAI):
|
||||
|
||||
def __init__(self, air):
|
||||
DistributedObjectAI.__init__(self, air)
|
||||
|
||||
def generate(self):
|
||||
DistributedObjectAI.generate(self)
|
||||
|
||||
def delete(self):
|
||||
DistributedObjectAI.delete(self)
|
Loading…
Reference in a new issue