customsOffice.py (2012B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\environment\spaceObject\customsOffice.py 2 import blue 3 import trinity 4 import uthread 5 import eve.common.script.sys.eveCfg as util 6 from eve.client.script.environment.spaceObject.LargeCollidableStructure import LargeCollidableStructure 7 from fsdBuiltData.common.graphicIDs import GetGraphicFile 8 CUSTOMSOFFICE_SPACEPORT = 4579 9 CUSTOMSOFFICE_SPACEELEVATOR = 4580 10 11 class CustomsOffice(LargeCollidableStructure): 12 13 def __init__(self): 14 LargeCollidableStructure.__init__(self) 15 self.modelLists = {1: CUSTOMSOFFICE_SPACEPORT, 16 2: CUSTOMSOFFICE_SPACEELEVATOR} 17 18 def Assemble(self): 19 self.SetStaticRotation() 20 self.SetupSharedAmbientAudio() 21 22 def LoadModel(self): 23 self.logger.debug('CustomsOffice LoadModel ') 24 self.level = self.ballpark.slimItems[self.id].level 25 self.DoModelChange() 26 27 def OnSlimItemUpdated(self, slimItem): 28 self.level = self.ballpark.slimItems[self.id].level 29 uthread.pool('CustomsOffice::DoModelChange', self.DoModelChange) 30 31 def DoModelChange(self): 32 oldModel = self.model 33 if self.level is None or self.level not in self.modelLists: 34 LargeCollidableStructure.LoadModel(self) 35 else: 36 modelName = GetGraphicFile(self.modelLists[self.level]) 37 LargeCollidableStructure.LoadModel(self, modelName) 38 if self.model is None: 39 LargeCollidableStructure.LoadModel(self) 40 self.SetStaticRotation() 41 if oldModel is not None: 42 uthread.pool('CustomsOffice::DelayedRemove', self.DelayedRemove, oldModel, int(1000)) 43 if self.model is not None: 44 self.model.display = True 45 46 def DelayedRemove(self, model, delay): 47 model.name = model.name + '_removing' 48 model.display = False 49 trinity.WaitForResourceLoads() 50 blue.pyos.synchro.SleepWallclock(delay) 51 self.RemoveAndClearModel(model)