54 _log(SOV__DEBUG,
"Onlining SBU...");
62 _log(SOV__DEBUG,
"- STATE CHANGE - This system has %u SBUs installed in the total of %u stargates. The TCU is now vulnerable to attack.", (
int)
GetSBUs(), (
int)
GetGates());
66 if (cur.second->IsTCUSE())
68 cur.second->GetTCUSE()->SetVulnerable();
76 _log(SOV__DEBUG,
"This system has %u SBUs installed in the total of %u stargates. The TCU is invulnerable.", (
int)
GetSBUs(), (
int)
GetGates());
87 _log(SOV__DEBUG,
"- STATE CHANGE - This system has %u SBUs installed in the total of %u stargates. The TCU is no longer vulnerable to attack.", (
int)
GetSBUs(), (
int)
GetGates());
91 if (cur.second->IsTCUSE())
93 cur.second->GetTCUSE()->SetOnline();
101 _log(SOV__DEBUG,
"This system has %u SBUs installed in the total of %u stargates. The TCU is vulnerable.", (
int)
GetSBUs(), (
int)
GetGates());
114 _log(SOV__DEBUG,
"SBUSE::MarkContested(): Sending ProcessSovStatusChanged for %u", systemID);
117 svDataMgr.MarkContested(systemID, contested);
134 std::vector<Client *> list;
136 for (
auto cur : list)
138 if (cur->GetChar().get() !=
nullptr)
140 cur->SendNotification(
"ProcessSovStatusChanged",
"clientID", &data);
141 _log(SOV__DEBUG,
"ProcessSovStatusChanged sent to client %u", cur->GetClientID());
155 int numberOfSBUs = 0;
158 if (cur.second->IsSBUSE())
167 return (
float)numberOfSBUs;
#define _log(type, fmt,...)
std::map< uint32, SystemEntity * > GetGates()
virtual void SetOffline()
void MarkContested(uint32 systemID, bool contested)
SBUSE(StructureItemRef structure, PyServiceMgr &services, SystemManager *system, const FactionData &fData)
void SetItem(size_t index, PyRep *object)
Stores Python object.
void SetSBUSE(SBUSE *pSBU)
void SetAttribute(uint16 attrID, int num, bool notify=true)
virtual void SetOffline()
std::map< uint32, SystemEntity * > GetOperationalStatics()
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
Reference-counting-based smart pointer.