Add cell capacity parameters (#1348)
parent
a4cfe616a8
commit
2685a1eb60
|
@ -3150,6 +3150,8 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
|||
|
||||
m_missionType = line->GetParam("type")->AsMissionType(MISSION_NORMAL);
|
||||
m_globalMagnifyDamage = line->GetParam("magnifyDamage")->AsFloat(1.0f);
|
||||
m_globalNuclearCapacity = line->GetParam("nuclearCapacity")->AsFloat(10.0f);
|
||||
m_globalCellCapacity = line->GetParam("cellCapacity")->AsFloat(1.0f);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
@ -5978,6 +5980,16 @@ float CRobotMain::GetGlobalMagnifyDamage()
|
|||
return m_globalMagnifyDamage;
|
||||
}
|
||||
|
||||
float CRobotMain::GetGlobalNuclearCapacity()
|
||||
{
|
||||
return m_globalNuclearCapacity;
|
||||
}
|
||||
|
||||
float CRobotMain::GetGlobalCellCapacity()
|
||||
{
|
||||
return m_globalCellCapacity;
|
||||
}
|
||||
|
||||
// Beginning of the effect when the instruction "detect" is used.
|
||||
|
||||
void CRobotMain::StartDetectEffect(COldObject* object, CObject* target)
|
||||
|
|
|
@ -468,6 +468,11 @@ public:
|
|||
//! Returns global magnifyDamage setting
|
||||
float GetGlobalMagnifyDamage();
|
||||
|
||||
//! Returns global NuclearCell capacity Setting
|
||||
float GetGlobalNuclearCapacity();
|
||||
//! Returns global PowerCell capacity setting
|
||||
float GetGlobalCellCapacity();
|
||||
|
||||
void StartDetectEffect(COldObject* object, CObject* target);
|
||||
|
||||
//! Enable crash sphere debug rendering
|
||||
|
@ -650,6 +655,9 @@ protected:
|
|||
|
||||
float m_globalMagnifyDamage = 0.0f;
|
||||
|
||||
float m_globalNuclearCapacity = 10.0f;
|
||||
float m_globalCellCapacity = 1.0f;
|
||||
|
||||
bool m_exitAfterMission = false;
|
||||
|
||||
bool m_codeBattleInit = false;
|
||||
|
|
|
@ -2500,7 +2500,7 @@ float COldObject::GetAbsTime()
|
|||
|
||||
float COldObject::GetCapacity()
|
||||
{
|
||||
return m_type == OBJECT_ATOMIC ? 10.0f : 1.0f;
|
||||
return m_type == OBJECT_ATOMIC ? m_main->GetGlobalNuclearCapacity() : m_main->GetGlobalCellCapacity() ;
|
||||
}
|
||||
|
||||
bool COldObject::IsRechargeable()
|
||||
|
|
Loading…
Reference in New Issue