Example #1
0
 def LoadModel(self, fileName=None, loadedModel=None):
     animationState = self.GetAnimationState(self.GetPosState())
     if animationState is STATE_NONE:
         LargeCollidableStructure.LoadModel(self, NANO_CONTAINER)
     else:
         LargeCollidableStructure.LoadModel(self)
         self.LoadAllianceLogo()
         self.TriggerAnimation(animationState)
Example #2
0
 def __init__(self):
     LargeCollidableStructure.__init__(self)
     self.overlayEffects = {}
     self.nanoContainerModel = None
     self.nanoContainerModelLoadedEvent = locks.Event()
     self.structureModel = None
     self.structureModelLoadedEvent = locks.Event()
     self.isConstructing = False
     self.oldClipSphereCenter = (0.0, 0.0, 0.0)
 def __init__(self):
     LargeCollidableStructure.__init__(self)
     self.overlayEffects = {}
     self.nanoContainerModel = None
     self.nanoContainerModelLoadedEvent = locks.Event()
     self.structureModel = None
     self.structureModelLoadedEvent = locks.Event()
     self.overlayEffectEvent = locks.Event()
     self.isConstructing = False
     self.oldClipSphereCenter = (0.0, 0.0, 0.0)
     self.LoadOverlayEffects()
Example #4
0
 def DoModelChange(self):
     oldModel = self.model
     if self.level is None or self.level not in self.modelLists:
         LargeCollidableStructure.LoadModel(self)
     else:
         modelName = GetGraphicFile(self.modelLists[self.level])
         LargeCollidableStructure.LoadModel(self, modelName)
         if self.model is None:
             LargeCollidableStructure.LoadModel(self)
     self.SetStaticRotation()
     if oldModel is not None:
         uthread.pool('CustomsOffice::DelayedRemove', self.DelayedRemove,
                      oldModel, int(1000))
     if self.model is not None:
         self.model.display = True
Example #5
0
 def ClearAndRemoveAllModels(self, scene):
     LargeCollidableStructure.ClearAndRemoveAllModels(self, scene)
     self.RemoveAndClearModel(self.nanoContainerModel, scene)
     self.RemoveAndClearModel(self.structureModel, scene)
     self.nanoContainerModel = None
     self.structureModel = None
     self.model = None
Example #6
0
 def LoadModel(self, fileName=None, loadedModel=None):
     self.LogInfo('================ POS LoadModel ')
     if self.IsAnchored():
         self.LoadStationModel(True)
     else:
         LargeCollidableStructure.LoadModel(
             self,
             'res:/dx9/Model/deployables/nanocontainer/nanocontainer.red')
Example #7
0
 def Assemble(self):
     LargeCollidableStructure.Assemble(self)
     slimItem = self.typeData.get('slimItem')
     self.districtID = slimItem.districtID
     direction = self.FindClosestPlanetDir()
     self.AlignToDirection(direction)
     proximity = self.sm.GetService('godma').GetTypeAttribute(
         slimItem.typeID, const.attributeProximityRange)
     self.AddProximitySensor(proximity, 2, 0, False)
Example #8
0
 def LoadStationModel(self, builtAlready):
     LargeCollidableStructure.LoadModel(self)
     if hasattr(self.model, 'ChainAnimationEx'):
         self.model.ChainAnimationEx('NormalLoop', 0, 0, 1)
     if not self.IsOnline():
         self.buildAnim, self.onlineAnim = self.PrepareModelForConstruction(builtAlready, False)
         self.OfflineAnimation(0)
         if hasattr(self.model, 'EndAnimation'):
             self.model.EndAnimation()
     else:
         self.ResetAfterConstruction()
Example #9
0
 def SetCapsuleGraphics(self, animate = 0):
     self.LogInfo('  SetCapsuleGraphics - Animate:', animate)
     safeModel = self.model
     LargeCollidableStructure.LoadModel(self, 'res:/dx9/Model/deployables/nanocontainer/nanocontainer.red')
     self.Assemble()
     self.Display(1)
     if animate == 1:
         if self.buildAnim:
             self.buildAnim.scale = -1.0
             self.buildAnim.PlayFrom(self.buildAnim.GetMaxCurveDuration())
             uthread.pool('PlayerOwnedStructure::DelayedRemove', self.DelayedRemove, safeModel, int(self.buildAnim.GetMaxCurveDuration() * 1000))
     else:
         self.DelayedRemove(safeModel, 0)
     if animate == 1:
         if self.IsControlTower():
             self.PlayGeneralAudioEvent('wise:/msg_ct_disassembly_play')
         else:
             self.PlayGeneralAudioEvent('wise:/msg_pos_disassembly_play')
 def __init__(self):
     LargeCollidableStructure.__init__(self)
     self.modelLists = {
         1: CUSTOMSOFFICE_SPACEPORT,
         2: CUSTOMSOFFICE_SPACEELEVATOR
     }
Example #11
0
 def RemoveAllModelsFromScene(self, scene):
     LargeCollidableStructure.RemoveAllModelsFromScene(self, scene)
     scene.objects.fremove(self.nanoContainerModel)
     scene.objects.fremove(self.structureModel)
Example #12
0
 def Release(self):
     LargeCollidableStructure.Release(self)
     uthread.new(
         self.sm.GetService('district').DisableDistrict, self.districtID)
Example #13
0
 def OnDamageState(self, damageState):
     LargeCollidableStructure.OnDamageState(self, damageState)
Example #14
0
 def Prepare(self):
     self.logger.debug('BuildableStructure: Preparing')
     self.LoadStructureModel()
     LargeCollidableStructure.Prepare(self)
 def LoadModel(self, fileName = None, loadedModel = None):
     LargeCollidableStructure.LoadModel(self)
     animationState = self._GetAnimationState()
     self.TriggerAnimation(animationState)
     self._LoadAllianceLogo()
 def __init__(self):
     LargeCollidableStructure.__init__(self)
     sm.RegisterNotify(self)
 def __init__(self):
     LargeCollidableStructure.__init__(self)
     self.modelLists = {1: CUSTOMSOFFICE_SPACEPORT,
      2: CUSTOMSOFFICE_SPACEELEVATOR}
Example #18
0
 def __init__(self):
     LargeCollidableStructure.__init__(self)
     self.savedShaders = {}
     self.buildAnim, self.onlineAnim = (None, None)