Conflicts:
	plugins/changelayer.cpp
develop
Petr Mrázek 2012-03-29 18:42:45 +02:00
commit 541e0ca205
2 changed files with 1 additions and 7 deletions

@ -53,7 +53,7 @@ const string changeitem_help =
" quality, q - change base quality. must be followed by number (0-5)\n" " quality, q - change base quality. must be followed by number (0-5)\n"
" force - ignore subtypes, force change to new material.\n" " force - ignore subtypes, force change to new material.\n"
"Example:\n" "Example:\n"
" changeitem m INORGANIC:GRANITE here" " changeitem m INORGANIC:GRANITE here\n"
" change material of all items under the cursor to granite\n" " change material of all items under the cursor to granite\n"
" changeitem q 5\n" " changeitem q 5\n"
" change currently selected item to masterpiece quality\n"; " change currently selected item to masterpiece quality\n";

@ -84,10 +84,8 @@ command_result changelayer (color_ostream &out, std::vector <std::string> & para
DFHACK_PLUGIN("changelayer"); DFHACK_PLUGIN("changelayer");
// Mandatory init function. If you have some global state, create it here.
DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands) DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands)
{ {
// Fill the command list with your commands.
commands.push_back(PluginCommand( commands.push_back(PluginCommand(
"changelayer", "Change a whole geology layer.", "changelayer", "Change a whole geology layer.",
changelayer, false, /* true means that the command can't be used from non-interactive user interface */ changelayer, false, /* true means that the command can't be used from non-interactive user interface */
@ -97,12 +95,8 @@ DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <Plug
return CR_OK; return CR_OK;
} }
// This is called right before the plugin library is removed from memory.
DFhackCExport command_result plugin_shutdown ( color_ostream &out ) DFhackCExport command_result plugin_shutdown ( color_ostream &out )
{ {
// You *MUST* kill all threads you created before this returns.
// If everything fails, just return CR_FAILURE. Your plugin will be
// in a zombie state, but things won't crash.
return CR_OK; return CR_OK;
} }