NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

wormhole.py (1851B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\environment\spaceObject\wormhole.py
      2 from eve.client.script.environment.spaceObject.spaceObject import SpaceObject
      3 
      4 class Wormhole(SpaceObject):
      5 
      6     def __init__(self):
      7         SpaceObject.__init__(self)
      8         self.targetNebulaPath = None
      9 
     10     def Assemble(self):
     11         slimItem = self.typeData.get('slimItem')
     12         resDict = self.spaceMgr.GetNebulaTextureForType(slimItem.nebulaType)
     13         self.targetNebulaPath = resDict['envMap1ResPath']
     14         self.logger.debug('Updating wormhole textures...')
     15         for param in self.model.externalParameters:
     16             if param.name == 'LQ_NebulaClass':
     17                 param.destinationObject.resourcePath = resDict['lowQualityNebulaResPath']
     18             elif param.name == 'LQ_NebulaMix1' or param.name == 'LQ_NebulaMix2':
     19                 param.destinationObject.resourcePath = resDict['lowQualityNebulaMixResPath']
     20             elif param.name == 'destinationReflectionCube':
     21                 param.destinationObject.resourcePath = resDict['envMap1ResPath']
     22 
     23         self.logger.debug('Wormhole updated with the following textures: %s', resDict)
     24         self.logger.debug('Wormhole - Assemble : wormholeSize=%s, nebulaType=%s, wormholeAge=%s, maxShipJumpMass=%s', slimItem.wormholeSize, slimItem.nebulaType, slimItem.wormholeAge, slimItem.maxShipJumpMass)
     25 
     26     def Explode(self):
     27         if self.exploded:
     28             return 0
     29         if self.model is None:
     30             return 0
     31         self.exploded = True
     32         self.SetControllerVariablesFromSlimItem(self.typeData.get('slimItem'))
     33         return 12000
     34 
     35     def OnSlimItemUpdated(self, slimItem):
     36         self.typeData['slimItem'] = slimItem
     37         self.SetControllerVariablesFromSlimItem(slimItem)
     38         self.logger.debug('Wormhole updated.')