From 594247b57eb1755c36e44fbcef98a7e118a65e30 Mon Sep 17 00:00:00 2001 From: expwnent Date: Thu, 30 May 2013 19:07:22 -0400 Subject: [PATCH] skeletonShort: slightly easier to copy+paste it to start new plugins, but is more illegible to new DFHackers. --- plugins/skeleton/skeletonShort.cpp | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 plugins/skeleton/skeletonShort.cpp diff --git a/plugins/skeleton/skeletonShort.cpp b/plugins/skeleton/skeletonShort.cpp new file mode 100644 index 000000000..ebca0776e --- /dev/null +++ b/plugins/skeleton/skeletonShort.cpp @@ -0,0 +1,40 @@ +#include "Console.h" +#include "Core.h" +#include "DataDefs.h" +#include "Export.h" +#include "PluginManager.h" + +//#include "df/world.h" + +using namespace DFHack; + +command_result skeleton2 (color_ostream &out, std::vector & parameters); + +DFHACK_PLUGIN("skeleton2"); + +DFhackCExport command_result plugin_init ( color_ostream &out, std::vector &commands) +{ + commands.push_back(PluginCommand( + "skeleton2", + "shortHelpString", + skeleton2, + false, //allow non-interactive use + "longHelpString" + )); + return CR_OK; +} + +DFhackCExport command_result plugin_shutdown ( color_ostream &out ) +{ + return CR_OK; +} + +command_result skeleton2 (color_ostream &out, std::vector & parameters) +{ + if (!parameters.empty()) + return CR_WRONG_USAGE; + CoreSuspender suspend; + out.print("blah"); + return CR_OK; +} +