mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 20:22:33 -06:00
Proper TV
This commit is contained in:
parent
848293a3b9
commit
7c0ba851c7
2 changed files with 19 additions and 10 deletions
|
@ -3,6 +3,7 @@ import CatalogItem
|
||||||
import random
|
import random
|
||||||
from toontown.toonbase import TTLocalizer
|
from toontown.toonbase import TTLocalizer
|
||||||
from toontown.toonbase import ToontownGlobals
|
from toontown.toonbase import ToontownGlobals
|
||||||
|
from pandac.PandaModules import *
|
||||||
FTModelName = 0
|
FTModelName = 0
|
||||||
FTColor = 1
|
FTColor = 1
|
||||||
FTColorOptions = 2
|
FTColorOptions = 2
|
||||||
|
@ -1028,7 +1029,7 @@ class CatalogFurnitureItem(CatalogAtticItem.CatalogAtticItem):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
def getPicture(self, avatar):
|
def getPicture(self, avatar):
|
||||||
model = self.loadModel()
|
model = self.loadModel(animate=0)
|
||||||
spin = 1
|
spin = 1
|
||||||
flags = self.getFlags()
|
flags = self.getFlags()
|
||||||
if flags & FLRug:
|
if flags & FLRug:
|
||||||
|
@ -1064,7 +1065,7 @@ class CatalogFurnitureItem(CatalogAtticItem.CatalogAtticItem):
|
||||||
def getBasePrice(self):
|
def getBasePrice(self):
|
||||||
return FurnitureTypes[self.furnitureType][FTBasePrice]
|
return FurnitureTypes[self.furnitureType][FTBasePrice]
|
||||||
|
|
||||||
def loadModel(self):
|
def loadModel(self, animate=1):
|
||||||
type = FurnitureTypes[self.furnitureType]
|
type = FurnitureTypes[self.furnitureType]
|
||||||
model = loader.loadModel(type[FTModelName])
|
model = loader.loadModel(type[FTModelName])
|
||||||
self.applyColor(model, type[FTColor])
|
self.applyColor(model, type[FTColor])
|
||||||
|
@ -1079,14 +1080,20 @@ class CatalogFurnitureItem(CatalogAtticItem.CatalogAtticItem):
|
||||||
if not scale == None:
|
if not scale == None:
|
||||||
model.setScale(scale)
|
model.setScale(scale)
|
||||||
model.flattenLight()
|
model.flattenLight()
|
||||||
if self.furnitureType == 1530:
|
if self.furnitureType == 1530 and animate:
|
||||||
print 'TV'
|
movie = loader.loadTexture('phase_5.5/movies/cheekyscrublords.avi')
|
||||||
movie = loader.loadTexture('phase_5.5/movies/cheekyscrublords.mpg')
|
self.sound = loader.loadSfx('phase_5.5/movies/cheekyscrublords.mp3')
|
||||||
sound = loader.loadSfx('phase_5.5/movies/cheekyscrublords.mpg')
|
movie.synchronizeTo(self.sound)
|
||||||
movie.synchronizeTo(sound)
|
screen = NodePath(CardMaker('tv-screen').generate())
|
||||||
model.find('**/toonTownBugTV_screen').setTexture(movie)
|
screen.reparentTo(model)
|
||||||
sound.setLoop(True)
|
|
||||||
sound.play()
|
screen.setScale(2.5, 1.7, 1.4)
|
||||||
|
screen.setPos(-1.15, -0.5, 1.1)
|
||||||
|
screen.setTexture(movie)
|
||||||
|
screen.setTexScale(TextureStage.getDefault(), movie.getTexScale())
|
||||||
|
model.find('**/toonTownBugTV_screen').hide()
|
||||||
|
self.sound.setLoop(True)
|
||||||
|
self.sound.play()
|
||||||
return model
|
return model
|
||||||
|
|
||||||
def decodeDatagram(self, di, versionNumber, store):
|
def decodeDatagram(self, di, versionNumber, store):
|
||||||
|
|
|
@ -47,6 +47,8 @@ class DistributedFurnitureItem(DistributedHouseItem.DistributedHouseItem, Distri
|
||||||
|
|
||||||
def delete(self):
|
def delete(self):
|
||||||
self.removeNode()
|
self.removeNode()
|
||||||
|
if hasattr(self.item, 'sound'):
|
||||||
|
self.item.sound.stop()
|
||||||
del self.item
|
del self.item
|
||||||
DistributedHouseItem.DistributedHouseItem.delete(self)
|
DistributedHouseItem.DistributedHouseItem.delete(self)
|
||||||
DistributedSmoothNode.DistributedSmoothNode.delete(self)
|
DistributedSmoothNode.DistributedSmoothNode.delete(self)
|
||||||
|
|
Loading…
Reference in a new issue