Simulator::cPlanetRecord class

Keeps all the information related to a planet.

This does not represent the planet visually (that is the Simulator::cPlanet class), this is just information about the planet that will be stored in the galaxy database in the saved games folder. This class is used by Simulator::cStarRecord. Despite the name, this class also represents asteroid belts in a solar system.

Planet records are uniquely identified with a PlanetID, which can be retrieved using GetID(). You can get the record from an ID using cStarManager::GetPlanetRecord().

Base classes

class Resource::SpecialResourceObject

Public static functions

static auto GenerateTerrainKey() -> ResourceKey
Generates a .prop file ResourceKey that is currently unused in game packages, so that the planet terrain can be saved there.
static void Create(PlanetID planetId, cPlanetRecordPtr& dst)

Public functions

auto GetStarRecord() const -> cStarRecord*
auto GetStarID() const -> StarID
auto GetID() const -> PlanetID
auto GetTechLevel() const -> TechLevel
void SetGeneratedTerrainKey(const ResourceKey& key)
auto GetGeneratedTerrainKey() -> ResourceKey&

Public variables

string16 mName
PlanetType mType
The type of the planet, which determines whether it is a gas giant, asteroid belt, or regular rocky planet.
int mFlags
cEllipticalOrbit mOrbit
The orbit this planet follows around its star.
bool mbRotationIsNull
If true, the planet does not rotate around itself (i.e. there are no "days").
Math::Vector3 mRotationAxis
Axis of rotation for planet days, that is, in which axis the planet spins around itself.
float mRotationPeriod
How much time, in real seconds, the planet takes to make a full spin around itself (that is, how long an astronomical day is for this planet).
char field_AC
char field_AD
float mAtmosphereScore
float mTemperatureScore
float mWaterScore
vector<ResourceKey> mPlantSpecies
IDs of the plant species that inhabit this planet.
vector<ResourceKey> mAnimalSpecies
IDs of the animal species that inhabit this planet.
vector<cCommodityNodeData*> mCommodityNodes
vector<int> field_F8
int field_10C
vector<int> field_110
int mNumDefenderUFOs
float mTimeLastBuiltUFOs
float mTimeCalledReinforcements
bool mbHomeWorld
vector<cPlanetObjectData> mPlanetObjects
vector<uint32_t> mTerrainStampsToRemove
vector<cCivData*> mCivData
vector<cTribeData*> mTribeData
ResourceKey mKey
int field_190
TechLevel mTechLevel
ResourceKey mSpiceGen
ResourceKey mGeneratedTerrainKey