oldschool-toontown/toontown/catalog/CatalogSurfaceItem.py

35 lines
886 B
Python
Raw Normal View History

from . import CatalogItem
from . import CatalogAtticItem
2019-11-02 22:27:54 +00:00
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
from .CatalogSurfaceColors import *
2019-11-02 22:27:54 +00:00
STWallpaper = 0
STMoulding = 1
STFlooring = 2
STWainscoting = 3
NUM_ST_TYPES = 4
class CatalogSurfaceItem(CatalogAtticItem.CatalogAtticItem):
def makeNewItem(self):
CatalogAtticItem.CatalogAtticItem.makeNewItem(self)
def setPatternIndex(self, patternIndex):
self.patternIndex = patternIndex
def setColorIndex(self, colorIndex):
self.colorIndex = colorIndex
def saveHistory(self):
return 1
def recordPurchase(self, avatar, optional):
self.giftTag = None
house, retcode = self.getHouseInfo(avatar)
if retcode >= 0:
house.addWallpaper(self)
return retcode
def getDeliveryTime(self):
return 60