isPaid and getGameAccess holocausted

This commit is contained in:
DenialMC 2015-04-08 00:15:58 +03:00
parent bc14a3dd9c
commit 45b9e2972b
61 changed files with 81 additions and 792 deletions

View file

@ -1020,7 +1020,6 @@ dclass DistributedToon : DistributedPlayer {
announcePartyStarted(uint64) ownrecv;
setAchievements(uint16[] = []) required broadcast ownrecv db;
setNeverStartedPartyRefunded(uint64, int8, uint16) ownrecv;
setModuleInfo(string []) airecv clsend;
setDISLname(string) ram;
setDISLid(uint32) ram db airecv;
flagAv(uint32, uint16, string []) airecv ownsend;
@ -2889,7 +2888,7 @@ dclass DistributedStartingBlock : DistributedObject {
setPadDoId(uint32) required broadcast ram;
setPosHpr(int16/10, int16/10, int16/10, int16/10, int16/10, int16/10) required broadcast ram;
setPadLocationId(uint8) required broadcast ram;
requestEnter(uint8) airecv clsend;
requestEnter() airecv clsend;
rejectEnter(uint8);
requestExit() airecv clsend;
setOccupied(uint32) broadcast ram;

View file

@ -2,7 +2,7 @@
from pandac.PandaModules import *
hashVal = 660566761
hashVal = 2950658935L
from toontown.coghq import DistributedCashbotBossSafe, DistributedCashbotBossCrane, DistributedBattleFactory, DistributedCashbotBossTreasure, DistributedCogHQDoor, DistributedSellbotHQDoor, DistributedFactoryElevatorExt, DistributedMintElevatorExt, DistributedLawOfficeElevatorExt, DistributedLawOfficeElevatorInt, LobbyManager, DistributedMegaCorp, DistributedFactory, DistributedLawOffice, DistributedLawOfficeFloor, DistributedLift, DistributedDoorEntity, DistributedSwitch, DistributedButton, DistributedTrigger, DistributedCrushableEntity, DistributedCrusherEntity, DistributedStomper, DistributedStomperPair, DistributedLaserField, DistributedGolfGreenGame, DistributedSecurityCamera, DistributedMover, DistributedElevatorMarker, DistributedBarrelBase, DistributedGagBarrel, DistributedBeanBarrel, DistributedHealBarrel, DistributedGrid, ActiveCell, DirectionalCell, CrusherCell, DistributedCrate, DistributedSinkingPlatform, BattleBlocker, DistributedMint, DistributedMintRoom, DistributedMintBattle, DistributedStage, DistributedStageRoom, DistributedStageBattle, DistributedLawbotBossGavel, DistributedLawbotCannon, DistributedLawbotChair, DistributedCogKart, DistributedCountryClub, DistributedCountryClubRoom, DistributedMoleField, DistributedCountryClubBattle, DistributedMaze, DistributedFoodBelt, DistributedBanquetTable, DistributedGolfSpot

View file

@ -70,7 +70,6 @@ class OTPClientRepository(ClientRepositoryBase):
self.http = HTTPClient()
self.userSignature = base.config.GetString('signature', 'none')
self.__isPaid = 1
self.parentMgr.registerParent(OTPGlobals.SPRender, base.render)
self.parentMgr.registerParent(OTPGlobals.SPHidden, NodePath())
self.timeManager = None
@ -1335,25 +1334,6 @@ class OTPClientRepository(ClientRepositoryBase):
def exitSwitchShards(self):
pass
def isPaid(self):
paidStatus = base.config.GetString('force-paid-status', '')
if not paidStatus:
return self.__isPaid
elif paidStatus == 'paid':
return 1
elif paidStatus == 'unpaid':
return 0
elif paidStatus == 'FULL':
return OTPGlobals.AccessFull
else:
return 0
def setIsPaid(self, isPaid):
self.__isPaid = isPaid
def allowFreeNames(self):
return base.config.GetInt('allow-free-names', 1)
def getStartingDistrict(self):
district = None
if len(self.activeDistrictMap.keys()) == 0:

View file

@ -85,9 +85,6 @@ class DummyLauncherBase:
def setUserLoggedIn(self):
self.userLoggedIn = 1
def setPaidUserLoggedIn(self):
self.paidUserLoggedIn = 1
def getGameServer(self):
return '206.16.11.19'

View file

@ -87,7 +87,6 @@ class LauncherBase(DirectObject):
NewInstallationKey = 'IS_NEW_INSTALLATION'
LastLoginKey = 'LAST_LOGIN'
UserLoggedInKey = 'USER_LOGGED_IN'
PaidUserLoggedInKey = 'PAID_USER_LOGGED_IN'
ReferrerKey = 'REFERRER_CODE'
PeriodNameKey = 'PERIOD_NAME'
SwidKey = 'SWID'
@ -1555,9 +1554,6 @@ class LauncherBase(DirectObject):
def setUserLoggedIn(self):
self.setValue(self.UserLoggedInKey, '1')
def setPaidUserLoggedIn(self):
self.setValue(self.PaidUserLoggedInKey, '1')
def getReferrerCode(self):
return self.getValue(self.ReferrerKey, None)

View file

@ -316,9 +316,6 @@ NameShopSubmitButton = 'Submit'
RejectNameText = 'That name is not allowed. Please try again.'
WaitingForNameSubmission = 'Submitting your name...'
NameShopNameMaster = 'NameMasterEnglish.txt'
NameShopPay = 'Subscribe Now!'
NameShopPlay = 'Free Trial'
NameShopOnlyPaid = 'Only paid users\nmay name their Toons.\nUntil you subscribe\nyour name will be\n'
NameShopContinueSubmission = 'Continue Submission'
NameShopChooseAnother = 'Choose Another Name'
NameShopToonCouncil = 'The Toon Council\nwill review your\nname. ' + 'Review may\ntake a few days.\nWhile you wait\nyour name will be\n '
@ -358,9 +355,6 @@ WhisperIncomingEvent = 'whisperIncomingEvent'
ChatFeedback_PassedBlacklist = 32
ChatFeedback_Whitelist = 64
ChatFeedback_OpenChat = 128
AccessUnknown = 0
AccessFull = 2
AccessInvalid = 3
AvatarPendingCreate = -1
AvatarSlotUnavailable = -2
AvatarSlotAvailable = -3

View file

@ -2678,9 +2678,6 @@ NameShopSubmitButton = 'Submit'
RejectNameText = 'That name is not allowed. Please try again.'
WaitingForNameSubmission = 'Submitting your name...'
NameShopNameMaster = 'NameMasterEnglish.txt'
NameShopPay = 'Subscribe'
NameShopPlay = 'Free Trial'
NameShopOnlyPaid = 'Only paid users\nmay name their Toons.\nUntil you subscribe\nyour name will be\n'
NameShopContinueSubmission = 'Continue Submission'
NameShopChooseAnother = 'Choose Another Name'
NameShopToonCouncil = 'The Toon Council\nwill review your\nname. ' + 'Review may\ntake a few days.\nWhile you wait\nyour name will be\n '

View file

@ -449,18 +449,6 @@ class NewsManager(DistributedObject.DistributedObject):
def setTrolleyWeekendEnd(self):
base.localAvatar.setSystemMessage(0, TTLocalizer.TrolleyWeekendEnd)
def setRoamingTrialerWeekendStart(self):
base.localAvatar.setSystemMessage(0, TTLocalizer.RoamingTrialerWeekendStart)
base.roamingTrialers = True
def setRoamingTrialerWeekendOngoing(self):
base.localAvatar.setSystemMessage(0, TTLocalizer.RoamingTrialerWeekendOngoing)
base.roamingTrialers = True
def setRoamingTrialerWeekendEnd(self):
base.localAvatar.setSystemMessage(0, TTLocalizer.RoamingTrialerWeekendEnd)
base.roamingTrialers = False
def setMoreXpHolidayStart(self):
base.localAvatar.setSystemMessage(0, TTLocalizer.MoreXpHolidayStart)
@ -586,8 +574,6 @@ class NewsManager(DistributedObject.DistributedObject):
self.setCircuitRaceOngoing()
elif id == 21:
self.setTrolleyHolidayOngoing()
elif id == 22:
self.setRoamingTrialerWeekendOngoing()
def setWeeklyCalendarHolidays(self, weeklyCalendarHolidays):
self.weeklyCalendarHolidays = weeklyCalendarHolidays

View file

@ -44,12 +44,6 @@ class NewsManagerAI(DistributedObjectAI):
def setTrolleyWeekendEnd(self):
pass
def setRoamingTrialerWeekendStart(self):
pass
def setRoamingTrialerWeekendEnd(self):
pass
def setInvasionStatus(self, msgType, cogType, numRemaining, skeleton):
self.sendUpdate('setInvasionStatus', args=[msgType, cogType, numRemaining, skeleton])

View file

@ -235,12 +235,7 @@ class RewardPanel(DirectFrame):
trackIncLabel.hide()
if toon.hasTrackAccess(i):
trackBar.show()
if curExp >= ToontownBattleGlobals.UnpaidMaxSkills[i] and toon.getGameAccess() != OTPGlobals.AccessFull:
nextExp = self.getNextExpValue(curExp, i)
trackBar['range'] = nextExp
trackBar['value'] = ToontownBattleGlobals.UnpaidMaxSkills[i]
trackBar['text'] = TTLocalizer.InventoryGuestExp
elif curExp >= ToontownBattleGlobals.regMaxSkill:
if curExp >= ToontownBattleGlobals.regMaxSkill:
nextExp = self.getNextExpValueUber(curExp, i)
trackBar['range'] = nextExp
uberCurrExp = curExp - ToontownBattleGlobals.regMaxSkill
@ -260,10 +255,7 @@ class RewardPanel(DirectFrame):
oldValue = trackBar['value']
newValue = min(ToontownBattleGlobals.MaxSkill, newValue)
nextExp = self.getNextExpValue(newValue, track)
if newValue >= ToontownBattleGlobals.UnpaidMaxSkills[track] and toon.getGameAccess() != OTPGlobals.AccessFull:
newValue = oldValue
trackBar['text'] = TTLocalizer.GuestLostExp
elif newValue >= ToontownBattleGlobals.regMaxSkill:
if newValue >= ToontownBattleGlobals.regMaxSkill:
newValue = newValue - ToontownBattleGlobals.regMaxSkill
nextExp = self.getNextExpValueUber(newValue, track)
trackBar['text'] = TTLocalizer.InventoryUberTrackExp % {'nextExp': ToontownBattleGlobals.UberSkill - newValue}
@ -428,10 +420,8 @@ class RewardPanel(DirectFrame):
intervalList = [Func(self.endTrack, toon, toonList, track), Wait(2.0), Func(self.cleanIcon)]
return intervalList
def showTrackIncLabel(self, track, earnedSkill, guestWaste = 0):
if guestWaste:
self.trackIncLabels[track]['text'] = ''
elif earnedSkill > 0:
def showTrackIncLabel(self, track, earnedSkill):
if earnedSkill > 0:
self.trackIncLabels[track]['text'] = '+ ' + str(earnedSkill)
elif earnedSkill < 0:
self.trackIncLabels[track]['text'] = ' ' + str(earnedSkill)
@ -441,16 +431,12 @@ class RewardPanel(DirectFrame):
self.meritIncLabels[dept]['text'] = '+ ' + str(earnedMerits)
self.meritIncLabels[dept].show()
def getTrackIntervalList(self, toon, track, origSkill, earnedSkill, hasUber, guestWaste = 0):
def getTrackIntervalList(self, toon, track, origSkill, earnedSkill, hasUber):
if hasUber < 0:
print (toon.doId, 'Reward Panel received an invalid hasUber from an uberList')
tickDelay = 1.0 / 60
intervalList = []
if origSkill + earnedSkill >= ToontownBattleGlobals.UnpaidMaxSkills[track] and toon.getGameAccess() != OTPGlobals.AccessFull:
lostExp = origSkill + earnedSkill - ToontownBattleGlobals.UnpaidMaxSkills[track]
intervalList.append(Func(self.showTrackIncLabel, track, lostExp, 1))
else:
intervalList.append(Func(self.showTrackIncLabel, track, earnedSkill))
intervalList.append(Func(self.showTrackIncLabel, track, earnedSkill))
barTime = 0.5
numTicks = int(math.ceil(barTime / tickDelay))
for i in xrange(numTicks):
@ -464,9 +450,7 @@ class RewardPanel(DirectFrame):
nextExpValue = self.getNextExpValue(origSkill, track)
finalGagFlag = 0
while origSkill + earnedSkill >= nextExpValue and origSkill < nextExpValue and not finalGagFlag:
if newValue >= ToontownBattleGlobals.UnpaidMaxSkills[track] and toon.getGameAccess() != OTPGlobals.AccessFull:
pass
elif nextExpValue != ToontownBattleGlobals.MaxSkill:
if nextExpValue != ToontownBattleGlobals.MaxSkill:
intervalList += self.getNewGagIntervalList(toon, track, ToontownBattleGlobals.Levels[track].index(nextExpValue))
newNextExpValue = self.getNextExpValue(nextExpValue, track)
if newNextExpValue == nextExpValue:

View file

@ -7,7 +7,6 @@ BOARDCODE_MINLAFF = -1
BOARDCODE_PROMOTION = -2
BOARDCODE_BATTLE = -3
BOARDCODE_SPACE = -4
BOARDCODE_NOT_PAID = -5
BOARDCODE_DIFF_GROUP = -6
BOARDCODE_PENDING_INVITE = -7
BOARDCODE_IN_ELEVATOR = -8

View file

@ -225,8 +225,6 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
rejectText = TTLocalizer.BoardingInvitePromotionInvitee % avatarNameText
if reason == BoardingPartyBase.BOARDCODE_BATTLE:
rejectText = TTLocalizer.TeleportPanelNotAvailable % avatarNameText
if reason == BoardingPartyBase.BOARDCODE_NOT_PAID:
rejectText = TTLocalizer.BoardingInviteNotPaidInvitee % avatarNameText
if reason == BoardingPartyBase.BOARDCODE_DIFF_GROUP:
rejectText = TTLocalizer.BoardingInviteeInDiffGroup % avatarNameText
if reason == BoardingPartyBase.BOARDCODE_PENDING_INVITE:

View file

@ -149,11 +149,6 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi
# Lets see what the invitee is currently doing
inviteeOkay = self.checkBoard(inviteeId, self.elevatorIdList[0])
reason = 0
# Oh, for the days when we are charging for this game.. :)
if inviteeOkay == REJECT_NOTPAID:
reason = BoardingPartyBase.BOARDCODE_NOT_PAID
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0])
return
# I know there is an unexpected issue here when we are merging groups... lets think about this really hard..
if len(self.elevatorIdList) == 1:
if inviteeOkay:
@ -354,11 +349,8 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi
def checkBoard(self, avId, elevatorId):
elevator = simbase.air.doId2do.get(elevatorId)
avatar = simbase.air.doId2do.get(avId)
if avatar:
if not avatar.getGameAccess() == OTPGlobals.AccessFull:
return REJECT_NOTPAID
elif elevator:
return elevator.checkBoard(avatar)
if avatar and elevator:
return elevator.checkBoard(avatar)
return REJECT_BOARDINGPARTY
def testBoard(self, leaderId, elevatorId, needSpace = 0):

