MCPcopy Create free account
hub / github.com/DFHack/dfhack / get_modeline

Function get_modeline

plugins/blueprint.cpp:1475–1491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1473}
1474
1475static string get_modeline(color_ostream &out, const blueprint_options &opts,
1476 const string &mode, const string &phase) {
1477 ostringstream modeline;
1478 modeline << "#" << mode << " label(" << phase << ")";
1479 if (opts.playback_start.x > 0) {
1480 modeline << " start(" << opts.playback_start.x
1481 << ";" << opts.playback_start.y;
1482 if (!opts.playback_start_comment.empty()) {
1483 modeline << ";" << opts.playback_start_comment;
1484 }
1485 modeline << ")";
1486 }
1487 if (is_meta_phase(out, opts, phase))
1488 modeline << " hidden()";
1489
1490 return modeline.str();
1491}
1492
1493static bool write_blueprint(color_ostream &out,
1494 map<string, ofstream*> &output_files,

Callers 1

write_blueprintFunction · 0.85

Calls 3

is_meta_phaseFunction · 0.85
emptyMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected