EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
JumpBridge.cpp
Go to the documentation of this file.
1 
10 #include "pos/JumpBridge.h"
12 #include "system/SystemManager.h"
13 
15 : StructureSE(structure, services, system, data)
16 {
17 
18 }
19 
21 {
23 }
24 
26 {
28 }
29 
31 {
32  _log(SOV__DEBUG, "Onlining Jump Bridge...");
33 
34  // Checks to see if bridge can be brought online
35 
36  // Make sure the system is not being jammed
37  SovereigntyData sovData = svDataMgr.GetSovereigntyData(m_self->locationID());
38  if (sovData.jammerID != 0) {
39  throw CustomError("This system is currently being jammed.");
40  }
41 
42  // Make sure player is not in high-sec (configurable)
43  if (!sConfig.world.highSecCyno) {
44  if (m_system->GetSecValue() >= 0.5f) {
45  throw CustomError("This module may not be used in high security space.");
46  }
47  }
48 
50 }
51 
53 {
54  _log(SOV__DEBUG, "Offlining TCU... Resetting claim's hubID.");
56 }
#define sConfig
A macro for easier access to the singleton.
#define _log(type, fmt,...)
Definition: logsys.h:124
JumpBridgeSE(StructureItemRef structure, PyServiceMgr &services, SystemManager *system, const FactionData &data)
Definition: JumpBridge.cpp:14
virtual void SetOnline()
Definition: Structure.cpp:869
Advanced version of UserError that allows to send a full custom message.
Definition: PyExceptions.h:453
InventoryItemRef m_self
Definition: SystemEntity.h:269
uint32 locationID() const
SystemManager * m_system
Definition: SystemEntity.h:263
float GetSecValue()
virtual void Process()
Definition: Structure.cpp:458
virtual void SetOffline()
Definition: JumpBridge.cpp:52
virtual void SetOffline()
Definition: Structure.cpp:888
virtual void Init()
Definition: JumpBridge.cpp:20
#define svDataMgr
virtual void Process()
Definition: JumpBridge.cpp:25
virtual void SetOnline()
Definition: JumpBridge.cpp:30
virtual void Init()
Definition: Structure.cpp:275
Reference-counting-based smart pointer.
Definition: RefPtr.h:133