MCPcopy Create free account
hub / github.com/DFHack/dfhack / fpause

Method fpause

library/Commands.cpp:385–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383 }
384
385 command_result Commands::fpause(color_ostream& con, Core& core, const std::string& first, const std::vector<std::string>& parts)
386 {
387 if (auto scr = Gui::getViewscreenByType<df::viewscreen_new_regionst>())
388 {
389 if (scr->doing_mods || scr->doing_simple_params || scr->doing_params)
390 {
391 con.printerr("Cannot pause now.\n");
392 return CR_FAILURE;
393 }
394 scr->abort_world_gen_dialogue = true;
395 }
396 else
397 {
398 World::SetPauseState(true);
399 }
400 con.print("The game was forced to pause!\n");
401 return CR_OK;
402 }
403
404 command_result Commands::clear(color_ostream& con, Core& core, const std::string& first, const std::vector<std::string>& parts)
405 {

Callers

nothing calls this directly

Calls 2

SetPauseStateFunction · 0.85
printMethod · 0.45

Tested by

no test coverage detected