The data class holds all the different python variables and constants related to statistics and awards
예제 #1
0
        /// <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);
        }
예제 #2
0
 /// <summary>
 /// Sets the params for this condition
 /// </summary>
 /// <param name="Params"></param>
 public override void SetParams(List <string> Params)
 {
     this.Params = Params;
     if (Params[0] == "player_stat" && !StatsConstants.IsTimeStat(Params[1]))
     {
         Params[0] = "player_score";
     }
 }
예제 #3
0
 public PlayerStat(List <string> Params)
 {
     this.Params = Params;
     if (Params[0] == "player_stat" && !StatsConstants.IsTimeStat(Params[1]))
     {
         Params[0] = "player_score";
     }
 }
예제 #4
0
        /// <summary>
        /// Covnerts the conditions into a TreeNode
        /// </summary>
        /// <returns></returns>
        public override TreeNode ToTree()
        {
            // Achieve award less times then
            string Type  = StatsConstants.PythonGlobalVars[Params[1]];
            string Value = (StatsConstants.IsTimeStat(Params[1]))
                ? Condition.Sec2hms(Int32.Parse(Params[2]))
                : String.Format("{0:N0}", Int32.Parse(Params[2]));

            TreeNode Me = new TreeNode("Achieved " + Value + " Global " + Type + " One or More Times");

            Me.Tag = this;
            return(Me);
        }