Пример #1
0
        /// <summary>
        /// Returns a deep copy of the instance
        /// </summary>
        /// <returns></returns>
        public VesselHealthInfo Clone()
        {
            VesselHealthInfo vhi = (VesselHealthInfo)this.MemberwiseClone();

            vhi.BonusSums       = new Dictionary <string, double>(BonusSums);
            vhi.FreeMultipliers = new Dictionary <string, double>(FreeMultipliers);
            vhi.MinMultipliers  = new Dictionary <string, double>(MinMultipliers);
            vhi.MaxMultipliers  = new Dictionary <string, double>(MaxMultipliers);
            return(vhi);
        }
Пример #2
0
 public override double ChangePerDay(ProtoCrewMember pcm) => ((Core.IsInEditor && !IsEnabledInEditor()) || Core.KerbalHealthList.Find(pcm).IsOnEVA) ? 0 : BaseChangePerDay *Core.GetCrewCount(pcm) / Math.Max(VesselHealthInfo.GetVesselInfo(pcm).Space, 0.1);