def __init__(self, trigger, *args):
     ShipEffect.__init__(self, trigger, *args)
     self.moduleTypeID = trigger.moduleTypeID
     self.radius = 20000.0
     if trigger.graphicInfo is not None:
         self.realRadius = trigger.graphicInfo.range
     else:
         self.realRadius = self.fxSequencer.GetType(self.moduleTypeID).warpScrambleRange
示例#2
0
 def __init__(self, trigger, *args):
     ShipEffect.__init__(self, trigger, *args)
     self.moduleTypeID = trigger.moduleTypeID
     self.radius = 20000.0
     if trigger.graphicInfo is not None:
         self.realRadius = trigger.graphicInfo.range
     else:
         self.realRadius = self.fxSequencer.GetType(
             self.moduleTypeID).warpScrambleRange
示例#3
0
 def __init__(self, trigger, *args):
     ShipEffect.__init__(self, trigger, *args)
     self.moduleTypeID = trigger.moduleTypeID
     self.radius = 20000.0
     if trigger.graphicInfo is not None:
         self.realRadius = trigger.graphicInfo.range
     else:
         godmaStateManager = sm.GetService('godma').GetStateManager()
         self.realRadius = godmaStateManager.GetType(
             self.moduleTypeID).warpScrambleRange
示例#4
0
 def Start(self, duration):
     shipID = self.ballIDs[0]
     shipBall = self.fxSequencer.GetBall(shipID)
     if shipBall is None:
         self.sfxMgr.LogError(self.__guid__, ' could not find a ball')
         return
     ShipEffect.Start(self, duration)
示例#5
0
 def Start(self, duration):
     if self.gfx is None:
         return
     self.gfx.display = False
     self.hasExploded = False
     self.hasWind = False
     self.hasMoreCollisions = True
     self.findNext = True
     ShipEffect.Start(self, duration)
     bp = sm.StartService('michelle').GetBallpark()
     shipID = self.GetEffectShipID()
     shipBall = bp.GetBall(shipID)
     self.shipBall = shipBall
     self.shipModel = getattr(shipBall, 'model', None)
     self.shipBall.RegisterModelChangeNotification(self.ModelChangeNotify)
     slimItem = bp.GetInvItem(shipID)
     self.warpSpeedModifier = sm.StartService('godma').GetTypeAttribute(
         slimItem.typeID, const.attributeWarpSpeedMultiplier)
     if self.warpSpeedModifier is None:
         self.warpSpeedModifier = 1.0
     space = sm.GetService('space')
     self.SetupTunnelBindings()
     self.nextCollision = None
     self.insideSolid = False
     self.destination = space.warpDestinationCache[3]
     self.collisions = []
     self.collisions = self.GetWarpCollisions(shipBall)
     self.ControlFlow('NextCollision')
     uthread.worker('FxSequencer::WarpEffectLoop', self.WarpLoop, shipBall)
示例#6
0
 def _DelayedStop(self, delay):
     blue.synchro.SleepSim(delay)
     if self.playerEffect is not None:
         self.RemoveFromScene(self.playerEffect)
         self.playerEffect = None
     if self.gfx is not None:
         ShipEffect.Stop(self)
示例#7
0
 def Stop(self, reason = STOP_REASON_DEFAULT):
     shipID = self.GetEffectShipID()
     if shipID != session.shipid:
         return
     self.TeardownTunnelBindings()
     self.shipBall = None
     self.shipModel = None
     ShipEffect.Stop(self)
示例#8
0
 def Prepare(self):
     shipID = self.GetEffectShipID()
     if shipID != session.shipid:
         self.fxSequencer.OnSpecialFX(shipID, None, None, None, None, 'effects.Warping', 0, 0, 0)
         self.fxSequencer.OnSpecialFX(shipID, None, None, None, None, 'effects.WarpOut', 0, 1, 0)
         return
     ShipEffect.Prepare(self)
     self.AlignToDirection()
示例#9
0
 def _DelayedStop(self, delay):
     """
     This is effectively our stop method. It's here to ensure everything has time to finish.
     """
     blue.synchro.SleepSim(delay)
     if self.playerEffect is not None:
         self.RemoveFromScene(self.playerEffect)
         self.playerEffect = None
     if self.gfx is not None:
         ShipEffect.Stop(self)
示例#10
0
 def Stop(self, reason=STOP_REASON_DEFAULT):
     shipID = self.GetEffectShipID()
     if shipID != session.shipid:
         return
     self.TeardownTunnelBindings()
     if self.shipBall is not None:
         self.shipBall.UnregisterModelChangeNotification(
             self.ModelChangeNotify)
     self.shipBall = None
     self.shipModel = None
     ShipEffect.Stop(self)
示例#11
0
 def Start(self, duration):
     shipID = self.ballIDs[0]
     shipBall = self.fxSequencer.GetBall(shipID)
     here = sm.GetService('map').GetItem(session.solarsystemid2)
     there = sm.GetService('map').GetItem(self.graphicInfo[0])
     yaw, pitch = mathCommon.GetYawAndPitchAnglesRad((here.x, here.y, here.z), (there.x, there.y, there.z))
     quat = geo2.QuaternionRotationSetYawPitchRoll(yaw, pitch, 0)
     self.gfxModel.rotation = quat
     if eve.session.shipid == shipID:
         self.playerEffect = JumpTransitionCyno()
         self.playerEffect.Prepare(shipBall, self.graphicInfo[0], quat)
         self.playerEffect.SetScene(self.fxSequencer.GetScene())
         self.playerEffect.Start()
     ShipEffect.Start(self, duration)
     uthread.new(self.DelayedHide, shipBall, 180)
 def __init__(self, trigger, *args):
     ShipEffect.__init__(self, trigger, *args)
     self.playerEffect = None
     self.graphicID = None if args[0] is None else getattr(args[0], 'graphicID', None)
示例#13
0
 def Stop(self, reason=STOP_REASON_DEFAULT):
     """ We do our cleanup in the _DelayedStop method """
     if reason == STOP_REASON_BALL_REMOVED:
         ShipEffect.Stop(self, reason)
示例#14
0
 def Prepare(self):
     ShipEffect.Prepare(self, False)
     if session.shipid == self.GetEffectShipID():
         self.playerEffect = trinity.Load(
             'res:/dx9/model/effect/mjd_effect_player.red')
         self.AddSoundToEffect(2)
示例#15
0
 def __init__(self, trigger, *args):
     ShipEffect.__init__(self, trigger, *args)
     self.playerEffect = None
示例#16
0
 def Prepare(self):
     ShipEffect.Prepare(self)
     radius = self.realRadius
     scale = radius / self.radius
     self.gfxModel.scaling = (scale, scale, scale)
示例#17
0
 def __init__(self, trigger, *args):
     ShipEffect.__init__(self, trigger, *args)
     self.playerEffect = None
     self.graphicID = None if args[0] is None else getattr(
         args[0], 'graphicID', None)
示例#18
0
 def Prepare(self):
     ShipEffect.Prepare(self, False)
     if session.shipid == self.GetEffectShipID():
         self.playerEffect = self.RecycleOrLoad(self.secondaryGraphicFile)
         self.AddSoundToEffect(2)
示例#19
0
 def Stop(self, reason=STOP_REASON_DEFAULT):
     if reason == STOP_REASON_BALL_REMOVED:
         ShipEffect.Stop(self, reason)