<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using Pulsar4X.Helpers;

namespace Pulsar4X.Entities
{
    
    /// <summary>
    /// The Atmosphere of a Planet or Moon.
    /// @todo Make this a generic component.
    /// @todo Add a ToString overload which will retunr a string like this: 
    /// "75% Nitrogen (N), 21% Oxygen (O), 3% Carbon dioxide (CO2), 1% Argon (Ar)"
    /// </summary>
    public class Atmosphere
    {
        /// <summary>
        /// Atmospheric Presure
        /// In Earth Atmospheres (atm).
        /// </summary>
        public float Pressure { get; set; }
        
        /// <summary>
        /// Weather or not the planet has abundent water.
        /// </summary>
        public bool Hydrosphere { get; set; }

        /// <summary>
        /// The percentage of the bodies sureface covered by water.
        /// </summary>
        public short HydrosphereExtent { get; set; }

        /// <summary>
        /// A measure of the greenhouse factor provided by this Atmosphere.
        /// </summary>
        public float GreenhouseFactor { get; set; }

        /// <summary>
        /// How much light the body reflects. Affects temp.
        /// a number from 0 to 1.
        /// </summary>
        public float Albedo { get; set; }

        /// <summary>
        /// Temperature of the planet AFTER greenhouse effects are taken into considuration. 
        /// This is a factor of the base temp and Green House effects.
        /// In Degrees C.
        /// </summary>
        public float SurfaceTemperature { get; set; }

        private Dictionary<AtmosphericGas, float> _composition = new Dictionary<AtmosphericGas, float>();
        /// <summary>
        /// The composition of the atmosphere, i.e. what gases make it up and in what ammounts.
        /// In Earth Atmospheres (atm).
        /// </summary>
        public Dictionary<AtmosphericGas, float> Composition { get { return _composition; } }

        private string _atmosphereDescriptionInPercent = "";
        /// <summary>
        /// A sting describing the Atmosphere in Percentages, like this:
        /// "75% Nitrogen (N), 21% Oxygen (O), 3% Carbon dioxide (CO2), 1% Argon (Ar)"
        /// By Default ToString return this.
        /// </summary>
        public string AtomsphereDescriptionInPercent
        {
            get { return _atmosphereDescriptionInPercent; }
        }

        private string _atmosphereDescriptionInATM = "";
        /// <summary>
        /// A sting describing the Atmosphere in Atmospheres (atm), like this:
        /// "0.75atm Nitrogen (N), 0.21atm Oxygen (O), 0.03atm Carbon dioxide (CO2), 0.01atm Argon (Ar)"
        /// </summary>
        public string AtomsphereDescriptionATM
        {
            get { return _atmosphereDescriptionInATM; }
        }

        /// <summary>
        /// Returns true if The atmosphere exists (i.e. there are any gases in it), else it return false.
        /// </summary>
        public bool Exists 
        {
            get
            {
                if (_composition.Count > 0)
                    return true;

                return false;
            } 
        }

        public bool CanModify
        {
            get
            {
                if (ParentBody.Type == Planet.PlanetType.Terrestrial
                    || ParentBody.Type == Planet.PlanetType.Moon)
                    return true;  // only these bodies have atmospheres that can be terraformed.

                return false;
            }
        }

        private Planet _parentBody;

        /// <summary>
        /// The body this atmosphere belong to.
        /// </summary>
        public Planet ParentBody { get { return _parentBody; } }

        public Atmosphere(Planet parentBody)
        {
            _parentBody = parentBody;
        }
<commit_msg>Mage Atmosphere inherit from GameEntity<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using Pulsar4X.Helpers;

namespace Pulsar4X.Entities
{
    
    /// <summary>
    /// The Atmosphere of a Planet or Moon.
    /// </summary>
    public class Atmosphere : GameEntity
    {
        /// <summary>
        /// Atmospheric Presure
        /// In Earth Atmospheres (atm).
        /// </summary>
        public float Pressure { get; set; }
        
        /// <summary>
        /// Weather or not the planet has abundent water.
        /// </summary>
        public bool Hydrosphere { get; set; }

        /// <summary>
        /// The percentage of the bodies sureface covered by water.
        /// </summary>
        public short HydrosphereExtent { get; set; }

        /// <summary>
        /// A measure of the greenhouse factor provided by this Atmosphere.
        /// </summary>
        public float GreenhouseFactor { get; set; }

        /// <summary>
        /// How much light the body reflects. Affects temp.
        /// a number from 0 to 1.
        /// </summary>
        public float Albedo { get; set; }

        /// <summary>
        /// Temperature of the planet AFTER greenhouse effects are taken into considuration. 
        /// This is a factor of the base temp and Green House effects.
        /// In Degrees C.
        /// </summary>
        public float SurfaceTemperature { get; set; }

        private Dictionary<AtmosphericGas, float> _composition = new Dictionary<AtmosphericGas, float>();
        /// <summary>
        /// The composition of the atmosphere, i.e. what gases make it up and in what ammounts.
        /// In Earth Atmospheres (atm).
        /// </summary>
        public Dictionary<AtmosphericGas, float> Composition { get { return _composition; } }

        private string _atmosphereDescriptionInPercent = "";
        /// <summary>
        /// A sting describing the Atmosphere in Percentages, like this:
        /// "75% Nitrogen (N), 21% Oxygen (O), 3% Carbon dioxide (CO2), 1% Argon (Ar)"
        /// By Default ToString return this.
        /// </summary>
        public string AtomsphereDescriptionInPercent
        {
            get { return _atmosphereDescriptionInPercent; }
        }

        private string _atmosphereDescriptionInATM = "";
        /// <summary>
        /// A sting describing the Atmosphere in Atmospheres (atm), like this:
        /// "0.75atm Nitrogen (N), 0.21atm Oxygen (O), 0.03atm Carbon dioxide (CO2), 0.01atm Argon (Ar)"
        /// </summary>
        public string AtomsphereDescriptionATM
        {
            get { return _atmosphereDescriptionInATM; }
        }

        /// <summary>
        /// Returns true if The atmosphere exists (i.e. there are any gases in it), else it return false.
        /// </summary>
        public bool Exists 
        {
            get
            {
                if (_composition.Count > 0)
                    return true;

                return false;
            } 
        }

        public bool CanModify
        {
            get
            {
                if (ParentBody.Type == Planet.PlanetType.Terrestrial
                    || ParentBody.Type == Planet.PlanetType.Moon)
                    return true;  // only these bodies have atmospheres that can be terraformed.

                return false;
            }
        }

        private Planet _parentBody;
        /// <summary>
        /// The body this atmosphere belong to.
        /// </summary>
        public Planet ParentBody { get { return _parentBody; } }


        /// <summary>
        /// Atmosphere Constructor
        /// </summary>
        public Atmosphere(Planet parentBody)
            : base()
        {
            _parentBody = parentBody;
        }

        public override string ToString()
        {
            return _atmosphereDescriptionInPercent;
        }

{'fraction_non_alphanumeric': 0.10447951132603715, 'fraction_numerical': 0.007253754135912446, 'mean_word_length': 1.5971579643093192, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2764481', 'n_tokens_mistral': 2196, 'n_tokens_neox': 2027, 'n_words': 691}