diff --git a/data/Memory-ng.xml b/data/Memory-ng.xml index a8576e88f..3cf4be3e7 100644 --- a/data/Memory-ng.xml +++ b/data/Memory-ng.xml @@ -2226,8 +2226,17 @@ - + + + +
+
+ + +
+ + diff --git a/tools/supported/CMakeLists.txt b/tools/supported/CMakeLists.txt index 22482f5ea..bc080448a 100644 --- a/tools/supported/CMakeLists.txt +++ b/tools/supported/CMakeLists.txt @@ -9,6 +9,10 @@ ENDIF(UNIX) ADD_EXECUTABLE(dfreveal reveal.cpp) TARGET_LINK_LIBRARIES(dfreveal dfhack) +# force pause! +ADD_EXECUTABLE(dfpause forcepause.cpp) +TARGET_LINK_LIBRARIES(dfpause dfhack) + # prospector - produces a list of available materials and their quantities ADD_EXECUTABLE(dfprospector prospector.cpp) TARGET_LINK_LIBRARIES(dfprospector dfhack) @@ -113,6 +117,7 @@ dfvdig dfcleanmap dfunstuck dfprobe +dfpause dfdoffsets dfattachtest dfcleartask diff --git a/tools/supported/forcepause.cpp b/tools/supported/forcepause.cpp new file mode 100644 index 000000000..521859078 --- /dev/null +++ b/tools/supported/forcepause.cpp @@ -0,0 +1,39 @@ +// This forces the game to pause. + +#include +#include +#include +using namespace std; + +#include +#include + +int main (void) +{ + DFHack::ContextManager DFMgr("Memory.xml"); + DFHack::Context *DF; + try + { + DF = DFMgr.getSingleContext(); + DF->Attach(); + } + catch (exception& e) + { + cerr << e.what() << endl; + #ifndef LINUX_BUILD + cin.ignore(); + #endif + return 1; + } + + DFHack::Gui *Gui =DF->getGui(); + cout << "Pausing..." << endl; + + Gui->SetPauseState(true); + DF->Resume(); + #ifndef LINUX_BUILD + cout << "Done. The current game frame will have to finish first. This can take some time on bugged maps." << endl; + cin.ignore(); + #endif + return 0; +}