diff --git a/toontown/estate/DistributedPhoneAI.py b/toontown/estate/DistributedPhoneAI.py index 3741bf97..e6bc5c05 100644 --- a/toontown/estate/DistributedPhoneAI.py +++ b/toontown/estate/DistributedPhoneAI.py @@ -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]) diff --git a/toontown/estate/HouseGlobals.py b/toontown/estate/HouseGlobals.py index 4f4de731..a8c5035d 100644 --- a/toontown/estate/HouseGlobals.py +++ b/toontown/estate/HouseGlobals.py @@ -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 + ) diff --git a/toontown/toon/DistributedToon.py b/toontown/toon/DistributedToon.py index baa9ebe7..8e977dc2 100644 --- a/toontown/toon/DistributedToon.py +++ b/toontown/toon/DistributedToon.py @@ -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 diff --git a/toontown/toonbase/TTLocalizerEnglish.py b/toontown/toonbase/TTLocalizerEnglish.py index 6347a7d0..ce7b0714 100644 --- a/toontown/toonbase/TTLocalizerEnglish.py +++ b/toontown/toonbase/TTLocalizerEnglish.py @@ -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 = {