View file

@ -17,7 +17,6 @@ REJECT_PROMOTION = 4
REJECT_BLOCKED_ROOM = 5
REJECT_NOT_YET_AVAILABLE = 6
REJECT_BOARDINGPARTY = 7
REJECT_NOTPAID = 8
MAX_GROUP_BOARDING_TIME = 6.0
if __dev__:
try:

View file

@ -28,19 +28,15 @@ class SuitInterior(Place.Place):
'died',
'teleportOut',
'Elevator',
'DFA',
'trialerFA']),
'DFA']),
State.State('sit', self.enterSit, self.exitSit, ['walk']),
State.State('stickerBook', self.enterStickerBook, self.exitStickerBook, ['walk',
'stopped',
'sit',
'died',
'DFA',
'trialerFA',
'teleportOut',
'Elevator']),
State.State('trialerFA', self.enterTrialerFA, self.exitTrialerFA, ['trialerFAReject', 'DFA']),
State.State('trialerFAReject', self.enterTrialerFAReject, self.exitTrialerFAReject, ['walk']),
State.State('DFA', self.enterDFA, self.exitDFA, ['DFAReject', 'teleportOut']),
State.State('DFAReject', self.enterDFAReject, self.exitDFAReject, ['walk']),
State.State('teleportIn', self.enterTeleportIn, self.exitTeleportIn, ['walk']),
@ -102,7 +98,7 @@ class SuitInterior(Place.Place):
messenger.send(self.doneEvent)
def doRequestLeave(self, requestStatus):
self.fsm.request('trialerFA', [requestStatus])
self.fsm.request('DFA', [requestStatus])
def enterEntrance(self):
pass

View file

@ -38,7 +38,6 @@ class ToonInterior(Place.Place):
'stickerBook',
'doorOut',
'DFA',
'trialerFA',
'teleportOut',
'quest',
'purchase',
@ -48,7 +47,6 @@ class ToonInterior(Place.Place):
State.State('sit', self.enterSit, self.exitSit, ['walk']),
State.State('stickerBook', self.enterStickerBook, self.exitStickerBook, ['walk',
'DFA',
'trialerFA',
'sit',
'doorOut',
'teleportOut',
@ -57,8 +55,6 @@ class ToonInterior(Place.Place):
'phone',
'stopped',
'pet']),
State.State('trialerFA', self.enterTrialerFA, self.exitTrialerFA, ['trialerFAReject', 'DFA']),
State.State('trialerFAReject', self.enterTrialerFAReject, self.exitTrialerFAReject, ['walk']),
State.State('DFA', self.enterDFA, self.exitDFA, ['DFAReject',
'HFA',
'NPCFA',
@ -128,7 +124,7 @@ class ToonInterior(Place.Place):
pass
def doRequestLeave(self, requestStatus):
self.fsm.request('trialerFA', [requestStatus])
self.fsm.request('DFA', [requestStatus])
def enterDFACallback(self, requestStatus, doneStatus):
self.dfa.exit()

View file

@ -293,14 +293,7 @@ class CatalogItemPanel(DirectFrame):
else:
auxText = ''
isNameTag = typeCode == CatalogItemTypes.NAMETAG_ITEM
if isNameTag and not base.localAvatar.getGameAccess() == OTPGlobals.AccessFull:
if self['item'].nametagStyle == 100:
if base.localAvatar.getFont() == ToontownGlobals.getToonFont():
auxText = TTLocalizer.CatalogCurrent
self.buyButton['state'] = DGG.DISABLED
elif self['item'].getPrice(self['type']) > base.localAvatar.getMoney() + base.localAvatar.getBankMoney():
self.buyButton['state'] = DGG.DISABLED
elif isNameTag and self['item'].nametagStyle == base.localAvatar.getNametagStyle():
if isNameTag and self['item'].nametagStyle == base.localAvatar.getNametagStyle():
auxText = TTLocalizer.CatalogCurrent
self.buyButton['state'] = DGG.DISABLED
elif self['item'].reachedPurchaseLimit(base.localAvatar):

View file

@ -35,7 +35,7 @@ class CatalogNametagItem(CatalogItem.CatalogItem):
def getName(self):
if self.nametagStyle == 100:
name = TTLocalizer.UnpaidNameTag
name = TTLocalizer.BasicNametag
else:
name = TTLocalizer.NametagFontNames[self.nametagStyle]
if TTLocalizer.NametagReverse:
@ -44,7 +44,7 @@ class CatalogNametagItem(CatalogItem.CatalogItem):
name = name + TTLocalizer.NametagLabel
return name
if self.nametagStyle == 0:
name = TTLocalizer.NametagPaid
name = TTLocalizer.NametagCitizen
elif self.nametagStyle == 1:
name = TTLocalizer.NametagAction
elif self.nametagStyle == 2:

View file

@ -39,19 +39,15 @@ class CogdoInterior(Place.Place):
'teleportOut',
'Elevator',
'crane',
'DFA',
'trialerFA']),
'DFA']),
State.State('sit', self.enterSit, self.exitSit, ['walk']),
State.State('stickerBook', self.enterStickerBook, self.exitStickerBook, ['walk',
'stopped',
'sit',
'died',
'DFA',
'trialerFA',
'teleportOut',
'Elevator']),
State.State('trialerFA', self.enterTrialerFA, self.exitTrialerFA, ['trialerFAReject', 'DFA']),
State.State('trialerFAReject', self.enterTrialerFAReject, self.exitTrialerFAReject, ['walk']),
State.State('DFA', self.enterDFA, self.exitDFA, ['DFAReject', 'teleportOut']),
State.State('DFAReject', self.enterDFAReject, self.exitDFAReject, ['walk']),
State.State('teleportIn', self.enterTeleportIn, self.exitTeleportIn, ['walk']),
@ -110,7 +106,7 @@ class CogdoInterior(Place.Place):
messenger.send(self.doneEvent)
def doRequestLeave(self, requestStatus):
self.fsm.request('trialerFA', [requestStatus])
self.fsm.request('DFA', [requestStatus])
def enterEntrance(self):
pass

View file

@ -4,6 +4,7 @@ from toontown.toonbase import TTLocalizer
from direct.showbase import PythonUtil
from otp.otpbase import OTPGlobals
from toontown.battle import SuitBattleGlobals
PartsPerSuit = (10,
10,
10,
@ -120,7 +121,6 @@ PartsQueryNames = ({1: PartNameStrings[0],
65536: PartNameStrings[15]})
suitTypes = PythonUtil.Enum(('NoSuit', 'NoMerits', 'FullSuit'))
def makeMeritHierarchy(baseMerits):
meritHierarchy = []
for _ in xrange(SuitDNA.suitsPerDept):
@ -132,7 +132,6 @@ def makeMeritHierarchy(baseMerits):
baseMerits /= 2
return meritHierarchy
MeritsPerLevel = makeMeritHierarchy(100) # Bossbot
MeritsPerLevel += makeMeritHierarchy(75) # Lawbot
MeritsPerLevel += makeMeritHierarchy(50) # Cashbot
@ -147,7 +146,6 @@ def getNextPart(parts, partIndex, dept):
nextPart = nextPart + 1 >> 1
return nextPart
def getPartName(partArray):
index = 0
for part in partArray:
@ -155,7 +153,6 @@ def getPartName(partArray):
return PartsQueryNames[index][part]
index += 1
def isSuitComplete(parts, dept):
dept = dept2deptIndex(dept)
for p in xrange(len(PartsQueryMasks)):
@ -164,18 +161,6 @@ def isSuitComplete(parts, dept):
return 1
def isPaidSuitComplete(av, parts, dept):
isPaid = 0
base = getBase()
if av and av.getGameAccess() == OTPGlobals.AccessFull:
isPaid = 1
if isPaid:
if isSuitComplete(parts, dept):
return 1
return 0
def getTotalMerits(toon, index):
from toontown.battle import SuitBattleGlobals
cogIndex = toon.cogTypes[index] + SuitDNA.suitsPerDept * index
@ -185,7 +170,6 @@ def getTotalMerits(toon, index):
cogLevel = max(min(cogLevel, len(MeritsPerLevel[cogIndex]) - 1), 0)
return MeritsPerLevel[cogIndex][cogLevel]
def getTotalParts(bitString, shiftWidth = 32):
sum = 0
for shift in xrange(0, shiftWidth):
@ -193,7 +177,6 @@ def getTotalParts(bitString, shiftWidth = 32):
return sum
def asBitstring(number):
array = []
shift = 0
@ -212,7 +195,6 @@ def asBitstring(number):
return str
def asNumber(bitstring):
num = 0
for i in xrange(0, len(bitstring)):
@ -221,8 +203,7 @@ def asNumber(bitstring):
return num
def dept2deptIndex(dept):
if type(dept) == types.StringType:
dept = SuitDNA.suitDepts.index(dept)
return dept
return dept

View file

@ -274,7 +274,7 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository):
''], newDNA.makeNetString(), index, 1)
avList.append(self.newPotAv)
base.transitions.noFade()
self.avCreate = MakeAToon.MakeAToon(self.loginFSM, avList, 'makeAToonComplete', index, self.isPaid())
self.avCreate = MakeAToon.MakeAToon(self.loginFSM, avList, 'makeAToonComplete', index)
self.avCreate.load()
self.avCreate.enter()
self.accept('makeAToonComplete', self.__handleMakeAToon, [avList, index])

