general: Loads to Pick A Toon (forced)
This commit is contained in:
parent
5ab0422564
commit
4ae4a6e3e4
4 changed files with 29 additions and 7 deletions
|
@ -34,3 +34,11 @@ class Settings:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def getResolution():
|
def getResolution():
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def getEmbeddedMode():
|
||||||
|
return 0
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def doSavedSettingsExist():
|
||||||
|
return 0
|
||||||
|
|
|
@ -950,12 +950,19 @@ class OTPClientRepository(ClientRepositoryBase):
|
||||||
|
|
||||||
@report(types=['args', 'deltaStamp'], dConfigParam='teleport')
|
@report(types=['args', 'deltaStamp'], dConfigParam='teleport')
|
||||||
def enterWaitForAvatarList(self):
|
def enterWaitForAvatarList(self):
|
||||||
|
if not self.astronSupport:
|
||||||
self.handler = self.handleWaitForAvatarList
|
self.handler = self.handleWaitForAvatarList
|
||||||
self._requestAvatarList()
|
self._requestAvatarList()
|
||||||
|
|
||||||
@report(types=['args', 'deltaStamp'], dConfigParam='teleport')
|
@report(types=['args', 'deltaStamp'], dConfigParam='teleport')
|
||||||
def _requestAvatarList(self):
|
def _requestAvatarList(self):
|
||||||
|
if not self.astronSupport:
|
||||||
self.sendGetAvatarsMsg()
|
self.sendGetAvatarsMsg()
|
||||||
|
else:
|
||||||
|
# TODO SET UP PROPERLY
|
||||||
|
#self.astronLoginManager.sendRequestAvatarList()
|
||||||
|
self.avList = []
|
||||||
|
self.loginFSM.request('chooseAvatar', [self.avList])
|
||||||
self.waitForDatabaseTimeout(requestName='WaitForAvatarList')
|
self.waitForDatabaseTimeout(requestName='WaitForAvatarList')
|
||||||
self.acceptOnce(OtpAvatarManager.OtpAvatarManager.OnlineEvent, self._requestAvatarList)
|
self.acceptOnce(OtpAvatarManager.OtpAvatarManager.OnlineEvent, self._requestAvatarList)
|
||||||
|
|
||||||
|
@ -2241,7 +2248,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
||||||
|
|
||||||
break
|
break
|
||||||
else:
|
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
|
interest = None
|
||||||
|
|
||||||
if not interest or not interest.events:
|
if not interest or not interest.events:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import __builtin__
|
import __builtin__
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
__all__ = ['enumerate', 'nonRepeatingRandomList', 'describeException', 'pdir']
|
__all__ = ['enumerate', 'nonRepeatingRandomList', 'describeException', 'pdir', 'choice']
|
||||||
|
|
||||||
if not hasattr(__builtin__, 'enumerate'):
|
if not hasattr(__builtin__, 'enumerate'):
|
||||||
def enumerate(L):
|
def enumerate(L):
|
||||||
|
@ -130,6 +130,13 @@ def pdir(obj, str = None, width = None,
|
||||||
_pdir(obj, str, width, fTruncate, lineWidth, wantPrivate)
|
_pdir(obj, str, width, fTruncate, lineWidth, wantPrivate)
|
||||||
print
|
print
|
||||||
|
|
||||||
|
def choice(condition, ifTrue, ifFalse):
|
||||||
|
# equivalent of C++ (condition ? ifTrue : ifFalse)
|
||||||
|
if condition:
|
||||||
|
return ifTrue
|
||||||
|
else:
|
||||||
|
return ifFalse
|
||||||
|
|
||||||
def quantize(value, divisor):
|
def quantize(value, divisor):
|
||||||
# returns new value that is multiple of (1. / divisor)
|
# returns new value that is multiple of (1. / divisor)
|
||||||
return float(int(value * int(divisor))) / int(divisor)
|
return float(int(value * int(divisor))) / int(divisor)
|
||||||
|
@ -148,3 +155,4 @@ def isClient():
|
||||||
|
|
||||||
__builtin__.pdir = pdir
|
__builtin__.pdir = pdir
|
||||||
__builtin__.isClient = isClient
|
__builtin__.isClient = isClient
|
||||||
|
__builtin__.choice = choice
|
||||||
|
|
|
@ -125,7 +125,7 @@ class TeaserPanel(DirectObject):
|
||||||
base.cr.centralLogger.writeClientEvent('velvetRope: %s' % pageName)
|
base.cr.centralLogger.writeClientEvent('velvetRope: %s' % pageName)
|
||||||
self.browser.scrollTo(PageOrder.index(pageName))
|
self.browser.scrollTo(PageOrder.index(pageName))
|
||||||
self.cleanup()
|
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.dialog.setPos(0, 0, 0.75)
|
||||||
self.browser.reparentTo(self.dialog)
|
self.browser.reparentTo(self.dialog)
|
||||||
base.transitions.fadeScreen(0.5)
|
base.transitions.fadeScreen(0.5)
|
||||||
|
@ -160,8 +160,7 @@ class TeaserPanel(DirectObject):
|
||||||
class FeatureBrowser(DirectScrolledList):
|
class FeatureBrowser(DirectScrolledList):
|
||||||
|
|
||||||
def __init__(self, parent = aspect2dp, **kw):
|
def __init__(self, parent = aspect2dp, **kw):
|
||||||
self.parent = parent
|
optiondefs = (('parent', parent, None),
|
||||||
optiondefs = (('parent', self.parent, None),
|
|
||||||
('relief', None, None),
|
('relief', None, None),
|
||||||
('numItemsVisible', 1, None),
|
('numItemsVisible', 1, None),
|
||||||
('items', [], None))
|
('items', [], None))
|
||||||
|
|
Loading…
Reference in a new issue