Made kittens plugin optional, and disabled by default.

develop
Petr Mrázek 2011-07-12 00:07:59 +02:00
parent fa4d2d9b2e
commit aeeece5c5f
3 changed files with 5 additions and 14 deletions

@ -66,7 +66,7 @@ SET(DFHACK_DOXYGEN_DESTINATION dev/doxygen)
## some options for the user/developer to play with
OPTION(BUILD_LIBRARY "Build the library that goes into DF." ON)
OPTION(BUILD_PLUGINS "Build the library that goes into DF." ON)
OPTION(BUILD_PLUGINS "Build the plugins." ON)
IF(BUILD_LIBRARY)
add_subdirectory (library)

@ -117,14 +117,8 @@ int fHKthread(void * iodata)
}
// A thread function... for the interactive console.
static bool flip0 = false;
int fIOthread(void * iodata)
{
if(!flip0)
{
std::cerr << "Console from Thread " << SDL_ThreadID() << std::endl;
flip0 = true;
}
Core * core = ((IODATA*) iodata)->core;
PluginManager * plug_mgr = ((IODATA*) iodata)->plug_mgr;
if(plug_mgr == 0 || core == 0)
@ -219,16 +213,10 @@ Core::Core()
HotkeyCond = 0;
};
static bool flip1 = 0;
bool Core::Init()
{
// init the console. This must be always the first step!
con = new Console();
if(!flip1)
{
std::cerr << "Construct from Thread " << SDL_ThreadID() << std::endl;
flip1 = true;
}
// find out what we are...
vif = new DFHack::VersionInfoFactory("Memory.xml");
p = new DFHack::Process(vif);

@ -25,7 +25,10 @@ MACRO(DFHACK_PLUGIN PLUGIN_NAME PLUGIN_SOURCES)
ENDMACRO()
DFHACK_PLUGIN(reveal reveal.cpp)
DFHACK_PLUGIN(kittens kittens.cpp)
OPTION(BUILD_KITTENS "Build the kittens plugin." OFF)
if(BUILD_KITTENS)
DFHACK_PLUGIN(kittens kittens.cpp)
endif()
DFHACK_PLUGIN(prospector prospector.cpp)
DFHACK_PLUGIN(cleanmap cleanmap.cpp)
DFHACK_PLUGIN(weather weather.cpp)