From 5199ad9c64393ec3007d716d3b6f73ffeb12d1fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 8 Mar 2012 00:24:01 +0100 Subject: [PATCH] Add nasty red warning text. --- source/df2minecraft.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/df2minecraft.cpp b/source/df2minecraft.cpp index 669f23e..111ba70 100644 --- a/source/df2minecraft.cpp +++ b/source/df2minecraft.cpp @@ -3122,6 +3122,14 @@ DFhackCExport command_result plugin_shutdown ( Core * c ) DFhackCExport command_result mc_export (Core * c, vector & parameters) { DFConsole = &(c->con); + // first, check if the user is OK with running this... + std::string question_out; + CommandHistory ch; + DFConsole->printerr("This is experimental/broken/crazy. You are running it at your own risk.\n"); + DFConsole->lineedit("Are you sure? Type in 'yes' if you are: ",question_out,ch); + if(question_out != "yes") + return CR_OK; + //load settings xml TiXmlDocument doc ( "hack/df2mc.xml" ); bool loadOkay = doc.LoadFile();