Implement ShopEditor

This commit is contained in:
2022-11-01 21:55:05 +08:00
parent 52317d8d5a
commit 302e4e327d
10 changed files with 345 additions and 67 deletions

View File

@@ -72,5 +72,13 @@ namespace GrasscutterTools.Game
public string[] Lines { get; }
public static int ToId(string line) => int.Parse(line.Substring(0, line.IndexOf(':')).Trim());
public static bool TryToId(string line, out int id)
{
id = 0;
var sp = line.IndexOf(':');
if (sp == -1) return false;
return int.TryParse(line.Substring(0, sp).Trim(), out id);
}
}
}