Replace ConfigParser with SDK-provided MyIni
This commit is contained in:
@ -48,9 +48,9 @@ namespace IngameScript
|
||||
|
||||
public static string ExtractTag(IMyTerminalBlock block, string tag)
|
||||
{
|
||||
Regex r = new Regex($@"({tag}\w*?)\s");
|
||||
Match m = r.Match(block.CustomName);
|
||||
if (m.Success) return m.Groups[0].Captures[0].ToString();
|
||||
foreach (string token in block.CustomName.Split(' ')) {
|
||||
if (token.StartsWith(tag)) return token;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user