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

modules.py (1211B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\environment\effects\modules.py
      2 from eve.client.script.environment.effects.GenericEffect import GenericEffect, STOP_REASON_DEFAULT
      3 
      4 class VisualModuleEffect(GenericEffect):
      5     __guid__ = 'effects.VisualModuleEffect'
      6 
      7     def __init__(self, trigger, *args):
      8         super(VisualModuleEffect, self).__init__(trigger, *args)
      9         self.moduleTypeID = trigger.moduleTypeID
     10         self.shipBall = None
     11         self.shipBall = None
     12         self.module = None
     13 
     14     def Start(self, duration):
     15         super(VisualModuleEffect, self).Start(duration)
     16         self.shipBall = self.GetEffectShipBall()
     17         if self.shipBall is None:
     18             RuntimeError('VisualModuleEffect: no ship ball')
     19         self.shipBall.FitHardpoints(blocking=True)
     20         self.module = self.shipBall.modules.get(self.moduleID)
     21         if self.module is not None:
     22             self.module.StartShooting(True)
     23 
     24     def Stop(self, reason = STOP_REASON_DEFAULT):
     25         super(VisualModuleEffect, self).Stop(reason)
     26         if self.module is not None:
     27             self.module.StopShooting()
     28         self.shipBall = None
     29         self.module = None