|
class ConstructionPart |
|
{ |
|
string m_Name; |
|
int m_Id; |
|
string m_PartName; |
|
string m_MainPartName; |
|
bool m_IsBuilt; |
|
bool m_IsBase; |
|
bool m_IsGate; |
|
ref array<string> m_RequiredParts; |
|
|
|
void ConstructionPart( string name, string part_name, string main_part_name, int id, bool is_built, bool is_base, bool is_gate, array<string> required_parts ) |
|
{ |
|
m_Name = name; |
|
m_PartName = part_name; |
|
m_MainPartName = main_part_name; |
|
m_Id = id; |
|
m_IsBuilt = is_built; |
|
m_IsBase = is_base; |
|
m_IsGate = is_gate; |
|
m_RequiredParts = required_parts; |
|
} |
|
|
|
string GetName() |
|
{ |
|
string ret = Widget.TranslateString(m_Name); |
|
return ret; |
|
} |
|
|
|
string GetPartName() |
|
{ |
|
return m_PartName; |
|
} |
|
|
|
string GetMainPartName() |
|
{ |
|
return m_MainPartName; |
|
} |
|
|
|
int GetId() |
|
{ |
|
return m_Id; |
|
} |
|
|
|
bool IsBuilt() |
|
{ |
|
return m_IsBuilt; |
|
} |
|
|
|
void SetBuiltState( bool is_built ) |
|
{ |
|
if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] SetBuildState=" + is_built + " part=" + m_PartName); |
|
m_IsBuilt = is_built; |
|
} |
|
|
|
void SetRequestBuiltState( bool req_built ) |
|
{ |
|
if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] SetRequestBuiltState=" + req_built + " part=" + m_PartName); |
|
if (GetGame().IsMultiplayer()) |
|
SetBuiltState(req_built); |
|
else |
|
; |
|
} |
|
|
|
bool IsBase() |
|
{ |
|
return m_IsBase; |
|
} |
|
|
|
bool IsGate() |
|
{ |
|
return m_IsGate; |
|
} |
|
|
|
array<string> GetRequiredParts() |
|
{ |
|
return m_RequiredParts; |
|
} |
|
} |
|
|