mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
Lock friends list for 1.5 seconds after loading a friend + show text when player is sending gifts too fast.
This commit is contained in:
parent
f3ca3df3c0
commit
96d78ae33d
5 changed files with 12 additions and 4 deletions
|
@ -196,6 +196,8 @@ class CatalogItem:
|
||||||
return TTLocalizer.CatalogPurchaseGiftLimitReached
|
return TTLocalizer.CatalogPurchaseGiftLimitReached
|
||||||
elif retcode == ToontownGlobals.P_NotEnoughMoney:
|
elif retcode == ToontownGlobals.P_NotEnoughMoney:
|
||||||
return TTLocalizer.CatalogPurchaseGiftNotEnoughMoney
|
return TTLocalizer.CatalogPurchaseGiftNotEnoughMoney
|
||||||
|
elif retcode == ToontownGlobals.P_TooFast:
|
||||||
|
return TTLocalizer.CatalogPurchaseGiftTooFast
|
||||||
else:
|
else:
|
||||||
return TTLocalizer.CatalogPurchaseGiftGeneralError % {'friend': '%s',
|
return TTLocalizer.CatalogPurchaseGiftGeneralError % {'friend': '%s',
|
||||||
'error': retcode}
|
'error': retcode}
|
||||||
|
|
|
@ -814,6 +814,7 @@ class CatalogScreen(DirectFrame):
|
||||||
taskMgr.remove('clarabelleGreeting')
|
taskMgr.remove('clarabelleGreeting')
|
||||||
taskMgr.remove('clarabelleHelpText1')
|
taskMgr.remove('clarabelleHelpText1')
|
||||||
taskMgr.remove('clarabelleAskAnythingElse')
|
taskMgr.remove('clarabelleAskAnythingElse')
|
||||||
|
taskMgr.remove('friendButtonsReady')
|
||||||
self.hide()
|
self.hide()
|
||||||
self.hangup.hide()
|
self.hangup.hide()
|
||||||
self.destroy()
|
self.destroy()
|
||||||
|
@ -1026,15 +1027,18 @@ class CatalogScreen(DirectFrame):
|
||||||
|
|
||||||
self.friend = None
|
self.friend = None
|
||||||
self.friendLabel['text'] = TTLocalizer.CatalogGiftUpdating
|
self.friendLabel['text'] = TTLocalizer.CatalogGiftUpdating
|
||||||
|
taskMgr.remove('friendButtonsReady')
|
||||||
self['phone'].requestGiftAvatar(self.friendAvId)
|
self['phone'].requestGiftAvatar(self.friendAvId)
|
||||||
|
|
||||||
def setFriendReady(self, friend):
|
def setFriendReady(self, friend):
|
||||||
for friendButton in self.friends:
|
|
||||||
friendButton['state'] = DGG.NORMAL
|
|
||||||
|
|
||||||
self.friend = friend
|
self.friend = friend
|
||||||
self.friendLabel['text'] = TTLocalizer.CatalogGiftTo % self.friendName
|
self.friendLabel['text'] = TTLocalizer.CatalogGiftTo % self.friendName
|
||||||
|
taskMgr.doMethodLater(1.5, self.setFriendButtonsReady, 'friendButtonsReady')
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
|
def setFriendButtonsReady(self, task=None):
|
||||||
|
for friendButton in self.friends:
|
||||||
|
friendButton['state'] = DGG.NORMAL
|
||||||
|
|
||||||
def __giftToggle(self):
|
def __giftToggle(self):
|
||||||
messenger.send('wakeup')
|
messenger.send('wakeup')
|
||||||
|
|
|
@ -248,7 +248,7 @@ class DistributedPhoneAI(DistributedFurnitureItemAI):
|
||||||
|
|
||||||
def requestGiftAvatarOperation(self, avId, doId, optional, callback):
|
def requestGiftAvatarOperation(self, avId, doId, optional, callback):
|
||||||
if avId in self.fsms:
|
if avId in self.fsms:
|
||||||
return
|
return ToontownGlobals.P_TooFast
|
||||||
|
|
||||||
loadOperation = LoadGiftAvatar(self, avId, doId, optional, callback)
|
loadOperation = LoadGiftAvatar(self, avId, doId, optional, callback)
|
||||||
loadOperation.start()
|
loadOperation.start()
|
||||||
|
|
|
@ -5513,6 +5513,7 @@ CatalogPurchaseGiftNotAGift = 'This item could not be sent to %s because it woul
|
||||||
CatalogPurchaseGiftWillNotFit = "This item could not be sent to %s because it doesn't fit them."
|
CatalogPurchaseGiftWillNotFit = "This item could not be sent to %s because it doesn't fit them."
|
||||||
CatalogPurchaseGiftLimitReached = "This item could not be sent to %s because they already have it."
|
CatalogPurchaseGiftLimitReached = "This item could not be sent to %s because they already have it."
|
||||||
CatalogPurchaseGiftNotEnoughMoney = "This item could not be sent to %s because you can't afford it."
|
CatalogPurchaseGiftNotEnoughMoney = "This item could not be sent to %s because you can't afford it."
|
||||||
|
CatalogPurchaseGiftTooFast = "This item could not be sent to %s because you are sending gifts too fast."
|
||||||
CatalogAcceptGeneralError = 'The item could not be removed from your mailbox because of some internal game error: error code %s.'
|
CatalogAcceptGeneralError = 'The item could not be removed from your mailbox because of some internal game error: error code %s.'
|
||||||
CatalogAcceptRoomError = "You don't have any place to put this. You'll have to get rid of something."
|
CatalogAcceptRoomError = "You don't have any place to put this. You'll have to get rid of something."
|
||||||
CatalogAcceptLimitError = "You already have as many of these as you can handle. You'll have to get rid of something."
|
CatalogAcceptLimitError = "You already have as many of these as you can handle. You'll have to get rid of something."
|
||||||
|
|
|
@ -46,6 +46,7 @@ CatalogNumWeeksPerSeries = 13
|
||||||
CatalogNumWeeks = 78
|
CatalogNumWeeks = 78
|
||||||
PetFloorCollPriority = 5
|
PetFloorCollPriority = 5
|
||||||
PetPanelProximityPriority = 6
|
PetPanelProximityPriority = 6
|
||||||
|
P_TooFast = -29
|
||||||
P_NoTrunk = -28
|
P_NoTrunk = -28
|
||||||
P_AlreadyOwnBiggerCloset = -27
|
P_AlreadyOwnBiggerCloset = -27
|
||||||
P_ItemAlreadyRented = -26
|
P_ItemAlreadyRented = -26
|
||||||
|
|
Loading…
Reference in a new issue