Extends pause api

develop
Josh Cooper 2022-10-14 15:55:44 -07:00
parent aa64dea61d
commit 736313d16b
2 changed files with 5 additions and 0 deletions

@ -166,6 +166,10 @@ bool World::DisablePlayerPausing() {
return !allow_player_pause; return !allow_player_pause;
} }
bool World::IsPlayerPausingEnabled() {
return allow_player_pause;
}
void World::Update() { void World::Update() {
static bool did_once = false; static bool did_once = false;
if (!did_once) { if (!did_once) {

@ -57,6 +57,7 @@ namespace DFHack {
bool EnablePlayerPausing(); // enable player pausing if all locks are open bool EnablePlayerPausing(); // enable player pausing if all locks are open
bool DisablePlayerPausing(); // disable player pausing if all locks are open bool DisablePlayerPausing(); // disable player pausing if all locks are open
bool IsPlayerPausingEnabled(); // returns whether the player can pause or not
void Update(); void Update();
} }