示例#1
0
        private string GenerateConmentForRaceFunc(raceinfo ri)
        {
            string s   = Template.startingunitcomment;
            string tmp = ri.baseID;

            if (tmp == "" || tmp.Length > 4)
            {
                tmp = "ogre";
            }
            s   = s.Replace("[baseID]", tmp);
            tmp = ri.peonID;
            if (tmp == "" || tmp.Length > 4)
            {
                tmp = "opeo";
            }
            s = s.Replace("[peonID]", tmp);
            s = s.Replace("[RaceName]", ri.raceName);
            return(s);
        }
示例#2
0
        private string GenerateContentForRaceFunc(string funcname, raceinfo ri)
        {
            string s = Template.startingunittemplate;

            s = s.Replace("[FuncName]", funcname);
            string tmp = ri.baseID;

            if (tmp == "" || tmp.Length > 4)
            {
                tmp = "ogre";
            }
            s   = s.Replace("[baseID]", tmp);
            tmp = ri.peonID;
            if (tmp == "" || tmp.Length > 4)
            {
                tmp = "opeo";
            }
            s = s.Replace("[peonID]", tmp);
            return(s);
        }
示例#3
0
 private string GenerateContentForRaceFunc(string funcname, raceinfo ri)
 {
     string s = Template.startingunittemplate;
     s = s.Replace("[FuncName]", funcname);
     string tmp=ri.baseID;
     if (tmp == "" || tmp.Length > 4) { tmp = "ogre"; }
     s = s.Replace("[baseID]", tmp);
     tmp = ri.peonID;
     if (tmp == "" || tmp.Length > 4) { tmp = "opeo"; }
     s = s.Replace("[peonID]", tmp);
     return s;
 }
示例#4
0
 private string GenerateConmentForRaceFunc(raceinfo ri)
 {
     string s = Template.startingunitcomment;
     string tmp = ri.baseID;
     if (tmp == "" || tmp.Length > 4) { tmp = "ogre"; }
     s = s.Replace("[baseID]", tmp);
     tmp = ri.peonID;
     if (tmp == "" || tmp.Length > 4) { tmp = "opeo"; }
     s = s.Replace("[peonID]", tmp);
     s = s.Replace("[RaceName]", ri.raceName);
     return s;
 }