HD TV + Tailor Fix

This commit is contained in:
John 2015-07-14 01:43:13 +03:00
parent 92b3eac364
commit a6b0aeaaff
6 changed files with 28 additions and 62 deletions

View file

@ -1529,9 +1529,7 @@ class BattleCalculatorAI:
return self.__suitIsLured(suitId) and self.currentlyLuredSuits[suitId][0] > 0 and random.randint(0, 99) < self.currentlyLuredSuits[suitId][2]
def itemIsCredit(self, track, level):
if track == PETSOS:
return 0
return level < self.creditLevel
return track != PETSOS and level < self.creditLevel
def __getActualTrack(self, toonAttack):
if toonAttack[TOON_TRACK_COL] == NPCSOS:

View file

@ -71,6 +71,12 @@ for closetId, maxClothes in ClosetToClothes.items():
MaxClosetIds = (508, 518)
MaxTrunkIds = (4000, 4010)
TvToPosScale = {
1530: ((-1.15, -0.5, 1.1), (2.5, 1.7, 1.4)),
1531: ((-2.3, -0.2, 1.6), (5))
}
FurnitureTypes = {
100: ('phase_5.5/models/estate/chairA', # Model
None, # Color
@ -715,6 +721,10 @@ FurnitureTypes = {
None,
None,
675),
1531: ('phase_5.5/models/estate/bugRoomTV_50inch',
None,
None,
1250),
1600: ('phase_5.5/models/estate/vaseA_short',
None,
None,
@ -947,20 +957,7 @@ class CatalogFurnitureItem(CatalogAtticItem.CatalogAtticItem):
return BankToMoney.get(self.furnitureType)
def getMaxClothes(self):
index = self.furnitureType % 10
if index == 0:
return 10
elif index == 2:
return 15
elif index == 4:
return 20
elif index == 6:
return 25
elif index == 8:
return 50
else:
return None
return None
return ClosetToClothes[self.furnitureType]
def reachedPurchaseLimit(self, avatar):
if self.getFlags() & FLBank:
@ -1082,13 +1079,14 @@ class CatalogFurnitureItem(CatalogAtticItem.CatalogAtticItem):
model.setScale(scale)
model.flattenLight()
if self.furnitureType == 1530 and animate:
if animate and self.furnitureType in TvToPosScale:
pos = TvToPosScale[self.furnitureType]
screen = NodePath(CardMaker('tv-screen').generate())
model.find('**/toonTownBugTV_screen').hide()
screen.reparentTo(model)
screen.setScale(2.5, 1.7, 1.4)
screen.setPos(-1.15, -0.5, 1.1)
screen.setScale(*pos[1])
screen.setPos(*pos[0])
self.startVideo(screen)
return model

View file

@ -499,6 +499,7 @@ MonthlySchedule = ((7,
CatalogGardenStarterItem(),
CatalogNametagItem(0),
CatalogFurnitureItem(1530),
CatalogFurnitureItem(1531),
CatalogClothingItem(1605, 0, True),
CatalogClothingItem(1602, 0, True),
CatalogClothingItem(1604, 0, True),
@ -1025,7 +1026,6 @@ WeeklySchedule = ((100,
3510,
4010,
4510,
CatalogFurnitureItem(1530),
CatalogFurnitureItem(1640),
CatalogFurnitureItem(1441)),
(100,
@ -1352,7 +1352,7 @@ WeeklySchedule = ((100,
Sale(CatalogClothingItem(116, 0), CatalogClothingItem(216, 0), CatalogClothingItem(408, 0), CatalogClothingItem(117, 0), CatalogClothingItem(217, 0), CatalogClothingItem(409, 0), CatalogClothingItem(118, 0), CatalogClothingItem(218, 0), CatalogClothingItem(410, 0), CatalogClothingItem(119, 0), CatalogClothingItem(219, 0), CatalogClothingItem(120, 0), CatalogClothingItem(220, 0), CatalogClothingItem(121, 0), CatalogClothingItem(221, 0), CatalogClothingItem(222, 0), CatalogClothingItem(123, 0), CatalogClothingItem(224, 0), CatalogClothingItem(411, 0), CatalogClothingItem(311, 0), CatalogClothingItem(310, 0)),
Sale(CatalogWindowItem(40), CatalogWindowItem(70), CatalogWindowItem(50), CatalogWindowItem(60), CatalogWindowItem(80), CatalogWindowItem(100), CatalogWindowItem(90), CatalogWindowItem(110)),
Sale(CatalogEmoteItem(5), CatalogEmoteItem(9), CatalogEmoteItem(13), CatalogEmoteItem(11), CatalogEmoteItem(6), CatalogEmoteItem(8), CatalogNametagItem(10)),
Sale(CatalogFurnitureItem(600), CatalogFurnitureItem(610), CatalogFurnitureItem(620), CatalogFurnitureItem(630), CatalogFurnitureItem(640), CatalogFurnitureItem(650), CatalogFurnitureItem(660), CatalogFurnitureItem(900), CatalogFurnitureItem(910), CatalogFurnitureItem(920), CatalogFurnitureItem(930), CatalogFurnitureItem(940), CatalogFurnitureItem(1000), CatalogFurnitureItem(1010), CatalogFurnitureItem(1020), CatalogFurnitureItem(1030), CatalogFurnitureItem(1400), CatalogFurnitureItem(1410), CatalogFurnitureItem(1420), CatalogFurnitureItem(1430), CatalogFurnitureItem(1440), CatalogFurnitureItem(1441), CatalogFurnitureItem(1442), CatalogFurnitureItem(1443), CatalogFurnitureItem(1500), CatalogFurnitureItem(1510), CatalogFurnitureItem(1520), CatalogFurnitureItem(1530), CatalogFurnitureItem(1600), CatalogFurnitureItem(1610), CatalogFurnitureItem(1620), CatalogFurnitureItem(1630), CatalogFurnitureItem(1640), CatalogFurnitureItem(1650), CatalogFurnitureItem(1660), CatalogFurnitureItem(1661), CatalogFurnitureItem(1710), CatalogFurnitureItem(1800), CatalogFurnitureItem(1810), CatalogFurnitureItem(1900), CatalogFurnitureItem(1910)),
Sale(CatalogFurnitureItem(600), CatalogFurnitureItem(610), CatalogFurnitureItem(620), CatalogFurnitureItem(630), CatalogFurnitureItem(640), CatalogFurnitureItem(650), CatalogFurnitureItem(660), CatalogFurnitureItem(900), CatalogFurnitureItem(910), CatalogFurnitureItem(920), CatalogFurnitureItem(930), CatalogFurnitureItem(940), CatalogFurnitureItem(1000), CatalogFurnitureItem(1010), CatalogFurnitureItem(1020), CatalogFurnitureItem(1030), CatalogFurnitureItem(1400), CatalogFurnitureItem(1410), CatalogFurnitureItem(1420), CatalogFurnitureItem(1430), CatalogFurnitureItem(1440), CatalogFurnitureItem(1441), CatalogFurnitureItem(1442), CatalogFurnitureItem(1443), CatalogFurnitureItem(1500), CatalogFurnitureItem(1510), CatalogFurnitureItem(1520), CatalogFurnitureItem(1530), CatalogFurnitureItem(1531), CatalogFurnitureItem(1600), CatalogFurnitureItem(1610), CatalogFurnitureItem(1620), CatalogFurnitureItem(1630), CatalogFurnitureItem(1640), CatalogFurnitureItem(1650), CatalogFurnitureItem(1660), CatalogFurnitureItem(1661), CatalogFurnitureItem(1710), CatalogFurnitureItem(1800), CatalogFurnitureItem(1810), CatalogFurnitureItem(1900), CatalogFurnitureItem(1910)),
(300,
(1, 2020),
(2, 2030),

View file

@ -5,10 +5,6 @@ import ToonDNA
from direct.task.Task import Task
from toontown.estate import ClosetGlobals
#Going to code this later. For now lets just have it return false.
def isClosetAlmostFull(av):
return False
class DistributedNPCTailorAI(DistributedNPCToonBaseAI):
freeClothes = simbase.config.GetBool('free-clothes', 0)
housingEnabled = simbase.config.GetBool('want-housing', 1)
@ -34,7 +30,6 @@ class DistributedNPCTailorAI(DistributedNPCToonBaseAI):
self.customerDNA = None
self.customerId = None
DistributedNPCToonBaseAI.delete(self)
return
def avatarEnter(self):
avId = self.air.getAvatarIdFromSender()
@ -63,7 +58,7 @@ class DistributedNPCTailorAI(DistributedNPCToonBaseAI):
elif self.air.questManager.hasTailorClothingTicket(av, self):
flag = NPCToons.PURCHASE_MOVIE_START
if self.housingEnabled and isClosetAlmostFull(av):
if self.housingEnabled and self.isClosetAlmostFull(av):
flag = NPCToons.PURCHASE_MOVIE_START_NOROOM
self.sendShoppingMovie(avId, flag)
@ -71,14 +66,10 @@ class DistributedNPCTailorAI(DistributedNPCToonBaseAI):
def isClosetAlmostFull(self, av):
numClothes = len(av.clothesTopsList) / 4 + len(av.clothesBottomsList) / 2
if numClothes >= av.maxClothes - 1:
return 1
return 0
return numClothes >= av.maxClothes - 1
def hasEnoughJbs(self, av):
if av.getTotalMoney() >= self.jbCost:
return True
return False
return av.getTotalMoney() >= self.jbCost
def sendShoppingMovie(self, avId, flag):
self.busy = avId
@ -126,7 +117,6 @@ class DistributedNPCTailorAI(DistributedNPCToonBaseAI):
self.sendClearMovie(None)
if self.air.questManager.hasTailorClothingTicket(av, self):
self.air.questManager.removeClothingTicket(av, self)
return
def setDNA(self, blob, finished, which):
avId = self.air.getAvatarIdFromSender()

View file

@ -5151,6 +5151,7 @@ FurnitureNames = {100: 'Armchair',
1510: 'Radio',
1520: 'Radio',
1530: 'Television',
1531: '50" HD Television',
1600: 'Short Vase',
1610: 'Tall Vase',
1620: 'Short Vase',

View file

@ -270,33 +270,12 @@ class TownBattle(StateData.StateData):
cogPanel.updateHealthBar()
cogPanel.setPos(0, 0, 0.62)
if num == 1:
self.cogPanels[0].setX(self.oddPos[1])
self.cogPanels[0].show()
elif num == 2:
self.cogPanels[0].setX(self.evenPos[1])
self.cogPanels[0].show()
self.cogPanels[1].setX(self.evenPos[2])
self.cogPanels[1].show()
elif num == 3:
self.cogPanels[0].setX(self.oddPos[0])
self.cogPanels[0].show()
self.cogPanels[1].setX(self.oddPos[1])
self.cogPanels[1].show()
self.cogPanels[2].setX(self.oddPos[2])
self.cogPanels[2].show()
elif num == 4:
self.cogPanels[0].setX(self.evenPos[0])
self.cogPanels[0].show()
self.cogPanels[1].setX(self.evenPos[1])
self.cogPanels[1].show()
self.cogPanels[2].setX(self.evenPos[2])
self.cogPanels[2].show()
self.cogPanels[3].setX(self.evenPos[3])
self.cogPanels[3].show()
else:
self.notify.error('Bad number of toons: %s' % num)
return None
pos = self.evenPos if num % 2 == 0 else self.oddPos
for i, panel in enumerate(self.cogPanels):
if num > i:
panel.setX(pos[i if num >= 3 else i + 1])
panel.show()
def updateChosenAttacks(self, battleIndices, tracks, levels, targets):
self.notify.debug('updateChosenAttacks bi=%s tracks=%s levels=%s targets=%s' % (battleIndices,