|
|
@ -12,6 +12,9 @@ using namespace DFHack;
|
|
|
|
using namespace Pausing;
|
|
|
|
using namespace Pausing;
|
|
|
|
using namespace df::enums;
|
|
|
|
using namespace df::enums;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::unordered_set<Lock*> PlayerLock::locks;
|
|
|
|
|
|
|
|
std::unordered_set<Lock*> AnnouncementLock::locks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace pausing {
|
|
|
|
namespace pausing {
|
|
|
|
AnnouncementLock announcementLock("monitor");
|
|
|
|
AnnouncementLock announcementLock("monitor");
|
|
|
|
PlayerLock playerLock("monitor");
|
|
|
|
PlayerLock playerLock("monitor");
|
|
|
@ -39,9 +42,6 @@ namespace pausing {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
using namespace pausing;
|
|
|
|
using namespace pausing;
|
|
|
|
|
|
|
|
|
|
|
|
std::unordered_set<Lock*> PlayerLock::locks;
|
|
|
|
|
|
|
|
std::unordered_set<Lock*> AnnouncementLock::locks;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<typename Locks>
|
|
|
|
template<typename Locks>
|
|
|
|
inline bool any_lock(Locks locks) {
|
|
|
|
inline bool any_lock(Locks locks) {
|
|
|
|
return std::any_of(locks.begin(), locks.end(), [](Lock* lock) { return lock->isLocked(); });
|
|
|
|
return std::any_of(locks.begin(), locks.end(), [](Lock* lock) { return lock->isLocked(); });
|
|
|
|