QcHeadlessTools Namespace
The one-shot tools of qtcraft-headless that start no world and exit when done: the app icon, the sounds, the handbook (Markdown and web), texture packs and atlas statistics, the showcase tour and the world generation tools (–world-stats, –slice-map, –biome-map, –map). More...
| Header: | #include <headless/QcHeadlessTools.h> |
Functions
| void | exitSoon(int code) |
| bool | exportIcon(const QString &path) |
| bool | run(const QCommandLineParser &parser, const QcHeadlessOptions::Options &options, const QcServerConfig &config, const std::shared_ptr<const QcContentRegistry> &content) |
| bool | wantsWorldTool(const QCommandLineParser &parser, const QcHeadlessOptions::Options &options) |
Detailed Description
Function Documentation
void QcHeadlessTools::exitSoon(int code)
Ends the application with code once the event loop runs.
bool QcHeadlessTools::exportIcon(const QString &path)
–export-icon: writes the icon of the base game to path, a Windows .ico file when the path ends in .ico, else a macOS .iconset directory (the icon must not depend on the mods of whoever builds the game); returns false when the base game cannot be loaded.
bool QcHeadlessTools::run(const QCommandLineParser &parser, const QcHeadlessOptions::Options &options, const QcServerConfig &config, const std::shared_ptr<const QcContentRegistry> &content)
Runs the tool the command line (options as parser read them) asks for with content and config (seed, world options, generator version); returns false when it asks for none. The content tools come first; otherwise it builds the terrain generator, prints its warnings and runs the world tool, if any.
bool QcHeadlessTools::wantsWorldTool(const QCommandLineParser &parser, const QcHeadlessOptions::Options &options)
Returns whether the command line (options as parser read them) asks for a world generation tool (–world-stats, –slice-map, –biome-map, –map); these draw a terrain world.