Beispiel #1
0
        public SystemBody(OrbitingEntity parent, PlanetType type)
            : base()
        {
            /// <summary>
            /// create these or else anything that relies on a unique global id will break.
            /// </summary>
            Id = Guid.NewGuid();

            Type = type; // set the type ASAP in case anthing needs to know it.

            Moons       = new BindingList <SystemBody>();
            Populations = new BindingList <Population>();

            SSEntity = StarSystemEntityType.Body;

            Parent   = parent;
            Position = parent.Position;

            TaskGroupsInOrbit = new BindingList <TaskGroupTN>();

            GeoSurveyList = new Dictionary <Faction, bool>();

            /// <summary>
            /// Default mineral amount is zero.
            /// do mineral generation elsewhere.
            /// </summary>
            m_aiMinerialReserves      = new float[Constants.Minerals.NO_OF_MINERIALS];
            m_aiMinerialAccessibility = new float[Constants.Minerals.NO_OF_MINERIALS];
            for (int mineralIterator = 0; mineralIterator < (int)Constants.Minerals.MinerialNames.MinerialCount; mineralIterator++)
            {
                m_aiMinerialReserves[mineralIterator]      = 0.0f;
                m_aiMinerialAccessibility[mineralIterator] = 0.0f;
            }
            _MineralsGenerated = false;
            _BodyMineralType   = MineralType.NotGenerated;

#warning planet generation needs minerals, anomalies, and ruins generation.
            PlanetaryRuins = new Ruins();


            Atmosphere = new Atmosphere(this);

            if (Type != PlanetType.GasDwarf && Type != PlanetType.GasGiant && Type != PlanetType.IceGiant)
            {
                SupportsPopulations = true;
            }
        }
Beispiel #2
0
        public Planet(Star primary, OrbitingEntity parent)
            : base()
        {
            /// <summary>
            /// create these or else anything that relies on a unique global id will break.
            /// </summary>
            Id = Guid.NewGuid();

            Moons       = new BindingList <Planet>();
            Gases       = new BindingList <Gas>();
            Populations = new BindingList <Population>();

            GeoSurveyList = new Dictionary <Faction, bool>();
            GeoTeamSurvey = false;

            SSEntity = StarSystemEntityType.Body;

            Primary = primary;
            Parent  = parent;

            TaskGroupsInOrbit = new BindingList <TaskGroupTN>();

#warning planet generation needs minerals, anomalies, and ruins generation.
            PlanetaryRuins = new Ruins();

            PlanetaryTectonics = Tectonics.Dead;

            /// <summary>
            /// Default mineral amount is zero.
            /// do mineral generation elsewhere.
            /// </summary>
            m_aiMinerialReserves      = new float[Constants.Minerals.NO_OF_MINERIALS];
            m_aiMinerialAccessibility = new float[Constants.Minerals.NO_OF_MINERIALS];
            for (int mineralIterator = 0; mineralIterator < (int)Constants.Minerals.MinerialNames.MinerialCount; mineralIterator++)
            {
                m_aiMinerialReserves[mineralIterator]      = 0.0f;
                m_aiMinerialAccessibility[mineralIterator] = 0.0f;
            }
        }
Beispiel #3
0
        public SystemBody(OrbitingEntity parent, PlanetType type)
            : base()
        {
            /// <summary>
            /// create these or else anything that relies on a unique global id will break.
            /// </summary>
            Id = Guid.NewGuid();

            Type = type; // set the type ASAP in case anthing needs to know it.

            Moons = new BindingList<SystemBody>();
            Populations = new BindingList<Population>();

            SSEntity = StarSystemEntityType.Body;

            Parent = parent;
            Position = parent.Position;

            TaskGroupsInOrbit = new BindingList<TaskGroupTN>();

            GeoSurveyList = new Dictionary<Faction, bool>();

            /// <summary>
            /// Default mineral amount is zero.
            /// do mineral generation elsewhere.
            /// </summary>
            m_aiMinerialReserves = new float[Constants.Minerals.NO_OF_MINERIALS];
            m_aiMinerialAccessibility = new float[Constants.Minerals.NO_OF_MINERIALS];
            for (int mineralIterator = 0; mineralIterator < (int)Constants.Minerals.MinerialNames.MinerialCount; mineralIterator++)
            {
                m_aiMinerialReserves[mineralIterator] = 0.0f;
                m_aiMinerialAccessibility[mineralIterator] = 0.0f;
            }

#warning planet generation needs minerals, anomalies, and ruins generation.
            PlanetaryRuins = new Ruins();


            Atmosphere = new Atmosphere(this);
        }