From 736313d16bfac9cb1611794f594822c2bc8846e0 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Fri, 14 Oct 2022 15:55:44 -0700 Subject: [PATCH] Extends pause api --- plugins/spectate/pause.cpp | 4 ++++ plugins/spectate/pause.h | 1 + 2 files changed, 5 insertions(+) diff --git a/plugins/spectate/pause.cpp b/plugins/spectate/pause.cpp index fadf8d5e9..5c60e2194 100644 --- a/plugins/spectate/pause.cpp +++ b/plugins/spectate/pause.cpp @@ -166,6 +166,10 @@ bool World::DisablePlayerPausing() { return !allow_player_pause; } +bool World::IsPlayerPausingEnabled() { + return allow_player_pause; +} + void World::Update() { static bool did_once = false; if (!did_once) { diff --git a/plugins/spectate/pause.h b/plugins/spectate/pause.h index ff4f8992d..286954683 100644 --- a/plugins/spectate/pause.h +++ b/plugins/spectate/pause.h @@ -57,6 +57,7 @@ namespace DFHack { bool EnablePlayerPausing(); // enable 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(); }