/// <summary>
/// Covnerts the conditions into a TreeNode
/// </summary>
/// <returns></returns>
public override TreeNode ToTree()
{
string Name;
string P2 = "";
// Define start of description
if (Params[0] == "global_stat")
{
Name = "Global " + StatsConstants.PythonGlobalVars[Params[1]];
}
else
{
Name = "Round " + StatsConstants.PythonPlayerVars[Params[1]];
}
// If we have 3 params, parse the last paramenter
if (Params.Count == 3)
{
if (StatsConstants.IsTimeStat(Params[1]))
{
P2 = Condition.Sec2hms(Int32.Parse(Params[2]));
}
else
{
P2 = String.Format("{0:N0}", Int32.Parse(Params[2]));
}
Name += " Equal to or Greater Than " + P2;
}
TreeNode Me = new TreeNode(Name);
Me.Tag = this;
return(Me);
}