View file

@ -31,7 +31,6 @@ class DistributedTrunk(DistributedCloset.DistributedCloset):
self.glassesDeleted = 0
self.backpackDeleted = 0
self.shoesDeleted = 0
self.isFreePlayer = 0
def printInfo(self):
print 'avid: %s, gender: %s' % (self.av.doId, self.av.style.gender)
@ -55,11 +54,6 @@ class DistributedTrunk(DistributedCloset.DistributedCloset):
self.customerId = avId
self.av = self.cr.doId2do.get(self.customerId, None)
if self.av:
if self.av.getGameAccess() != ToontownGlobals.AccessFull:
self.isOwner = 0
self.isFreePlayer = 1
else:
self.isFreePlayer = 0
if base.localAvatar.getDoId() == self.customerId:
self.gender = self.av.style.gender
self.hatList = hatList
@ -334,11 +328,7 @@ class DistributedTrunk(DistributedCloset.DistributedCloset):
self.accept(self.deleteEvent, self.__handleDelete)
buttons = loader.loadModel('phase_3/models/gui/dialog_box_buttons_gui')
okButtonImage = (buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr'))
if self.isFreePlayer:
textMsg = TTLocalizer.TrunkNotPaidMessage
else:
textMsg = TTLocalizer.TrunkNotOwnerMessage
self.popupInfo = DirectFrame(parent=hidden, relief=None, state='normal', text=textMsg, frameSize=(-1, 1, -1, 1), text_wordwrap=10, geom=DGG.getDefaultDialogGeom(), geom_color=ToontownGlobals.GlobalDialogColor, geom_scale=(0.88, 1, 0.55), geom_pos=(0, 0, -.08), text_scale=0.08, text_pos=(0, 0.06))
self.popupInfo = DirectFrame(parent=hidden, relief=None, state='normal', text=TTLocalizer.TrunkNotOwnerMessage, frameSize=(-1, 1, -1, 1), text_wordwrap=10, geom=DGG.getDefaultDialogGeom(), geom_color=ToontownGlobals.GlobalDialogColor, geom_scale=(0.88, 1, 0.55), geom_pos=(0, 0, -.08), text_scale=0.08, text_pos=(0, 0.06))
DirectButton(self.popupInfo, image=okButtonImage, relief=None, text=TTLocalizer.ClosetPopupOK, text_scale=0.05, text_pos=(0.0, -0.1), textMayChange=0, pos=(0.0, 0.0, -0.21), command=self._handleNotOwnerMessageOK)
buttons.removeNode()
self.popupInfo.reparentTo(aspect2d)

View file

@ -42,7 +42,6 @@ class Estate(Place.Place):
'mailbox',
'stopped',
'DFA',
'trialerFA',
'doorOut',
'push',
'pet']),
@ -58,8 +57,7 @@ class Estate(Place.Place):
'doorOut',
'push',
'pet',
'DFA',
'trialerFA']),
'DFA']),
State.State('teleportIn', self.enterTeleportIn, self.exitTeleportIn, ['walk', 'petTutorial']),
State.State('teleportOut', self.enterTeleportOut, self.exitTeleportOut, ['teleportIn', 'walk', 'final']),
State.State('doorIn', self.enterDoorIn, self.exitDoorIn, ['walk']),
@ -69,9 +67,7 @@ class Estate(Place.Place):
State.State('fishing', self.enterFishing, self.exitFishing, ['walk', 'stopped']),
State.State('mailbox', self.enterMailbox, self.exitMailbox, ['walk', 'stopped']),
State.State('stopped', self.enterStopped, self.exitStopped, ['walk']),
State.State('pet', self.enterPet, self.exitPet, ['walk', 'trialerFA']),
State.State('trialerFA', self.enterTrialerFA, self.exitTrialerFA, ['trialerFAReject', 'DFA']),
State.State('trialerFAReject', self.enterTrialerFAReject, self.exitTrialerFAReject, ['walk']),
State.State('pet', self.enterPet, self.exitPet, ['walk', 'DFA']),
State.State('DFA', self.enterDFA, self.exitDFA, ['DFAReject', 'teleportOut']),
State.State('DFAReject', self.enterDFAReject, self.exitDFAReject, ['walk'])], 'init', 'final')
self.fsm.enterInitialState()
@ -178,7 +174,7 @@ class Estate(Place.Place):
self.fsm.request('walk')
def doRequestLeave(self, requestStatus):
self.fsm.request('trialerFA', [requestStatus])
self.fsm.request('DFA', [requestStatus])
def enterInit(self):
pass

View file

@ -69,8 +69,6 @@ def showFriendsListTutorial():
if globalFriendsList == None:
globalFriendsList = FriendsListPanel()
globalFriendsList.enter()
if not base.cr.isPaid():
globalFriendsList.secrets['state'] = DGG.DISABLED
globalFriendsList.closeCommand = globalFriendsList.close['command']
globalFriendsList.close['command'] = None
return
@ -80,8 +78,6 @@ def hideFriendsListTutorial():
if globalFriendsList != None:
if hasattr(globalFriendsList, 'closeCommand'):
globalFriendsList.close['command'] = globalFriendsList.closeCommand
if not base.cr.isPaid():
globalFriendsList.secrets['state'] = DGG.NORMAL
globalFriendsList.exit()
return

View file

@ -5,7 +5,6 @@ from direct.fsm import StateData
from direct.showbase.PythonUtil import PriorityCallbacks
from toontown.safezone import PublicWalk
from toontown.launcher import DownloadForceAcknowledge
import TrialerForceAcknowledge
import ZoneUtil
from toontown.friends import FriendsListManager
from toontown.toonbase import ToontownGlobals
@ -27,9 +26,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager):
FriendsListManager.FriendsListManager.__init__(self)
self.loader = loader
self.dfaDoneEvent = 'dfaDoneEvent'
self.trialerFADoneEvent = 'trialerFADoneEvent'
self.zoneId = None
self.trialerFA = None
self._tiToken = None
self._leftQuietZoneLocalCallbacks = PriorityCallbacks()
self._leftQuietZoneSubframeCall = None
@ -63,9 +60,6 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager):
self.walkStateData.unload()
del self.walkStateData
del self.loader
if self.trialerFA:
self.trialerFA.exit()
del self.trialerFA
return
def _getQZState(self):
@ -176,9 +170,6 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager):
if teleportIn == 0:
self.walkStateData.fsm.request('walking')
self.acceptOnce(self.walkDoneEvent, self.handleWalkDone)
if not base.cr.isPaid() and base.localAvatar.tutorialAck:
base.localAvatar.chatMgr.obscure(0, 0)
base.localAvatar.chatMgr.normalButton.show()
self.accept('teleportQuery', self.handleTeleportQuery)
base.localAvatar.setTeleportAvailable(1)
base.localAvatar.questPage.acceptOnscreenHooks()
@ -477,29 +468,6 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager):
def exitDFAReject(self):
pass
def enterTrialerFA(self, requestStatus):
teleportDebug(requestStatus, 'enterTrialerFA(%s)' % requestStatus)
self.acceptOnce(self.trialerFADoneEvent, self.trialerFACallback, [requestStatus])
self.trialerFA = TrialerForceAcknowledge.TrialerForceAcknowledge(self.trialerFADoneEvent)
self.trialerFA.enter(requestStatus['hoodId'])
def exitTrialerFA(self):
pass
def trialerFACallback(self, requestStatus, doneStatus):
if doneStatus['mode'] == 'pass':
self.fsm.request('DFA', [requestStatus])
elif doneStatus['mode'] == 'fail':
self.fsm.request('trialerFAReject')
else:
Place.notify.error('Unknown done status for TrialerForceAcknowledge: %s' % doneStatus)
def enterTrialerFAReject(self):
self.fsm.request('walk')
def exitTrialerFAReject(self):
pass
def enterDoorIn(self, requestStatus):
NametagGlobals.setWant2dNametags(False)
door = base.cr.doId2do.get(requestStatus['doorDoId'])

View file

@ -1,49 +0,0 @@
from pandac.PandaModules import *
from toontown.toonbase import TTLocalizer
import ZoneUtil
from toontown.toonbase import ToontownGlobals
class TrialerForceAcknowledge:
def __init__(self, doneEvent):
self.doneEvent = doneEvent
self.dialog = None
return
def enter(self, destHood):
doneStatus = {}
def letThrough(self = self, doneStatus = doneStatus):
doneStatus['mode'] = 'pass'
messenger.send(self.doneEvent, [doneStatus])
if not base.restrictTrialers:
letThrough()
return
if base.roamingTrialers:
letThrough()
return
if base.cr.isPaid():
letThrough()
return
if ZoneUtil.getCanonicalHoodId(destHood) in (ToontownGlobals.ToontownCentral, ToontownGlobals.MyEstate, ToontownGlobals.GoofySpeedway):
letThrough()
return
else:
try:
base.localAvatar.b_setAnimState('neutral', 1)
except:
pass
doneStatus['mode'] = 'fail'
self.doneStatus = doneStatus
def exit(self):
if self.dialog:
self.dialog.cleanup()
self.dialog.unload()
self.dialog = None
return
def handleOk(self):
messenger.send(self.doneEvent, [self.doneStatus])

View file

@ -191,11 +191,9 @@ def getSafeZoneId(zoneId):
def getCanonicalHoodId(zoneId):
return getHoodId(getCanonicalZoneId(zoneId))
def getCanonicalSafeZoneId(zoneId):
return getSafeZoneId(getCanonicalZoneId(zoneId))
def isInterior(zoneId):
if tutorialDict:
if zoneId in tutorialDict['interiors']:
@ -206,7 +204,6 @@ def isInterior(zoneId):
r = zoneId % 1000 >= 500
return r
def overrideOn(branch, exteriorList, interiorList):
global tutorialDict
if tutorialDict:
@ -215,13 +212,11 @@ def overrideOn(branch, exteriorList, interiorList):
'exteriors': exteriorList,
'interiors': interiorList}
def overrideOff():
global tutorialDict
tutorialDict = None
return
def getWakeInfo(hoodId = None, zoneId = None):
wakeWaterHeight = 0
showWake = 0
@ -247,3 +242,8 @@ def getWakeInfo(hoodId = None, zoneId = None):
pass
return (showWake, wakeWaterHeight)
def canWearSuit(zoneId):
zoneId = getCanonicalHoodId(zoneId)
return zoneId >= DynamicZonesBegin or zoneId in [LawbotHQ, CashbotHQ, SellbotHQ, BossbotHQ]

View file

