public static void checkSystems(string d, string fn) { string fn1 = fn; if (fn1.Contains("intel")) { fn1 = ""; } var jd = setup.jumpData; string log = d.ToUpper(); foreach (var jn in jd.jumpNumber) { if (jn.system == log) { PlaySound.playAlert(jn.jumps.Trim()); Console.WriteLine($"CL: {fn} : {jn.system} which is {jn.jumps} away."); } } // special alert sounds if neut appears in special systems foreach (var jn in jd.special) { if (jn.system == log) { PlaySound.playAlert(jn.jumps); Console.WriteLine($"CL: {fn} : {jn.system} which is {jn.jumps} away."); } } }
public static void checkSystems(string d, string fn, string prefix, string line2) { string line = $"CL: {prefix} :: {line2}"; string fn1 = fn; bool hasNamed = false; if (fn1.Contains("intel")) { fn1 = ""; } var jd = setup.jumpData; string log = d.ToUpper(); if (ds == null) { ds = new DiscordSend(); } foreach (var jn in jd.jumpNumber) { if (jn.system == log) { ds.SendMessage(line); hasNamed = false; foreach (string fsys in setup.named) { if (fsys == jn.system) { PlaySound.playAlert(fsys); hasNamed = true; } } if (!hasNamed) { PlaySound.playAlert(jn.jumps.Trim()); } Debug.WriteLine($"CL: {prefix} : {jn.system} "); } } // special alert sounds if neut appears in special systems foreach (var jn in jd.special) { if (jn.system == log) { PlaySound.playAlert(jn.jumps); Console.WriteLine($"CL: {prefix} : {jn.system} which is {jn.jumps} away."); ds.SendMessage(line); } } }