Began work on emblem items, we don't really need these urgently.

This commit is contained in:
Loudrob 2015-03-29 09:06:13 -04:00
parent af618b240c
commit 64845859ff
4 changed files with 36 additions and 0 deletions

View file

@ -108,6 +108,27 @@ class DistributedPhoneAI(DistributedFurnitureItemAI):
else:
return
def _getEmblemPrices():
if config.GetBool('catalog-emblems-OR', False):
ep = list(item.getEmblemPrices())
if len(ep) != 2:
return []
if all(ep):
ep[payMethod] = 0
else:
ep = item.getEmblemPrices()
return ep
def charge():
ep = _getEmblemPrices()
if ep:
av.subtractEmblems(ep)
av.takeMoney(item.getPrice(priceType))
if item.getDeliveryTime():
if len(av.onOrder) > 5:
self.sendUpdateToAvatarId(avId, 'requestPurchaseResponse', [context, ToontownGlobals.P_OnOrderListFull])

View file

@ -110,3 +110,12 @@ HALF_DAY_PERIOD = 1050
HALF_NIGHT_PERIOD = 300
FIREWORKS_MOVIE_CLEAR = 0
FIREWORKS_MOVIE_GUI = 1
HouseEmblemPrices = (
(50, 20), # bungalo
(200, 75), # tiki
(200, 75), # tepee
(500, 250), # castle
(350, 150), # cupcake
(400, 200) # cabin
)

View file

@ -1153,6 +1153,9 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
self.monthlyCatalog = CatalogItemList.CatalogItemList(monthlyCatalog)
self.weeklyCatalog = CatalogItemList.CatalogItemList(weeklyCatalog)
self.backCatalog = CatalogItemList.CatalogItemList(backCatalog)
if config.GetBool('want-house-types', False):
from toontown.catalog import CatalogHouseItem
self.backCatalog.extend(CatalogHouseItem.getAllHouses())
if self.catalogNotify == ToontownGlobals.NewItems:
self.catalogNotify = ToontownGlobals.OldItems

View file

@ -9747,6 +9747,9 @@ PickTrackTitle = 'Pick your third track!'
PickTrackNotice = 'Choose a track!'
UnknownTrack = 'None'
HouseNames = ("Bungalow", "Tiki", "Teepee", "Castle", "Cupcake", "Cabin")
CatalogPurchaseHouseType = "When you buy a new house type, the current one is replaced by it. To recover the old type, you'll need to buy it back. Continue?"
# Buffs
buffIdStrings = {