2012-01-19 23:15:51 -07:00
|
|
|
#include "Core.h"
|
|
|
|
#include <Console.h>
|
|
|
|
#include <Export.h>
|
|
|
|
#include <PluginManager.h>
|
2012-01-20 12:21:29 -07:00
|
|
|
|
|
|
|
#include "proto/Map.pb.h"
|
2012-01-19 23:15:51 -07:00
|
|
|
using namespace DFHack;
|
|
|
|
|
|
|
|
DFhackCExport command_result mapexport (Core * c, std::vector <std::string> & parameters);
|
|
|
|
|
|
|
|
DFhackCExport const char * plugin_name ( void )
|
|
|
|
{
|
|
|
|
return "mapexport";
|
|
|
|
}
|
|
|
|
|
|
|
|
DFhackCExport command_result plugin_init ( Core * c, std::vector <PluginCommand> &commands)
|
|
|
|
{
|
2012-01-20 10:17:08 -07:00
|
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
2012-01-19 23:15:51 -07:00
|
|
|
commands.clear();
|
|
|
|
commands.push_back(PluginCommand("mapexport", "Starts up and shuts down protobufs.", mapexport, true));
|
|
|
|
return CR_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
DFhackCExport command_result plugin_shutdown ( Core * c )
|
|
|
|
{
|
2012-01-20 10:17:08 -07:00
|
|
|
google::protobuf::ShutdownProtobufLibrary();
|
2012-01-19 23:15:51 -07:00
|
|
|
return CR_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
DFhackCExport command_result mapexport (Core * c, std::vector <std::string> & parameters)
|
|
|
|
{
|
|
|
|
for(int i = 0; i < parameters.size();i++)
|
|
|
|
{
|
|
|
|
if(parameters[i] == "help" || parameters[i] == "?")
|
|
|
|
{
|
|
|
|
c->con.print("This doesn't do anything at all yet.\n");
|
|
|
|
return CR_OK;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
c->Suspend();
|
2012-01-20 10:17:08 -07:00
|
|
|
dfproto::Tile tile;
|
2012-01-19 23:15:51 -07:00
|
|
|
c->con.print("Hold on, I'm working on it!\n");
|
|
|
|
c->Resume();
|
|
|
|
return CR_OK;
|
|
|
|
}
|