AutoSyndrome: added smart arguments for location, worker id, and reaction id.
parent
a4dc79565a
commit
b320fb25f3
@ -0,0 +1,32 @@
|
||||
|
||||
#include "Console.h"
|
||||
#include "Core.h"
|
||||
#include "DataDefs.h"
|
||||
#include "Export.h"
|
||||
#include "PluginManager.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using namespace DFHack;
|
||||
using namespace std;
|
||||
|
||||
command_result printArgs (color_ostream &out, std::vector <std::string> & parameters);
|
||||
|
||||
DFHACK_PLUGIN("printArgs");
|
||||
|
||||
DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands)
|
||||
{
|
||||
commands.push_back(PluginCommand(
|
||||
"printArgs", "Print the arguments given.",
|
||||
printArgs, false
|
||||
));
|
||||
return CR_OK;
|
||||
}
|
||||
|
||||
command_result printArgs (color_ostream &out, std::vector <std::string> & parameters)
|
||||
{
|
||||
for ( size_t a = 0; a < parameters.size(); a++ ) {
|
||||
out << "Argument " << (a+1) << ": \"" << parameters[a] << "\"" << endl;
|
||||
}
|
||||
return CR_OK;
|
||||
}
|
Loading…
Reference in New Issue