static internal string CodexToHTML(this List <Skill> codex)
        {
            // Update this with the following modes:
            // 1. List. Shouldn't put breaks or newlines in between skills, just spaces. Skills should be separated
            //    out by category (<h2>warrior</h2><h3>strength</h3>).
            // 2. When using just icons, just plop all of them together and let the webpage newline it.
            // 3. Use something more like what I've got now for the full descriptions, maybe with headers for profession and attribute as above.

            string html = "";

            // if(Mode is list)...
            {
                Skill.Professions lastProf = (Skill.Professions)(-1);
                Skill.Attributes  lastAttr = (Skill.Attributes)(-1);
                foreach (Skill skill in codex)
                {
                    if (skill.Profession != lastProf)
                    {
                        html    += "<h2>" + skill.Profession.ToString() + "</h2>" + Environment.NewLine;
                        lastProf = skill.Profession;
                    }
                    if (skill.Attribute != lastAttr)
                    {
                        html    += "<h3>" + skill.AttributeName + "</h3>" + Environment.NewLine;
                        lastAttr = skill.Attribute;
                    }
                    html += skill.AHref() + " | ";
                }
            }

            return(html);
        }
Exemple #2
0
 internal void SetByAttribute(Skill.Attributes attribute, bool value)
 {
     for (int i = 0; i < Skills.Count; ++i)
     {
         if (Skills[i].first.Attribute == attribute)
         {
             Skills[i].second = value;
         }
     }
     UpdateSetDescription?.Invoke();
     Redraw();
 }
Exemple #3
0
 static public bool IsPrimary(this Skill.Attributes att)
 {
     return(Skill.PrimaryAttributes.Contains(att));
 }