RatAttack: changed RATSIGNAL separator from |
to \x02
Apparently `|` are valid in CMDR names. So now we’re using a proper separator character instead.
This commit is contained in:
parent
a9a1a84aa7
commit
6f51333bd4
1 changed files with 3 additions and 2 deletions
|
@ -55,6 +55,7 @@ namespace RatAttack
|
|||
{
|
||||
public string Signal { get; set; }
|
||||
public bool Announce { get; set; }
|
||||
private readonly char separator = '\x02';
|
||||
|
||||
public Ratsignal()
|
||||
=> (Signal, Announce) = ("", false);
|
||||
|
@ -66,7 +67,7 @@ namespace RatAttack
|
|||
{
|
||||
try
|
||||
{
|
||||
string[] parts = serialization.Split('|');
|
||||
string[] parts = serialization.Split(separator);
|
||||
Signal = parts[0];
|
||||
Announce = Boolean.Parse(parts[1]);
|
||||
}
|
||||
|
@ -77,7 +78,7 @@ namespace RatAttack
|
|||
}
|
||||
|
||||
public override string ToString()
|
||||
=> $"{Signal}|{Announce}";
|
||||
=> $"{Signal}{separator}{Announce}";
|
||||
}
|
||||
|
||||
private static int ParseRatsignal(string ratsignal)
|
||||
|
|
Loading…
Reference in a new issue