@ -23,8 +23,7 @@ from toontown.toontowngui import TTDialog
class MakeAToon(StateData.StateData):
notify = DirectNotifyGlobal.directNotify.newCategory('MakeAToon')
def __init__(self, parentFSM, avList, doneEvent, index, isPaid):
self.isPaid = isPaid
def __init__(self, parentFSM, avList, doneEvent, index):
StateData.StateData.__init__(self, doneEvent)
self.phase = 3
self.names = ['',
@ -64,7 +63,7 @@ class MakeAToon(StateData.StateData):
self.cos = ColorShop.ColorShop('ColorShop-done')
self.cls = MakeClothesGUI.MakeClothesGUI('ClothesShop-done')
self.ts = TrackShop.TrackShop('TrackShop-done')
self.ns = NameShop.NameShop(self, 'NameShop-done', avList, index, self.isPaid, )
self.ns = NameShop.NameShop(self, 'NameShop-done', avList, index)
self.shop = GENDERSHOP
self.music = None
self.soundBack = None
@ -651,9 +650,6 @@ class MakeAToon(StateData.StateData):
if self.ns.getDoneStatus() == 'last':
self.ns.hideAll()
self.goToLastShop()
elif self.ns.getDoneStatus() == 'paynow':
self.doneStatus = 'paynow'
base.transitions.fadeOut(finishIval=EventInterval(self.doneEvent))
else:
self.doneStatus = 'created'
base.transitions.fadeOut(finishIval=EventInterval(self.doneEvent))

View file

@ -30,10 +30,9 @@ ServerDialogTimeout = 3.0
class NameShop(StateData.StateData):
notify = DirectNotifyGlobal.directNotify.newCategory('NameShop')
def __init__(self, makeAToon, doneEvent, avList, index, isPaid):
def __init__(self, makeAToon, doneEvent, avList, index):
StateData.StateData.__init__(self, doneEvent)
self.makeAToon = makeAToon
self.isPaid = isPaid
self.avList = avList
self.index = index
self.avId = -1
@ -75,8 +74,7 @@ class NameShop(StateData.StateData):
self.textRolloverColor = Vec4(1, 1, 0, 1)
self.textDownColor = Vec4(0.5, 0.9, 1, 1)
self.textDisabledColor = Vec4(0.4, 0.8, 0.4, 1)
self.fsm = ClassicFSM.ClassicFSM('NameShop', [State.State('Init', self.enterInit, self.exitInit, ['PayState']),
State.State('PayState', self.enterPayState, self.exitPayState, ['PickAName']),
self.fsm = ClassicFSM.ClassicFSM('NameShop', [State.State('Init', self.enterInit, self.exitInit, ['PickAName']),
State.State('PickAName', self.enterPickANameState, self.exitPickANameState, ['TypeAName', 'Done']),
State.State('TypeAName', self.enterTypeANameState, self.exitTypeANameState, ['PickAName',
'Approval',
@ -212,7 +210,7 @@ class NameShop(StateData.StateData):
self.acceptOnce('last', self.__handleBackward)
self.acceptOnce('skipTutorial', self.__handleSkipTutorial)
self.__listsChanged()
self.fsm.request('PayState')
self.fsm.request('PickAName')
return
def __overflowNameInput(self):
@ -441,16 +439,6 @@ class NameShop(StateData.StateData):
nameBalloon.removeNode()
imageList = (guiButton.find('**/QuitBtn_UP'), guiButton.find('**/QuitBtn_DN'), guiButton.find('**/QuitBtn_RLVR'))
buttonImage = [imageList, imageList]
buttonText = [TTLocalizer.NameShopPay, TTLocalizer.NameShopPlay]
self.payDialog = DirectDialog(dialogName='paystate', topPad=0, fadeScreen=0.2, pos=(0, 0.1, 0.1), button_relief=None, text_align=TextNode.ACenter, text=TTLocalizer.NameShopOnlyPaid, buttonTextList=buttonText, buttonImageList=buttonImage, image_color=GlobalDialogColor, buttonValueList=[1, 0], command=self.payAction)
self.payDialog.buttonList[0].setPos(0, 0, -.27)
self.payDialog.buttonList[1].setPos(0, 0, -.4)
self.payDialog.buttonList[0]['image_scale'] = (1.2, 1, 1.1)
self.payDialog.buttonList[1]['image_scale'] = (1.2, 1, 1.1)
self.payDialog['image_scale'] = (0.8, 1, 0.77)
self.payDialog.buttonList[0]['text_pos'] = (0, -.02)
self.payDialog.buttonList[1]['text_pos'] = (0, -.02)
self.payDialog.hide()
buttonText = [TTLocalizer.NameShopContinueSubmission, TTLocalizer.NameShopChooseAnother]
self.approvalDialog = DirectDialog(dialogName='approvalstate', topPad=0, fadeScreen=0.2, pos=(0, 0.1, 0.1), button_relief=None, image_color=GlobalDialogColor, text_align=TextNode.ACenter, text=TTLocalizer.NameShopToonCouncil, buttonTextList=buttonText, buttonImageList=buttonImage, buttonValueList=[1, 0], command=self.approvalAction)
self.approvalDialog.buttonList[0].setPos(0, 0, -.3)
@ -514,9 +502,7 @@ class NameShop(StateData.StateData):
self.uberdestroy(self.pickANameGUIElements)
self.uberdestroy(self.typeANameGUIElements)
del self.toon
self.payDialog.cleanup()
self.approvalDialog.cleanup()
del self.payDialog
del self.approvalDialog
self.parentFSM.getStateNamed('NameShop').removeChild(self.fsm)
del self.parentFSM
@ -701,28 +687,6 @@ class NameShop(StateData.StateData):
def exitInit(self):
pass
def enterPayState(self):
self.notify.debug('enterPayState')
if base.cr.allowFreeNames() or self.isPaid:
self.fsm.request('PickAName')
else:
tempname = self.findTempName()
self.payDialog['text'] = TTLocalizer.NameShopOnlyPaid + tempname
self.payDialog.show()
def exitPayState(self):
pass
def payAction(self, value):
self.notify.debug('payAction')
self.payDialog.hide()
if value:
self.doneStatus = 'paynow'
messenger.send(self.doneEvent)
else:
self.nameAction = 0
self.__createAvatar()
def enterPickANameState(self):
self.notify.debug('enterPickANameState')
self.ubershow(self.pickANameGUIElements)

View file

@ -36,7 +36,6 @@ class Party(Place.Place):
'fishing',
'stopped',
'DFA',
'trialerFA',
'push',
'activity']),
State.State('stopped', self.enterStopped, self.exitStopped, ['walk', 'teleportOut']),
@ -50,8 +49,7 @@ class Party(Place.Place):
'stopped',
'activity',
'push',
'DFA',
'trialerFA']),
'DFA']),
State.State('teleportIn', self.enterTeleportIn, self.exitTeleportIn, ['walk', 'partyPlanning']),
State.State('teleportOut', self.enterTeleportOut, self.exitTeleportOut, ['teleportIn', 'walk', 'final']),
State.State('died', self.enterDied, self.exitDied, ['walk', 'final']),
@ -60,8 +58,6 @@ class Party(Place.Place):
State.State('fishing', self.enterFishing, self.exitFishing, ['walk', 'stopped']),
State.State('activity', self.enterActivity, self.exitActivity, ['walk', 'stopped']),
State.State('stopped', self.enterStopped, self.exitStopped, ['walk']),
State.State('trialerFA', self.enterTrialerFA, self.exitTrialerFA, ['trialerFAReject', 'DFA']),
State.State('trialerFAReject', self.enterTrialerFAReject, self.exitTrialerFAReject, ['walk']),
State.State('DFA', self.enterDFA, self.exitDFA, ['DFAReject', 'teleportOut']),
State.State('DFAReject', self.enterDFAReject, self.exitDFAReject, ['walk'])], 'init', 'final')
self.fsm.enterInitialState()
@ -137,7 +133,7 @@ class Party(Place.Place):
self.zoneId = zoneId
def doRequestLeave(self, requestStatus):
self.fsm.request('trialerFA', [requestStatus])
self.fsm.request('DFA', [requestStatus])
def enterInit(self):
pass

View file

@ -120,7 +120,7 @@ class PartyEditor(DirectObject, FSM):
self.initPartyClock()
if self.currentElement:
self.currentElement.checkSoldOutAndPaidStatusAndAffordability()
self.currentElement.checkSoldOutAndAffordability()
def buyCurrentElement(self):
if self.currentElement:
@ -151,7 +151,7 @@ class PartyEditor(DirectObject, FSM):
self.elementList.scrollTo(0)
self.elementList['items'][0].elementSelectedFromList()
self.currentElement = self.elementList['items'][self.elementList.getSelectedIndex()]
self.currentElement.checkSoldOutAndPaidStatusAndAffordability()
self.currentElement.checkSoldOutAndAffordability()
self.partyPlanner.instructionLabel['text'] = TTLocalizer.PartyPlannerEditorInstructionsIdle
self.updateCostsAndBank()
self.handleMutuallyExclusiveActivities()

View file

