general: Loads to Pick A Toon (forced)

This commit is contained in:
Open Toontown 2019-11-10 21:25:06 -05:00
parent 5ab0422564
commit 4ae4a6e3e4
4 changed files with 29 additions and 7 deletions

View file

@ -34,3 +34,11 @@ class Settings:
@staticmethod
def getResolution():
return 1
@staticmethod
def getEmbeddedMode():
return 0
@staticmethod
def doSavedSettingsExist():
return 0

View file

@ -950,12 +950,19 @@ class OTPClientRepository(ClientRepositoryBase):
@report(types=['args', 'deltaStamp'], dConfigParam='teleport')
def enterWaitForAvatarList(self):
self.handler = self.handleWaitForAvatarList
if not self.astronSupport:
self.handler = self.handleWaitForAvatarList
self._requestAvatarList()
@report(types=['args', 'deltaStamp'], dConfigParam='teleport')
def _requestAvatarList(self):
self.sendGetAvatarsMsg()
if not self.astronSupport:
self.sendGetAvatarsMsg()
else:
# TODO SET UP PROPERLY
#self.astronLoginManager.sendRequestAvatarList()
self.avList = []
self.loginFSM.request('chooseAvatar', [self.avList])
self.waitForDatabaseTimeout(requestName='WaitForAvatarList')
self.acceptOnce(OtpAvatarManager.OtpAvatarManager.OnlineEvent, self._requestAvatarList)
@ -2241,7 +2248,7 @@ class OTPClientRepository(ClientRepositoryBase):
break
else:
self.notify.warning('Received generate from %d for %d:%d, which is not a part of any existing interests!' % (doId, parentId, zoneId))
self.notify.warning('Received generate for %d from %d:%d, which is not a part of any existing interests!' % (doId, parentId, zoneId))
interest = None
if not interest or not interest.events:

View file

@ -1,7 +1,7 @@
import __builtin__
import sys
__all__ = ['enumerate', 'nonRepeatingRandomList', 'describeException', 'pdir']
__all__ = ['enumerate', 'nonRepeatingRandomList', 'describeException', 'pdir', 'choice']
if not hasattr(__builtin__, 'enumerate'):
def enumerate(L):
@ -130,6 +130,13 @@ def pdir(obj, str = None, width = None,
_pdir(obj, str, width, fTruncate, lineWidth, wantPrivate)
print
def choice(condition, ifTrue, ifFalse):
# equivalent of C++ (condition ? ifTrue : ifFalse)
if condition:
return ifTrue
else:
return ifFalse
def quantize(value, divisor):
# returns new value that is multiple of (1. / divisor)
return float(int(value * int(divisor))) / int(divisor)
@ -148,3 +155,4 @@ def isClient():
__builtin__.pdir = pdir
__builtin__.isClient = isClient
__builtin__.choice = choice

View file

@ -125,7 +125,7 @@ class TeaserPanel(DirectObject):
base.cr.centralLogger.writeClientEvent('velvetRope: %s' % pageName)
self.browser.scrollTo(PageOrder.index(pageName))
self.cleanup()
self.dialog = TTDialog.TTDialog(parent=aspect2dp, text=TTLocalizer.TeaserTop, text_scale=TTLocalizer.TPdialog, text_align=TextNode.ACenter, text_wordwrap=TTLocalizer.TPdialogWordwrap, topPad=-0.15, midPad=1.25, sidePad=0.25, pad=(0.25, 0.25), command=self.__handleDone, fadeScreen=0.5, style=TTDialog.TwoChoice, buttonTextList=[TTLocalizer.TeaserSubscribe, TTLocalizer.TeaserContinue], button_text_scale=TTLocalizer.TPbuttonTextList, buttonPadSF=5.5, sortOrder=NO_FADE_SORT_INDEX, image=self.upsellBackground)
self.dialog = TTDialog.TTDialog(parent=aspect2dp, text=TTLocalizer.TeaserTop, text_scale=TTLocalizer.TPdialog, text_align=TextNode.ACenter, text_wordwrap=TTLocalizer.TPdialogWordwrap, topPad=-0.15, midPad=1.25, sidePad=0.25, pad=(0.25, 0.25), command=self.__handleDone, fadeScreen=0.5, style=TTDialog.TwoChoice, buttonTextList=[TTLocalizer.TeaserSubscribe, TTLocalizer.TeaserContinue], button_text_scale=TTLocalizer.TPbuttonTextList, buttonPadSF=5.5, sortOrder=DGG.NO_FADE_SORT_INDEX, image=self.upsellBackground)
self.dialog.setPos(0, 0, 0.75)
self.browser.reparentTo(self.dialog)
base.transitions.fadeScreen(0.5)
@ -160,8 +160,7 @@ class TeaserPanel(DirectObject):
class FeatureBrowser(DirectScrolledList):
def __init__(self, parent = aspect2dp, **kw):
self.parent = parent
optiondefs = (('parent', self.parent, None),
optiondefs = (('parent', parent, None),
('relief', None, None),
('numItemsVisible', 1, None),
('items', [], None))