public CSystemAnomaly(SystemAnomaly systemAnomaly) { SystemAnomaly = systemAnomaly; Id = systemAnomaly.ID; Stopwatch = new Stopwatch(); State = SystemAnomalyState.StartWarp; _maxLockTargets = (int)Math.Min(Global.Ext.Me.MaxLockedTargets, Global.Ship.MaxLockedTargets); _noTargetStopwatch = new Stopwatch(); }
private void InWarp() { Log.WriteLine("InWarp"); var mode = Global.Ext.Me.ToEntity.Mode; if (mode != (int)EntityMode.Warping) { State = SystemAnomalyState.KillEnemies; } }
private void KillEnemies() { Log.WriteLine("KillEnemies"); var enemies = GetEnemies(); if (enemies.Count == 0) { if (_noTargetStopwatch.Elapsed.Seconds > 30) { State = SystemAnomalyState.LootWrecks; } return; } _noTargetStopwatch.Restart(); LockTargets(enemies); ActivateWeapons(); }
private void StartWarp() { Log.WriteLine("StartWarp"); var mode = Global.Ext.Me.ToEntity.Mode; if (mode == (int)EntityMode.Warping) { State = SystemAnomalyState.InWarp; } else if (GetEnemies().Count > 0) { State = SystemAnomalyState.KillEnemies; } else { SystemAnomaly.WarpTo(0, false); } }
private void SalvageWrecks() { State = SystemAnomalyState.Complete; }
private void LootWrecks() { State = SystemAnomalyState.SalvageWrecks; }