Commit 6383113e authored by aggsol's avatar aggsol 🙉

mark combats in graph

parent 65553d62
......@@ -24,9 +24,14 @@
namespace
{
std::array<std::string, 2> s_skipLabels = {
std::array<std::string, 7> s_skipLabels = {
"fixed",
"TODO"
"TODO",
"Combat",
"combat",
"Karma",
"Skill",
"Stamina"
};
bool isSkipLabel(const std::string& l)
......@@ -72,7 +77,7 @@ void Graph::createDotFile(const std::map<int, Section>& sections)
throw std::runtime_error("Cannot write dot file");
}
dotfile << "digraph G {\n"
<< "forcelabels=true;"
<< "forcelabels=true;\n"
<< " node [style=filled fillcolor=white labelfontname=Arial labelfontsize=10];\n";
for(auto& s: sections)
......@@ -86,13 +91,19 @@ void Graph::createDotFile(const std::map<int, Section>& sections)
{
if(attr == "TODO")
{
dotfile << " " << sectionNum << "[fillcolor=red];\n";
dotfile << " " << sectionNum << " [fillcolor=red];\n";
continue;
}
if(attr == "Combat" || attr == "combat")
{
dotfile << " " << sectionNum << " [fillcolor=yellow];\n";
continue;
}
if(attr == "fixed")
{
dotfile << " " << sectionNum << "[shape=box];\n";
dotfile << " " << sectionNum << " [shape=box];\n";
continue;
}
......@@ -100,6 +111,7 @@ void Graph::createDotFile(const std::map<int, Section>& sections)
{
continue;
}
if(counter > 0)
{
label << ", ";
......
......@@ -167,10 +167,7 @@ void Parser::parseLine(const std::string& line, std::map<int, Section>& sections
}
else if(c == ']')
{
if(peek != '#') // skip inline span styles
{
sections[m_currSection].m_classes.insert(value);
}
sections[m_currSection].m_classes.insert(value);
state = State::Start;
}
else if(c == '.')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment