2014-12-23 14:56:15 -07:00
|
|
|
#include "buildingplan-lib.h"
|
|
|
|
|
2020-10-04 21:05:08 -06:00
|
|
|
#include <cstdarg>
|
2020-09-08 01:17:56 -06:00
|
|
|
#include "Core.h"
|
2014-12-23 14:56:15 -07:00
|
|
|
|
2020-09-08 01:17:56 -06:00
|
|
|
using namespace DFHack;
|
2015-02-14 20:53:06 -07:00
|
|
|
|
2020-09-08 01:17:56 -06:00
|
|
|
bool show_debugging = false;
|
2014-12-23 14:56:15 -07:00
|
|
|
|
2020-10-04 21:05:08 -06:00
|
|
|
void debug(const char *fmt, ...)
|
2014-12-23 14:56:15 -07:00
|
|
|
{
|
2020-09-08 01:17:56 -06:00
|
|
|
if (!show_debugging)
|
2015-02-14 20:53:06 -07:00
|
|
|
return;
|
|
|
|
|
2020-09-08 01:17:56 -06:00
|
|
|
color_ostream_proxy out(Core::getInstance().getConsole());
|
2020-10-04 21:05:08 -06:00
|
|
|
out.print("DEBUG(buildingplan): ");
|
|
|
|
va_list args;
|
|
|
|
va_start(args, fmt);
|
|
|
|
out.vprint(fmt, args);
|
|
|
|
va_end(args);
|
|
|
|
out.print("\n");
|
2015-07-27 12:05:26 -06:00
|
|
|
}
|