@ -13,11 +13,11 @@ from toontown.parties import PartyUtils
class PartyEditorGridElement(DirectButton):
notify = directNotify.newCategory('PartyEditorGridElement')
def __init__(self, partyEditor, id, isDecoration, checkSoldOutAndPaidStatusAndAffordability, **kw):
def __init__(self, partyEditor, id, isDecoration, checkSoldOutAndAffordability, **kw):
self.partyEditor = partyEditor
self.id = id
self.isDecoration = isDecoration
self.checkSoldOutAndPaidStatusAndAffordability = checkSoldOutAndPaidStatusAndAffordability
self.checkSoldOutAndAffordability = checkSoldOutAndAffordability
if self.isDecoration:
self.name = TTLocalizer.PartyDecorationNameDict[self.id]['editor']
colorList = ((1.0, 1.0, 1.0, 1.0),
@ -218,7 +218,7 @@ class PartyEditorGridElement(DirectButton):
self.partyEditor.handleMutuallyExclusiveActivities()
else:
self.stash()
self.checkSoldOutAndPaidStatusAndAffordability()
self.checkSoldOutAndAffordability()
return
def placeInPartyGrounds(self, desiredXY = None):
@ -230,7 +230,7 @@ class PartyEditorGridElement(DirectButton):
self.partyEditor.partyEditorGrid.registerNewElement(self, self.centerGridSquare, self.getGridSize())
self.partyEditor.updateCostsAndBank()
self.partyEditor.partyPlanner.instructionLabel['text'] = TTLocalizer.PartyPlannerEditorInstructionsPartyGrounds
self.checkSoldOutAndPaidStatusAndAffordability()
self.checkSoldOutAndAffordability()
return True
else:
return False

View file

@ -73,11 +73,11 @@ class PartyEditorListElement(DirectButton):
self.partyEditorGridElements = []
if self.isDecoration:
for i in xrange(PartyGlobals.DecorationInformationDict[self.id]['limitPerParty']):
self.partyEditorGridElements.append(PartyEditorGridElement(self.partyEditor, self.id, self.isDecoration, self.checkSoldOutAndPaidStatusAndAffordability))
self.partyEditorGridElements.append(PartyEditorGridElement(self.partyEditor, self.id, self.isDecoration, self.checkSoldOutAndAffordability))
else:
for i in xrange(PartyGlobals.ActivityInformationDict[self.id]['limitPerParty']):
self.partyEditorGridElements.append(PartyEditorGridElement(self.partyEditor, self.id, self.isDecoration, self.checkSoldOutAndPaidStatusAndAffordability))
self.partyEditorGridElements.append(PartyEditorGridElement(self.partyEditor, self.id, self.isDecoration, self.checkSoldOutAndAffordability))
self.activeGridElementIndex = -1
self.adjustForUnreleased()
@ -113,20 +113,17 @@ class PartyEditorListElement(DirectButton):
self.partyEditor.partyPlanner.elementDescriptionNode.setText(TTLocalizer.PartyActivityNameDict[self.id]['description'])
self.partyEditor.partyPlanner.elementPriceNode.setText('%d %s' % (PartyGlobals.ActivityInformationDict[self.id]['cost'], TTLocalizer.PartyPlannerBeans))
self.partyEditor.partyPlanner.elementTitleLabel['text'] = self.name
self.checkSoldOutAndPaidStatusAndAffordability()
self.checkSoldOutAndAffordability()
def checkSoldOutAndPaidStatusAndAffordability(self):
def checkSoldOutAndAffordability(self):
if self.partyEditor.currentElement != self:
if self.partyEditor.currentElement is not None:
self.partyEditor.currentElement.checkSoldOutAndPaidStatusAndAffordability()
self.partyEditor.currentElement.checkSoldOutAndAffordability()
return
if self.isDecoration:
infoDict = PartyGlobals.DecorationInformationDict
else:
infoDict = PartyGlobals.ActivityInformationDict
if not base.cr.isPaid() and infoDict[self.id]['paidOnly']:
self.setOffLimits()
return
if infoDict[self.id]['cost'] > self.partyEditor.partyPlanner.totalMoney - self.partyEditor.partyPlanner.totalCost:
self.setTooExpensive(True)
tooExpensive = True
@ -142,12 +139,6 @@ class PartyEditorListElement(DirectButton):
self.setSoldOut(True)
return
def setOffLimits(self):
self['state'] = DirectGuiGlobals.DISABLED
self.partyEditor.partyPlanner.elementBuyButton['text'] = TTLocalizer.PartyPlannerPaidOnly
self.partyEditor.partyPlanner.elementBuyButton['state'] = DirectGuiGlobals.DISABLED
self.partyEditor.partyPlanner.elementBuyButton['text_scale'] = 0.04
def setTooExpensive(self, value):
self.partyEditor.partyPlanner.elementBuyButton['text'] = TTLocalizer.PartyPlannerBuy
if value:
@ -187,7 +178,7 @@ class PartyEditorListElement(DirectButton):
self.activeGridElementIndex = i
return True
else:
self.checkSoldOutAndPaidStatusAndAffordability()
self.checkSoldOutAndAffordability()
return False
def released(self, mouseEvent):

View file

@ -237,289 +237,241 @@ ActivityInformationDict = {ActivityIds.PartyJukebox: {'cost': int(50 * PartyCost
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 1,
'paidOnly': False,
'gridAsset': 'PartyJukebox_activity_1x1'},
ActivityIds.PartyJukebox40: {'cost': int(100 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 1,
'paidOnly': False,
'gridAsset': 'PartyJukebox_activity_1x1'},
ActivityIds.PartyValentineJukebox: {'cost': int(50 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 1,
'paidOnly': False,
'gridAsset': 'PartyJukebox_activity_1x1'},
ActivityIds.PartyValentineJukebox40: {'cost': int(100 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 1,
'paidOnly': False,
'gridAsset': 'PartyJukebox_activity_1x1'},
ActivityIds.PartyCannon: {'cost': int(50 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 5,
'limitPerParty': 10,
'paidOnly': False,
'gridAsset': 'PartyCannon_activity_1x1'},
ActivityIds.PartyTrampoline: {'cost': int(50 * PartyCostMultiplier),
'gridsize': (2, 2),
'numberPerPurchase': 1,
'limitPerParty': 8,
'paidOnly': False,
'gridAsset': 'PartyTrampoline_activity_2x2'},
ActivityIds.PartyValentineTrampoline: {'cost': int(50 * PartyCostMultiplier),
'gridsize': (2, 2),
'numberPerPurchase': 1,
'limitPerParty': 8,
'paidOnly': False,
'gridAsset': 'PartyTrampoline_activity_2x2'},
ActivityIds.PartyVictoryTrampoline: {'cost': int(50 * PartyCostMultiplier),
'gridsize': (2, 2),
'numberPerPurchase': 1,
'limitPerParty': 8,
'paidOnly': False,
'gridAsset': 'PartyTrampoline_activity_2x2'},
ActivityIds.PartyWinterTrampoline: {'cost': int(50 * PartyCostMultiplier),
'gridsize': (2, 2),
'numberPerPurchase': 1,
'limitPerParty': 8,
'paidOnly': False,
'gridAsset': 'PartyTrampoline_activity_2x2'},
ActivityIds.PartyCatch: {'cost': int(300 * PartyCostMultiplier),
'gridsize': (5, 5),
'numberPerPurchase': 1,
'limitPerParty': 1,
'paidOnly': True,
'gridAsset': 'PartyCatch_activity_5x5'},
ActivityIds.PartyWinterCatch: {'cost': int(300 * PartyCostMultiplier),
'gridsize': (5, 5),
'numberPerPurchase': 1,
'limitPerParty': 1,
'paidOnly': True,
'gridAsset': 'PartyCatch_activity_5x5'},
ActivityIds.PartyCog: {'cost': int(300 * PartyCostMultiplier),
'gridsize': (5, 5),
'numberPerPurchase': 1,
'limitPerParty': 1,
'paidOnly': True,
'gridAsset': 'PartyCog_activity_5x5'},
ActivityIds.PartyWinterCog: {'cost': int(300 * PartyCostMultiplier),
'gridsize': (5, 5),
'numberPerPurchase': 1,
'limitPerParty': 1,
'paidOnly': True,
'gridAsset': 'PartyCog_activity_5x5'},
ActivityIds.PartyDance: {'cost': int(100 * PartyCostMultiplier),
'gridsize': (3, 3),
'numberPerPurchase': 1,
'limitPerParty': 1,
'paidOnly': True,
'gridAsset': 'PartyDance_activity_3x3'},
ActivityIds.PartyDance20: {'cost': int(200 * PartyCostMultiplier),
'gridsize': (3, 3),
'numberPerPurchase': 1,
'limitPerParty': 1,
'paidOnly': True,
'gridAsset': 'PartyDance_activity_3x3'},
ActivityIds.PartyValentineDance: {'cost': int(100 * PartyCostMultiplier),
'gridsize': (3, 3),
'numberPerPurchase': 1,
'limitPerParty': 1,
'paidOnly': True,
'gridAsset': 'PartyDance_activity_3x3'},
ActivityIds.PartyValentineDance20: {'cost': int(200 * PartyCostMultiplier),
'gridsize': (3, 3),
'numberPerPurchase': 1,
'limitPerParty': 1,
'paidOnly': True,
'gridAsset': 'PartyDance_activity_3x3'},
ActivityIds.PartyTugOfWar: {'cost': int(200 * PartyCostMultiplier),
'gridsize': (4, 4),
'numberPerPurchase': 1,
'limitPerParty': 1,
'paidOnly': False,
'gridAsset': 'PartyTufOfWar_activity_4x4'},
ActivityIds.PartyFireworks: {'cost': int(200 * PartyCostMultiplier),
'gridsize': (4, 2),
'numberPerPurchase': 1,
'limitPerParty': 1,
'paidOnly': False,
'gridAsset': 'PartyFireworks_activity_2x4'},
ActivityIds.PartyClock: {'cost': MinimumPartyCost,
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 1,
'paidOnly': False,
'gridAsset': 'PartyClock_activity_1x1'}}
DecorationInformationDict = {DecorationIds.BalloonAnvil: {'cost': int(10 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.BalloonAnvilValentine: {'cost': int(10 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.BalloonStage: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.Bow: {'cost': int(10 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.Cake: {'cost': int(10 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.Castle: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.GiftPile: {'cost': int(10 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.Horn: {'cost': int(10 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.MardiGras: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.NoiseMakers: {'cost': int(10 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.Pinwheel: {'cost': int(10 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.GagGlobe: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.BannerJellyBean: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.CakeTower: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.HeartTarget: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.HeartBanner: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.FlyingHeart: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.Hydra: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (2, 2),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_propStage_2x2'},
DecorationIds.BannerVictory: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.CannonVictory: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.CogStatueVictory: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.TubeCogVictory: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.CogIceCreamVictory: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.cogIceCreamWinter: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.StageWinter: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (2, 2),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_propStage_2x2'},
DecorationIds.CogStatueWinter: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.snowman: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'},
DecorationIds.snowDoodle: {'cost': int(25 * PartyCostMultiplier),
'gridsize': (1, 1),
'numberPerPurchase': 1,
'limitPerParty': 5,
'paidOnly': False,
'gridAsset': 'decoration_1x1'}}
DefaultRulesTimeout = 10.0
DenialReasons = PythonUtil.Enum(('Default', 'Full', 'SilentFail'), start=0)

View file

@ -4306,7 +4306,7 @@ def getReward(id):
def getNextRewards(numChoices, tier, av):
rewardTier = list(getRewardsInTier(tier))
optRewards = list(getOptionalRewardsInTier(tier))
if av.getGameAccess() == OTPGlobals.AccessFull and tier == TT_TIER + 3:
if tier == TT_TIER + 3:
optRewards = []
if isLoopingFinalTier(tier):
rewardHistory = map(lambda questDesc: questDesc[3], av.quests)

View file

@ -147,7 +147,7 @@ class DistributedStartingBlock(DistributedObject.DistributedObject, FSM):
def handleEnterRequest(self = self):
self.ignore('stoppedAsleep')
if hasattr(self.dialog, 'doneStatus') and self.dialog.doneStatus == 'ok':
self.d_requestEnter(base.cr.isPaid())
self.d_requestEnter()
elif self.cr and not self.isDisabled():
self.cr.playGame.getPlace().setState('walk')
else:
@ -172,9 +172,9 @@ class DistributedStartingBlock(DistributedObject.DistributedObject, FSM):
self.notify.debugStateCall(self)
self.sendUpdate('movieFinished', [])
def d_requestEnter(self, paid):
def d_requestEnter(self):
self.notify.debugStateCall(self)
self.sendUpdate('requestEnter', [paid])
self.sendUpdate('requestEnter')
def d_requestExit(self):
self.notify.debugStateCall(self)
@ -619,7 +619,7 @@ class DistributedViewingBlock(DistributedStartingBlock):
def handleEnterRequest(self = self):
self.ignore('stoppedAsleep')
if hasattr(self.dialog, 'doneStatus') and self.dialog.doneStatus == 'ok':
self.d_requestEnter(base.cr.isPaid())
self.d_requestEnter()
else:
self.cr.playGame.getPlace().setState('walk')
self.dialog.ignoreAll()

View file

@ -32,7 +32,7 @@ class DistributedStartingBlockAI(DistributedObjectAI):
def getPadLocationId(self):
return self.padLocationId
def requestEnter(self, isPaid):
def requestEnter(self):
avId = self.air.getAvatarIdFromSender()
av = self.air.doId2do.get(avId)
if not av:
@ -104,7 +104,7 @@ class DistributedViewingBlockAI(DistributedStartingBlockAI):
DistributedStartingBlockAI.__init__(self, air)
self.air = air
def requestEnter(self, isPaid):
def requestEnter(self):
avId = self.air.getAvatarIdFromSender()
av = self.air.doId2do[avId]
if not av.hasKart():

View file

@ -15,7 +15,7 @@ class KartGlobals:
COUNTDOWN_TIME = 30
BOARDING_TIME = 10.0
ENTER_RACE_TIME = 6.0
ERROR_CODE = PythonUtil.Enum('success, eGeneric, eTickets, eBoardOver, eNoKart, eOccupied, eTrackClosed, eTooLate, eUnpaid')
ERROR_CODE = PythonUtil.Enum('success, eGeneric, eTickets, eBoardOver, eNoKart, eOccupied, eTrackClosed, eTooLate')
FRONT_LEFT_SPOT = 0
FRONT_RIGHT_SPOT = 1
REAR_LEFT_SPOT = 2

View file

@ -43,7 +43,7 @@ class GSPlayground(Playground.Playground):
self.rotateBlimp.finish()
def doRequestLeave(self, requestStatus):
self.fsm.request('trialerFA', [requestStatus])
self.fsm.request('DFA', [requestStatus])
def enterDFA(self, requestStatus):
doneEvent = 'dfaDoneEvent'

View file

@ -56,7 +56,7 @@ class GZPlayground(Playground.Playground):
self.rotateBlimp.finish()
def doRequestLeave(self, requestStatus):
self.fsm.request('trialerFA', [requestStatus])
self.fsm.request('DFA', [requestStatus])
def enterDFA(self, requestStatus):
doneEvent = 'dfaDoneEvent'

View file

@ -41,7 +41,7 @@ class OZPlayground(Playground.Playground):
self.loader.hood.setNoFog()
def doRequestLeave(self, requestStatus):
self.fsm.request('trialerFA', [requestStatus])
self.fsm.request('DFA', [requestStatus])
def enterDFA(self, requestStatus):
doneEvent = 'dfaDoneEvent'

View file

@ -45,7 +45,6 @@ class Playground(Place.Place):
'stickerBook',
'TFA',
'DFA',
'trialerFA',
'trolley',
'final',
'doorOut',
@ -66,20 +65,17 @@ class Playground(Place.Place):
'quest',
'purchase',
'stopped',
'fishing',
'trialerFA']),
'fishing']),
State.State('sit',
self.enterSit,
self.exitSit, [
'walk',
'DFA',
'trialerFA']),
'DFA']),
State.State('drive',
self.enterDrive,
self.exitDrive, [
'walk',
'DFA',
'trialerFA']),
'DFA']),
State.State('trolley',
self.enterTrolley,
self.exitTrolley, [
@ -101,15 +97,6 @@ class Playground(Place.Place):
self.enterTFAReject,
self.exitTFAReject, [
'walk']),
State.State('trialerFA',
self.enterTrialerFA,
self.exitTrialerFA, [
'trialerFAReject',
'DFA']),
State.State('trialerFAReject',
self.enterTrialerFAReject,
self.exitTrialerFAReject, [
'walk']),
State.State('DFA',
self.enterDFA,
self.exitDFA, [

View file

@ -161,10 +161,6 @@ class DistributedNPCPartyPerson(DistributedNPCToonBase):
chatStr = TTLocalizer.PartyPlannerHostingTooMany
self.setChatAbsolute(chatStr, CFSpeech | CFTimeout)
self.resetPartyPerson()
elif mode == NPCToons.PARTY_MOVIE_ONLYPAID:
chatStr = TTLocalizer.PartyPlannerOnlyPaid
self.setChatAbsolute(chatStr, CFSpeech | CFTimeout)
self.resetPartyPerson()
elif mode == NPCToons.PARTY_MOVIE_COMINGSOON:
chatStr = TTLocalizer.PartyPlannerNpcComingSoon
self.setChatAbsolute(chatStr, CFSpeech | CFTimeout)

View file

@ -80,14 +80,9 @@ class DistributedNPCPartyPersonAI(DistributedNPCToonBaseAI):
if wantsToPlan:
av = simbase.air.doId2do.get(avId)
if av:
if av.getGameAccess() != ToontownGlobals.AccessFull:
self.air.writeServerEvent('suspicious', avId, 'DistributedNPCPartyPersonAI.free player tried to host party.')
flag = NPCToons.PARTY_MOVIE_ONLYPAID
self.d_setMovie(avId, flag)
else:
zoneId = self.air.allocateZone()
hoodId = ToontownGlobals.PartyHood
self.d_setMovie(avId, NPCToons.PARTY_MOVIE_COMPLETE, [hoodId, zoneId])
zoneId = self.air.allocateZone()
hoodId = ToontownGlobals.PartyHood
self.d_setMovie(avId, NPCToons.PARTY_MOVIE_COMPLETE, [hoodId, zoneId])
else:
av = simbase.air.doId2do.get(avId)
if av:

View file

@ -429,10 +429,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
if ZoneUtil.getCanonicalHoodId(zoneId) == ToontownGlobals.FunnyFarm:
self.defaultZone = ToontownGlobals.ToontownCentral
return
if not base.cr.isPaid() or launcher and not launcher.getPhaseComplete(hoodPhase):
self.defaultZone = ToontownGlobals.ToontownCentral
else:
self.defaultZone = zoneId
self.defaultZone = zoneId
def setShtickerBook(self, string):
pass
@ -946,7 +943,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
self.takeOffSuit()
else:
parts = self.getCogParts()
if CogDisguiseGlobals.isPaidSuitComplete(self, parts, index):
if CogDisguiseGlobals.isSuitComplete(parts, index):
cogIndex = self.cogTypes[index] + SuitDNA.suitsPerDept * index
cog = SuitDNA.suitHeadTypes[cogIndex]
self.putOnSuit(cog)
@ -2081,21 +2078,8 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
def setPinkSlips(self, pinkSlips):
self.pinkSlips = pinkSlips
def setAccess(self, access):
self.setGameAccess(access)
self.setDisplayName(self.getName())
def setGameAccess(self, access):
self.gameAccess = access
def getGameAccess(self):
if hasattr(self, 'gameAccess'):
return self.gameAccess
else:
return 0
def setDisplayName(self, str):
if self.getGameAccess() == OTPGlobals.AccessFull and not self.isDisguised:
if not self.isDisguised:
self.setFancyNametag(name=str)
else:
self.removeFancyNametag()
@ -2128,8 +2112,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
self.setDisplayName(self.getName())
def getAvIdName(self):
paidStr = PythonUtil.choice(self.getGameAccess() == OTPGlobals.AccessFull, 'P', 'F')
return '%s\n%s (%s)' % (self.getName(), self.doId, paidStr)
return '%s\n%s' % (self.getName(), self.doId)
def playCurrentDialogue(self, dialogue, chatFlags, interrupt = 1):
if interrupt and self.__currentDialogue is not None:

View file

@ -11,7 +11,6 @@ import re
import Experience
import InventoryBase
import ModuleListAI
from NPCToons import npcFriends
import ToonDNA
from otp.ai.AIBaseGlobal import *
@ -47,7 +46,6 @@ from toontown.shtiker import CogPageGlobals
from toontown.suit import SuitDNA
from toontown.toon import NPCToons
from toontown.toonbase import TTLocalizer
from toontown.toonbase import ToontownAccessAI
from toontown.toonbase import ToontownBattleGlobals
from toontown.toonbase import ToontownGlobals
from toontown.toonbase.ToontownGlobals import *
@ -78,8 +76,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
lastFlagAvTime = globalClock.getFrameTime()
flagCounts = {}
WantTpTrack = simbase.config.GetBool('want-tptrack', False)
DbCheckPeriodPaid = simbase.config.GetInt('toon-db-check-period-paid', 10 * 60)
DbCheckPeriodUnpaid = simbase.config.GetInt('toon-db-check-period-unpaid', 1 * 60)
BanOnDbCheckFail = simbase.config.GetBool('want-ban-dbcheck', 0)
DbCheckAccountDateEnable = config.GetBool('account-blackout-enable', 1)
DbCheckAccountDateBegin = config.GetString('account-blackout-start', '2013-08-20 12:30:00')
@ -180,7 +176,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
self.golfHoleBest = None
self.golfCourseBest = None
self.unlimitedSwing = False
self.previousAccess = None
self.numMailItems = 0
self.simpleMailNotify = ToontownGlobals.NoItems
self.inviteMailNotify = ToontownGlobals.NoItems
@ -188,7 +183,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
self.hostedParties = []
self.partiesInvitedTo = []
self.partyReplyInfoBases = []
self.modulelist = ModuleListAI.ModuleList()
self._dbCheckDoLater = None
self.teleportOverride = 0
self._gmDisabled = False
@ -1406,7 +1400,7 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
self.d_setCogIndex(index)
def setCogIndex(self, index):
if index != -1 and not ToontownAccessAI.canWearSuit(self.doId, self.zoneId):
if index != -1 and not ZoneUtil.canWearSuit(self.zoneId):
if not simbase.air.cogSuitMessageSent:
self.notify.warning('%s setCogIndex invalid: %s' % (self.doId, index))
if simbase.config.GetBool('want-ban-wrong-suit-place', False):
@ -3720,30 +3714,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
pinkSlips = max(self.pinkSlips - amount, 0)
self.b_setPinkSlips(pinkSlips)
def setPreviousAccess(self, access):
self.previousAccess = access
def b_setAccess(self, access):
self.setAccess(access)
self.d_setAccess(access)
def d_setAccess(self, access):
self.sendUpdate('setAccess', [access])
def setAccess(self, access):
paidStatus = simbase.config.GetString('force-paid-status', 'none')
if paidStatus == 'unpaid':
access = 1
if access == OTPGlobals.AccessInvalid:
access = OTPGlobals.AccessFull
self.setGameAccess(access)
def setGameAccess(self, access):
self.gameAccess = access
def getGameAccess(self):
return self.gameAccess
def b_setNametagStyle(self, nametagStyle):
self.d_setNametagStyle(nametagStyle)
self.setNametagStyle(nametagStyle)
@ -4059,31 +4029,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
else:
self.air.writeServerEvent('suspicious', self.doId, '$ found in toon name')
def setModuleInfo(self, info):
avId = self.air.getAvatarIdFromSender()
key = 'outrageous'
self.moduleWhitelist = self.modulelist.loadWhitelistFile()
self.moduleBlacklist = self.modulelist.loadBlacklistFile()
for obfuscatedModule in info:
module = ''
p = 0
for ch in obfuscatedModule:
ic = ord(ch) ^ ord(key[p])
p += 1
if p >= len(key):
p = 0
module += chr(ic)
if module not in self.moduleWhitelist:
if module in self.moduleBlacklist:
self.air.writeServerEvent('suspicious', avId, 'Black List module %s loaded into process.' % module)
if simbase.config.GetBool('want-ban-blacklist-module', False):
commentStr = 'User has blacklist module: %s attached to their game process' % module
dislId = self.DISLid
simbase.air.banManager.ban(self.doId, dislId, commentStr)
else:
self.air.writeServerEvent('suspicious', avId, 'Unknown module %s loaded into process.' % module)
def teleportResponseToAI(self, toAvId, available, shardId, hoodId, zoneId, fromAvId):
if not self.WantTpTrack:
return

View file

@ -529,9 +529,6 @@ class DistributedToonUD(DistributedObjectUD):
def setNeverStartedPartyRefunded(self, todo0, todo1, todo2):
pass
def setModuleInfo(self, todo0):
pass
def setDISLname(self, todo0):
pass

View file

@ -44,17 +44,10 @@ class Experience:
if type(track) == type(''):
track = Tracks.index(track)
self.notify.debug('adding %d exp to track %d' % (amount, track))
if self.owner.getGameAccess() == OTPGlobals.AccessFull:
if self.experience[track] + amount <= MaxSkill:
self.experience[track] += amount
else:
self.experience[track] = MaxSkill
elif self.experience[track] + amount <= UnpaidMaxSkills[track]:
if self.experience[track] + amount <= MaxSkill:
self.experience[track] += amount
elif self.experience[track] > UnpaidMaxSkills[track]:
self.experience[track] += 0
else:
self.experience[track] = UnpaidMaxSkills[track]
self.experience[track] = MaxSkill
def maxOutExp(self):
for track in xrange(0, len(Tracks)):

View file

@ -211,9 +211,6 @@ class InventoryBase(DirectObject.DirectObject):
return 1
def validateItemsBasedOnAccess(self, newInventory):
return 1
def getMinCostOfPurchase(self, newInventory):
return self.countPropsInList(newInventory) - self.totalProps
@ -235,14 +232,10 @@ class InventoryBase(DirectObject.DirectObject):
if not self.validateItemsBasedOnExp(newInventory):
self.notify.warning('Somebody is trying to buy forbidden items! ' + 'Rejecting purchase.')
return 0
if not self.validateItemsBasedOnAccess(newInventory):
simbase.air.writeServerEvent('suspicious', self.toon.doId, 'non-paid av trying to purchase paid gags')
return 0
self.updateInventory(newInventory)
return 1
def maxOutInv(self, filterUberGags = 0):
unpaid = self.toon.getGameAccess() != ToontownGlobals.AccessFull
for track in xrange(len(Tracks)):
if self.toon.hasTrackAccess(track):
for level in xrange(len(Levels[track])):

View file

@ -708,7 +708,6 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
button = self.buttons[track][level]
if self.itemIsUsable(track, level):
button.show()
unpaid = not base.cr.isPaid()
if self.numItem(track, level) >= self.getMax(track, level) or totalProps == maxProps or level > LAST_REGULAR_GAG_LEVEL:
self.makeUnpressable(button, track, level)
else:
@ -754,19 +753,15 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
button = self.buttons[track][level]
if self.itemIsUsable(track, level):
button.show()
unpaid = not base.cr.isPaid()
if self.numItem(track, level) >= self.getMax(track, level) or totalProps == maxProps or level > LAST_REGULAR_GAG_LEVEL:
self.makeUnpressable(button, track, level)
else:
self.makePressable(button, track, level)
else:
button.hide()
else:
self.hideTrack(track)
return
def storePurchaseDeactivateButtons(self):
self.invFrame.reparentTo(self)
self.storePurchaseFrame.hide()
@ -893,12 +888,9 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
for level in xrange(len(Levels[track])):
button = self.buttons[track][level]
if self.itemIsUsable(track, level):
unpaid = not base.cr.isPaid()
button.show()
if self.numItem(track, level) <= 0 or track == HEAL_TRACK and not self.heal or track == TRAP_TRACK and not self.trap or track == LURE_TRACK and not self.lure:
self.makeUnpressable(button, track, level)
elif unpaid and gagIsVelvetRoped(track, level):
self.makeDisabledPressable(button, track, level)
elif self.itemIsCredit(track, level):
self.makePressable(button, track, level)
else:
@ -1082,10 +1074,7 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
self.buttons[trackIndex][levelIndex].show()
curExp, nextExp = self.getCurAndNextExpValues(trackIndex)
if curExp >= UnpaidMaxSkills[trackIndex] and self.toon.getGameAccess() != OTPGlobals.AccessFull:
self.trackBars[trackIndex]['range'] = nextExp
self.trackBars[trackIndex]['text'] = TTLocalizer.InventoryGuestExp
elif curExp >= regMaxSkill:
if curExp >= regMaxSkill:
self.trackBars[trackIndex]['range'] = UberSkill
self.trackBars[trackIndex]['text'] = TTLocalizer.InventoryUberTrackExp % {'nextExp': MaxSkill - curExp}
else:
@ -1121,10 +1110,7 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
if track == None and level == None:
for track in xrange(len(Tracks)):
curExp, nextExp = self.getCurAndNextExpValues(track)
if curExp >= UnpaidMaxSkills[track] and self.toon.getGameAccess() != OTPGlobals.AccessFull:
self.trackBars[track]['range'] = nextExp
self.trackBars[track]['text'] = TTLocalizer.InventoryGuestExp
elif curExp >= regMaxSkill:
if curExp >= regMaxSkill:
self.trackBars[track]['text'] = TTLocalizer.InventoryUberTrackExp % {'nextExp': MaxSkill - curExp}
self.trackBars[track]['value'] = curExp - regMaxSkill
else:

View file

@ -1,99 +0,0 @@
import os
class ModuleList:
serverDataFolder = simbase.config.GetString('server-data-folder', '')
def __init__(self):
self.moduleWhitelistFilename = self.getWhitelistFilename()
self.moduleBlacklistFilename = self.getBlacklistFilename()
self.loadBlacklistFile()
self.loadWhitelistFile()
def getWhitelistFilename(self):
result = '%s.moduleWhiteList' % self.serverDataFolder
return result
def getBlacklistFilename(self):
result = '%s.moduleBlackList' % self.serverDataFolder
return result
def loadBlacklistFile(self):
try:
file = open(self.moduleBlacklistFilename + '.bu', 'r')
if os.path.exists(self.moduleBlacklistFilename):
os.remove(self.moduleBlacklistFilename)
except IOError:
try:
file = open(self.moduleBlacklistFilename, 'r')
except IOError:
return set()
file.seek(0)
moduleFile = self.loadFrom(file)
file.close()
result = self.loadFrom(moduleFile)
self.moduleBlacklist = result
return result
def loadWhitelistFile(self):
try:
file = open(self.moduleWhitelistFilename + '.bu', 'r')
if os.path.exists(self.moduleWhitelistFilename):
os.remove(self.moduleWhitelistFilename)
except IOError:
try:
file = open(self.moduleWhitelistFilename, 'r')
except IOError:
return set()
file.seek(0)
moduleFile = self.loadFrom(file)
file.close()
result = self.loadFrom(moduleFile)
self.moduleWhitelist = result
return result
def loadFrom(self, file):
result = set()
try:
for module in file:
module = module.strip()
if module:
result.add(module)
except EOFError:
pass
return result
def updateWhitelistFile(self):
try:
backup = self.getWhitelistFilename() + '.bu'
if os.path.exists(self.getWhitelistFilename()):
os.rename(self.getWhitelistFilename(), backup)
file = open(self.getWhitelistFilename(), 'w')
file.seek(0)
for whiteModule in self.moduleWhitelist:
file.write(whiteModule + '\n')
file.close()
if os.path.exists(backup):
os.remove(backup)
except EnvironmentError:
self.notify.warning(str(sys.exc_info()[1]))
def updateBlacklistFile(self):
try:
backup = self.getBlacklistFilename() + '.bu'
if os.path.exists(self.getBlacklistFilename()):
os.rename(self.getBlacklistFilename(), backup)
file = open(self.getBlacklistFilename(), 'w')
file.seek(0)
for blackModule in self.moduleBlacklist:
file.write(blackModule + '\n')
file.close()
if os.path.exists(backup):
os.remove(backup)
except EnvironmentError:
self.notify.warning(str(sys.exc_info()[1]))

View file

@ -49,7 +49,6 @@ PARTY_MOVIE_START = 1
PARTY_MOVIE_COMPLETE = 2
PARTY_MOVIE_ALREADYHOSTING = 3
PARTY_MOVIE_MAYBENEXTTIME = 4
PARTY_MOVIE_ONLYPAID = 5
PARTY_MOVIE_COMINGSOON = 6
PARTY_MOVIE_MINCOST = 7
PARTY_MOVIE_TIMEOUT = 8

View file

@ -214,13 +214,6 @@ class ToonAvatarPanel(AvatarPanelBase.AvatarPanelBase):
if base.localAvatar.isIgnored(self.avId):
self.secretsButton['state'] = DGG.DISABLED
from toontown.coghq import CogHQBossBattle
if isinstance(base.cr.playGame.getPlace(), CogHQBossBattle.CogHQBossBattle) and \
base.localAvatar.getGameAccess() != OTPGlobals.AccessFull:
self.secretsButton['state'] = DGG.DISABLED
ignoreStr, ignoreCmd, ignoreScale = self.getIgnoreButtonInfo()
self.ignoreButton = DirectButton(

View file

@ -143,28 +143,6 @@ allToonHeadAnimalIndices = [0,
31,
32,
33]
allToonHeadAnimalIndicesTrial = [0,
1,
2,
3,
4,
5,
6,
7,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
30,
31,
32,
33]
toonTorsoTypes = ['ss',
'ms',
'ls',
@ -2751,11 +2729,7 @@ class ToonDNA(AvatarDNA.AvatarDNA):
self.gender = gender
if not npc:
if stage == MAKE_A_TOON:
if not base.cr.isPaid():
animalIndicesToUse = allToonHeadAnimalIndicesTrial
else:
animalIndicesToUse = allToonHeadAnimalIndices
animal = generator.choice(animalIndicesToUse)
animal = generator.choice(allToonHeadAnimalIndices)
self.head = toonHeadTypes[animal]
else:
self.head = generator.choice(toonHeadTypes)

View file

@ -49,7 +49,7 @@ NametagFontNames = (
'Western'
)
NametagLabel = ' Nametag'
UnpaidNameTag = 'Basic'
BasicNameTag = 'Basic'
ScreenshotPath = 'screenshots/'
GM_NAMES = ('TOON COUNCIL',
'TOON TROOPER',
@ -3504,7 +3504,6 @@ PartyPlannerBeans = 'beans'
PartyPlannerTotalCost = 'Total Cost:\n%d beans'
PartyPlannerSoldOut = 'SOLD OUT'
PartyPlannerBuy = 'BUY'
PartyPlannerPaidOnly = 'MEMBERS ONLY'
PartyPlannerPartyGrounds = 'PARTY GROUNDS MAP'
PartyPlannerOkWithGroundsLayout = 'Are you done moving your Party Activities and Decorations around the Party Grounds Map?'
PartyPlannerChooseFutureTime = 'Please choose a time in the future.'
@ -3757,7 +3756,6 @@ PartyDoYouWantToPlan = 'Would you like to plan a new party right now?'
PartyPlannerOnYourWay = 'Have fun planning your party!'
PartyPlannerMaybeNextTime = 'Maybe next time. Have a good day!'
PartyPlannerHostingTooMany = 'You can only host one party at a time, sorry.'
PartyPlannerOnlyPaid = 'Only paid toons can host a party, sorry.'
PartyPlannerNpcComingSoon = 'Parties are coming soon! Try again later.'
PartyPlannerNpcMinCost = 'It costs a minimum of %d Jellybeans to plan a party.'
PartyHatPublicPartyChoose = 'Do you want to go to the 1st available public party?'
@ -4118,8 +4116,6 @@ InventoryDetailAmount = '%(numItems)s / %(maxItems)s'
InventoryDetailData = 'Accuracy: %(accuracy)s\n%(damageString)s: %(damage)d%(bonus)s\n%(singleOrGroup)s'
InventoryTrackExp = '%(curExp)s / %(nextExp)s'
InventoryUberTrackExp = '%(nextExp)s to Go!'
InventoryGuestExp = 'Guest Limit'
GuestLostExp = 'Over Guest Limit'
InventoryAffectsOneCog = 'Affects: One ' + Cog
InventoryAffectsOneToon = 'Affects: One Toon'
InventoryAffectsAllToons = 'Affects: All Toons'
@ -4621,9 +4617,6 @@ PetshopReturn = 'Return'
PetshopChooserTitle = "TODAY'S DOODLES"
PetshopGoHomeText = 'Would you like to go to your estate to play with your new Doodle?'
NameShopNameMaster = 'NameMasterEnglish.txt'
NameShopPay = 'Subscribe'
NameShopPlay = 'Free Trial'
NameShopOnlyPaid = 'Only paid users\nmay name their Toons.\nUntil you subscribe\nyour name will be\n'
NameShopContinueSubmission = 'Continue Submission'
NameShopChooseAnother = 'Choose Another Name'
NameShopToonCouncil = 'The Toon Council\nwill review your\nname. ' + 'Review may\ntake a few days.\nWhile you wait\nyour name will be\n '
@ -5458,7 +5451,7 @@ EstateCannonGameEnd = 'The Cannon Game rental is over.'
GameTableRentalEnd = 'The Game Table rental is over.'
MessageConfirmRent = 'Begin rental? Cancel to save the rental for later'
MessageConfirmGarden = 'Are you sure you want to start a garden?'
NametagPaid = 'Citizen Name Tag'
NametagCitizen = 'Citizen Name Tag'
NametagAction = 'Action Name Tag'
NametagFrilly = 'Frilly Name Tag'
FurnitureYourOldCloset = 'your old wardrobe'
@ -7361,7 +7354,6 @@ ClosetDeleteShirt = 'Delete\nshirt'
ClosetDeleteShorts = 'Delete\nshorts'
ClosetDeleteSkirt = 'Delete\nskirt'
TrunkNotOwnerMessage = "This isn't your trunk, but you may try on the accessories."
TrunkNotPaidMessage = 'Only Paid Members can wear accessories, but you may try them on.'
TrunkAreYouSureMessage = 'You have deleted some accessories. Do you really want to delete them?'
TrunkHat = 'this hat'
TrunkGlasses = 'these glasses'
@ -8547,16 +8539,13 @@ GolfCurrentHistory = 'Current %(historyDesc)s : %(num)s'
GolfTieBreakWinner = '%(name)s wins the random tie breaker!'
GolfSeconds = ' - %(time).2f seconds'
GolfTimeTieBreakWinner = '%(name)s wins the total aiming time tie breaker!!!'
RoamingTrialerWeekendStart = 'Tour Toontown is starting! Free players may now enter any neighborhood!'
RoamingTrialerWeekendOngoing = 'Welcome to Tour Toontown! Free players may now enter any neighborhood!'
RoamingTrialerWeekendEnd = "That's all for Tour Toontown."
MoreXpHolidayStart = 'Good news! Exclusive Test Toon double gag experience time has started.'
MoreXpHolidayOngoing = 'Welcome! Exclusive Test Toon double gag experience time is currently ongoing.'
MoreXpHolidayEnd = 'Exclusive Test Toon double gag experience time has ended. Thanks for helping us Test things!'
JellybeanDayHolidayStart = "It's Jellybean Day! Get Double Jellybean rewards at Parties!"
JellybeanDayHolidayEnd = "That's all for Jellybean Day. See you next year."
PartyRewardDoubledJellybean = 'Double Jellybeans!'
GrandPrixWeekendHolidayStart = "It's Grand Prix Weekend at Goofy Speedway! Free and paid players collect the most points in three consecutive races."
GrandPrixWeekendHolidayStart = "It's Grand Prix Weekend at Goofy Speedway! Players collect the most points in three consecutive races."
GrandPrixWeekendHolidayEnd = "That's all for Grand Prix Weekend. See you next year."
KartRace_DoubleTickets = 'Double Tickets'
SellbotNerfHolidayStart = 'Operation: Storm Sellbot is happening now! Battle the VP today!'
@ -8635,7 +8624,6 @@ BoardingInviteMinLaffInviter = 'You need %s Laff Points before being a member of
BoardingInviteMinLaffInvitee = '%s needs %s Laff Points before being a member of this Boarding Group.'
BoardingInvitePromotionInviter = 'You need to earn a promotion before being a member of this Boarding Group.'
BoardingInvitePromotionInvitee = '%s needs to earn a promotion before being a member of this Boarding Group.'
BoardingInviteNotPaidInvitee = '%s needs to be a paid Member to be a part of your Boarding Group.'
BoardingInviteeInDiffGroup = '%s is already in a different Boarding Group.'
BoardingInviteeInKickOutList = '%s had been removed by your leader. Only the leader can re-invite removed members.'
BoardingInviteePendingIvite = '%s has a pending invite; try again later.'
@ -8833,7 +8821,7 @@ HolidayNamesInCalendar = {1: ('Summer Fireworks', 'Celebrate Summer with a firew
9: ('Black Cat Day', 'Happy Halloween! Create a Toontastic Black Cat Toon - Today Only!'),
13: ('Trick or Treat', 'Happy Halloween! Trick or treat throughout Toontown to get a nifty Halloween pumpkin head reward!'),
14: ('Grand Prix', 'Grand Prix Monday at Goofy Speedway! To win, collect the most points in three consecutive races!'),
16: ('Grand Prix Weekend', 'Free and Paid players compete in circuit races at Goofy Speedway!'),
16: ('Grand Prix Weekend', 'Players compete in circuit races at Goofy Speedway!'),
17: ('Trolley Tracks', 'Trolley Tracks Thursday! Board any Trolley with two or more Toons to play.'),
19: ('Silly Saturdays', 'Saturdays are silly with Fish Bingo and Grand Prix throughout the day!'),
24: ('Ides of March', 'Beware the Ides of March! Stop the Backstabber Cogs from invading Toontown!'),

View file

@ -24,7 +24,6 @@ from toontown.margins import MarginGlobals
from toontown.margins.MarginManager import MarginManager
from toontown.nametag import NametagGlobals
from toontown.toonbase import TTLocalizer
from toontown.toonbase import ToontownAccess
from toontown.toonbase import ToontownBattleGlobals
from toontown.toontowngui import TTDialog
@ -210,8 +209,6 @@ class ToonBase(OTPBase.OTPBase):
self.cloudPlatformsEnabled = self.config.GetBool('estate-clouds', 0)
self.greySpacing = self.config.GetBool('allow-greyspacing', 0)
self.goonsEnabled = self.config.GetBool('estate-goon', 0)
self.restrictTrialers = self.config.GetBool('restrict-trialers', 1)
self.roamingTrialers = self.config.GetBool('roaming-trialers', 1)
self.slowQuietZone = self.config.GetBool('slow-quiet-zone', 0)
self.slowQuietZoneDelay = self.config.GetFloat('slow-quiet-zone-delay', 5)
self.killInterestResponse = self.config.GetBool('kill-interest-response', 0)
@ -421,8 +418,6 @@ class ToonBase(OTPBase.OTPBase):
serverList.append(url)
cr.loginFSM.request('connect', [serverList])
self.ttAccess = ToontownAccess.ToontownAccess()
self.ttAccess.initModuleInfo()
# Start detecting speed hacks:
self.lastSpeedHackCheck = time.time()
@ -468,8 +463,6 @@ class ToonBase(OTPBase.OTPBase):
except:
pass
if hasattr(self, 'ttAccess'):
self.ttAccess.delete()
if self.cr.timeManager:
self.cr.timeManager.setDisconnectReason(ToontownGlobals.DisconnectCloseWindow)
base.cr._userLoggingOut = False

View file

@ -1,40 +0,0 @@
from direct.task import Task
from toontown.hood import ZoneUtil
from toontown.toonbase import ToontownGlobals
class ToontownAccess:
def __init__(self):
self.startupModules = []
def initModuleInfo(self):
self.startupModules = self.getModuleList()
taskMgr.doMethodLater(300, self.checkModuleInfo, 'moduleListTask')
def delete(self):
taskMgr.remove('moduleListTask')
del self.startupModules
def checkModuleInfo(self, task):
currentModuleList = self.getModuleList()
newModules = []
for module in currentModuleList:
if module not in self.startupModules:
self.startupModules.insert(0, module)
newModules.insert(0, module)
self.sendUpdate('setModuleInfo', [newModules])
return task.again
def getModuleList(self):
# TODO: This funciton is supposed to return a list of all modules that
# have been linked into the process at runtime. It is only needed for
# hack detect.
return []
def sendUpdate(self, fieldName, args = [], sendToId = None):
if base.cr and hasattr(base, 'localAvatar'):
dg = base.localAvatar.dclass.clientFormatUpdate(fieldName, sendToId or base.localAvatar.doId, args)
base.cr.send(dg)
def canAccess(self, zoneId=None):
return True

View file

@ -1,58 +0,0 @@
from otp.otpbase import OTPGlobals
from otp.ai import BanManagerAI
from toontown.toonbase import ToontownGlobals
from toontown.hood import ZoneUtil
def canAccess(avatarId, zoneId, function = ''):
avatar = simbase.air.doId2do.get(avatarId)
if avatar and avatar.getGameAccess() != OTPGlobals.AccessFull and not openToAll(zoneId, avatar):
if cmp(function, 'DistributedBoardingPartyAI.checkBoard') == 0:
return False
simbase.air.writeServerEvent('suspicious', avatarId, 'User with rights: %s requesting enter for paid access content without proper rights in zone %s from %s' % (avatar.getGameAccess(), zoneId, function))
if simbase.config.GetBool('want-ban-ispaid', True):
commentStr = 'User with rights: %s tried to gain access zone %s from function %s, an area they were not allowed to using TTInjector Hack' % (avatar.getGameAccess(), zoneId, function)
dislId = avatar.DISLid
#simbase.air.banManager.ban(avatarId, dislId, commentStr)
return False
else:
return True
def openToAll(zoneId, avatar):
allowed = False
canonicalZoneId = ZoneUtil.getCanonicalHoodId(zoneId)
allowedZones = [ToontownGlobals.ToontownCentral,
ToontownGlobals.MyEstate,
ToontownGlobals.GoofySpeedway,
ToontownGlobals.Tutorial]
specialZones = [ToontownGlobals.SellbotLobby]
if ToontownGlobals.SELLBOT_NERF_HOLIDAY in simbase.air.holidayManager.currentHolidays:
specialZones.append(ToontownGlobals.SellbotHQ)
ownerId = simbase.air.estateMgr.getOwnerFromZone(zoneId)
if ownerId:
for zone in simbase.air.estateMgr.getEstateZones(ownerId):
specialZones.append(zone)
if canonicalZoneId in allowedZones or avatar.isInEstate():
allowed = True
elif zoneId in specialZones:
allowed = True
elif canonicalZoneId >= ToontownGlobals.DynamicZonesBegin and not avatar.getTutorialAck():
zoneDict = simbase.air.tutorialManager.playerDict.get(avatar.doId)
if zoneDict:
allowed = True
return allowed
def canWearSuit(avatarId, zoneId):
canonicalZoneId = ZoneUtil.getCanonicalHoodId(zoneId)
allowedSuitZones = [ToontownGlobals.LawbotHQ,
ToontownGlobals.CashbotHQ,
ToontownGlobals.SellbotHQ,
ToontownGlobals.BossbotHQ]
if canonicalZoneId in allowedSuitZones:
return True
elif zoneId >= ToontownGlobals.DynamicZonesBegin:
return True
else:
return False

View file

@ -34,7 +34,6 @@ MIN_TRACK_INDEX = 0
MAX_TRACK_INDEX = 6
MIN_LEVEL_INDEX = 0
MAX_LEVEL_INDEX = 6
MAX_UNPAID_LEVEL_INDEX = 4
LAST_REGULAR_GAG_LEVEL = 5
UBER_GAG_LEVEL_INDEX = 6
NUM_GAG_TRACKS = 7
@ -93,13 +92,6 @@ Levels = [[0,
regMaxSkill = 10000
UberSkill = 500
MaxSkill = UberSkill + regMaxSkill
UnpaidMaxSkills = [Levels[0][1] - 1,
Levels[1][1] - 1,
Levels[2][1] - 1,
Levels[3][1] - 1,
Levels[4][4] - 1,
Levels[5][4] - 1,
Levels[6][1] - 1]
ExperienceCap = 300

View file

@ -861,7 +861,6 @@ TROLLEY_WEEKEND = 18
SILLY_SATURDAY_BINGO = 19
SILLY_SATURDAY_CIRCUIT = 20
SILLY_SATURDAY_TROLLEY = 21
ROAMING_TRIALER_WEEKEND = 22
BOSSCOG_INVASION = 23
MARCH_INVASION = 24
MORE_XP_HOLIDAY = 25

View file

@ -40,7 +40,6 @@ class Street(BattlePlace.BattlePlace):
'WaitForBattle',
'battle',
'DFA',
'trialerFA',
'doorOut',
'elevator',
'tunnelIn',
@ -58,7 +57,6 @@ class Street(BattlePlace.BattlePlace):
'sit',
'battle',
'DFA',
'trialerFA',
'doorOut',
'elevator',
'tunnelIn',
@ -75,8 +73,6 @@ class Street(BattlePlace.BattlePlace):
State.State('doorOut', self.enterDoorOut, self.exitDoorOut, ['walk']),
State.State('elevatorIn', self.enterElevatorIn, self.exitElevatorIn, ['walk']),
State.State('elevator', self.enterElevator, self.exitElevator, ['walk']),
State.State('trialerFA', self.enterTrialerFA, self.exitTrialerFA, ['trialerFAReject', 'DFA']),
State.State('trialerFAReject', self.enterTrialerFAReject, self.exitTrialerFAReject, ['walk']),
State.State('DFA', self.enterDFA, self.exitDFA, ['DFAReject', 'teleportOut', 'tunnelOut']),
State.State('DFAReject', self.enterDFAReject, self.exitDFAReject, ['walk']),
State.State('teleportIn', self.enterTeleportIn, self.exitTeleportIn, ['walk',