Exemple #1
0
 def OnFirstUpdate(self):
     global AgeStartedIn
     AgeStartedIn = PtGetAgeName()
     if ((type(stringSDLVarName.value) == type(''))
             and (stringSDLVarName.value != '')):
         PtDebugPrint(('DEBUG: xAgeSDLIntActEnabler.OnFirstUpdate:\tOn %s' %
                       stringSDLVarName.value))
         try:
             self.enabledStateList = stringStartValues.value.split(',')
             for i in range(len(self.enabledStateList)):
                 self.enabledStateList[i] = int(
                     self.enabledStateList[i].strip())
         except:
             PtDebugPrint(
                 'ERROR: xAgeSDLIntActEnabler.OnFirstUpdate():\tERROR: couldn\'t process start state list'
             )
     else:
         PtDebugPrint(
             'ERROR: xAgeSDLIntActEnabler.OnFirstUpdate():\tERROR: missing SDL var name in max file'
         )
     # fix for pages that are loaded deferred
     import xUserKI
     if xUserKI.AgeInitialized(
     ):  # if it is already initialized now, we are loaded dynamically
         self.OnServerInitComplete()
 def OnFirstUpdate(self):
     global AgeStartedIn
     AgeStartedIn = PtGetAgeName()
     # fix for pages that are loaded deferred
     import xUserKI
     if xUserKI.AgeInitialized(): # if it is already initialized now, we are loaded dynamically
         self.OnServerInitComplete()
 def OnFirstUpdate(self):
     if (not ((type(strSDLVarName.value) == type('')) and
              (strSDLVarName.value != ''))):
         PtDebugPrint(
             'ERROR: xAgeSDLIntStateListResp.OnFirstUpdate():\tERROR: missing SDL var name in max file'
         )
     # fix for pages that are loaded deferred
     import xUserKI
     if xUserKI.AgeInitialized(
     ):  # if it is already initialized now, we are loaded dynamically
         self.Initialize()
Exemple #4
0
 def OnFirstUpdate(self):
     global AgeStartedIn
     AgeStartedIn = PtGetAgeName()
     if (not ((type(stringVarName.value) == type('')) and
              (stringVarName.value != ''))):
         PtDebugPrint(
             'ERROR: xAgeSDLBoolToggle.OnFirstUpdate():\tERROR: missing SDL var name'
         )
     # fix for pages that are loaded deferred
     import xUserKI
     if xUserKI.AgeInitialized(
     ):  # if it is already initialized now, we are loaded dynamically
         self.OnServerInitComplete()
Exemple #5
0
 def OnFirstUpdate(self):
     global AgeStartedIn
     AgeStartedIn = PtGetAgeName()
     if (not ((type(stringSDLVarClosed.value) == type('')) and
              (stringSDLVarClosed.value != ''))):
         PtDebugPrint(
             'xStandardDoor.OnFirstUpdate():\tERROR: missing SDL var name in max file'
         )
     # Fix some SDL vars to be updated here
     import xUserKI
     if xUserKI.AgeInitialized(
     ):  # if it is already initialized now, we are loaded dynamically
         self.OnServerInitComplete()
 def OnFirstUpdate(self):
     global AgeStartedIn
     AgeStartedIn = PtGetAgeName()
     if ((type(stringSDLVarName.value) != type(''))
             or (stringSDLVarName.value == '')):
         PtDebugPrint(
             'ERROR: xAgeSDLIntRespList.OnFirstUpdate():\tERROR: missing SDL var name in max file'
         )
     elif ((type(stringFormat.value) != type(''))
           or (stringFormat.value == '')):
         PtDebugPrint(
             'ERROR: xAgeSDLIntRespList.OnFirstUpdate():\tERROR: missing responder name format string in max file'
         )
     # fix for pages that are loaded deferred
     import xUserKI
     if xUserKI.AgeInitialized(
     ):  # if it is already initialized now, we are loaded dynamically
         self.OnServerInitComplete()
Exemple #7
0
 def OnFirstUpdate(self):
     global AgeStartedIn
     AgeStartedIn = PtGetAgeName()
     if ((type(stringSDLVarName.value) == type('')) and (stringSDLVarName.value != '')):
         PtDebugPrint(('DEBUG: xAgeSDLVarSet.OnFirstUpdate:\tOn %s' % stringSDLVarName.value))
         try:
             str = stringStartStates.value.replace(' ', '')
             tuples = str.split(')(')
             tuples[0] = tuples[0][1:]
             tuples[-1] = tuples[-1][:-1]
             for tup in tuples:
                 vals = tup.split(',')
                 self.enabledStateDict[int(vals[0])] = int(vals[1])
         except:
             PtDebugPrint('ERROR: xAgeSDLVarSet.OnFirstUpdate():\tERROR: couldn\'t process start state list')
     else:
         PtDebugPrint('ERROR: xAgeSDLVarSet.OnFirstUpdate():\tERROR: missing SDL var name in max file')
     # fix for pages that are loaded deferred
     import xUserKI
     if xUserKI.AgeInitialized(): # if it is already initialized now, we are loaded dynamically
         self.OnServerInitComplete()