merge buildingplan-lib.cpp into buildingplan.cpp

develop
myk002 2021-09-04 21:00:18 -07:00 committed by Myk
parent 0d1668a7a5
commit 2ebfca42dd
6 changed files with 20 additions and 28 deletions

@ -93,7 +93,7 @@ if(BUILD_SUPPORTED)
dfhack_plugin(blueprint blueprint.cpp LINK_LIBRARIES lua)
dfhack_plugin(burrows burrows.cpp LINK_LIBRARIES lua)
dfhack_plugin(building-hacks building-hacks.cpp LINK_LIBRARIES lua)
dfhack_plugin(buildingplan buildingplan.cpp buildingplan-lib.cpp buildingplan-planner.cpp buildingplan-rooms.cpp LINK_LIBRARIES lua)
dfhack_plugin(buildingplan buildingplan.cpp buildingplan-planner.cpp buildingplan-rooms.cpp LINK_LIBRARIES lua)
dfhack_plugin(changeitem changeitem.cpp)
dfhack_plugin(changelayer changelayer.cpp)
dfhack_plugin(changevein changevein.cpp)

@ -1,22 +0,0 @@
#include "buildingplan-lib.h"
#include <cstdarg>
#include "Core.h"
using namespace DFHack;
bool show_debugging = false;
void debug(const char *fmt, ...)
{
if (!show_debugging)
return;
color_ostream_proxy out(Core::getInstance().getConsole());
out.print("DEBUG(buildingplan): ");
va_list args;
va_start(args, fmt);
out.vprint(fmt, args);
va_end(args);
out.print("\n");
}

@ -15,8 +15,7 @@
#include "LuaTools.h"
#include "uicommon.h"
#include "buildingplan-planner.h"
#include "buildingplan-lib.h"
#include "buildingplan.h"
static const std::string planned_building_persistence_key_v1 = "buildingplan/constraints";
static const std::string planned_building_persistence_key_v2 = "buildingplan/constraints2";

@ -1,5 +1,4 @@
#include "buildingplan-rooms.h"
#include "buildingplan-lib.h"
#include "buildingplan.h"
#include <df/entity_position.h>
#include <df/job_type.h>

@ -14,7 +14,7 @@
#include "uicommon.h"
#include "listcolumn.h"
#include "buildingplan-lib.h"
#include "buildingplan.h"
DFHACK_PLUGIN("buildingplan");
#define PLUGIN_VERSION "2.0"
@ -31,6 +31,22 @@ bool all_enabled = false;
bool in_dummy_screen = false;
std::unordered_map<BuildingTypeKey, bool, BuildingTypeKeyHash> planmode_enabled;
bool show_debugging = false;
void debug(const char *fmt, ...)
{
if (!show_debugging)
return;
color_ostream_proxy out(Core::getInstance().getConsole());
out.print("DEBUG(buildingplan): ");
va_list args;
va_start(args, fmt);
out.vprint(fmt, args);
va_end(args);
out.print("\n");
}
class ViewscreenChooseMaterial : public dfhack_viewscreen
{
public: