public override List <CompareResult> GetDifferingProps(XScanClass scandata, List <CompareResult> diffs) { XModels.XScanPlanet pscan = scandata.Planet; base.GetDifferingProps(scandata, diffs); CompareResult.AddIfUnequal(diffs, this, "PlanetClassId", this.PlanetClassId, pscan.PlanetClassId); CompareResult.AddIfUnequal(diffs, this, "MassEM", this.MassEM, pscan.MassEM); CompareResult.AddIfUnequal(diffs, this, "SurfaceGravity", this.SurfaceGravity, pscan.SurfaceGravity); if (this.HasComposition && pscan.HasComposition) { CompareResult.AddIfUnequal(diffs, this, "CompositionMetal", this.CompositionMetal, pscan.CompositionMetal); CompareResult.AddIfUnequal(diffs, this, "CompositionRock", this.CompositionRock, pscan.CompositionRock); CompareResult.AddIfUnequal(diffs, this, "CompositionIce", this.CompositionIce, pscan.CompositionIce); } if (this.VolcanismId != null && pscan.VolcanismId != 0) { CompareResult.AddIfUnequal(diffs, this, "VolcanismId", this.VolcanismId, pscan.VolcanismId); CompareResult.AddIfUnequal(diffs, this, "VolcanismMajor", this.VolcanismMajor, pscan.VolcanismMajor); CompareResult.AddIfUnequal(diffs, this, "VolcanismMinor", this.VolcanismMinor, pscan.VolcanismMinor); } CompareResult.AddIfUnequal(diffs, this, "IsLandable", this.IsLandable, pscan.HasLandable ? (bool?)pscan.IsLandable : null); if (this.Atmosphere != null && pscan.HasAtmosphere) { this.Atmosphere.GetDifferingProps(scandata.Atmosphere, diffs, this); } if (this.Materials != null && pscan.HasMaterials) { this.Materials.GetDifferingProps(scandata.Materials, diffs, this); } return(diffs); }
public override List <CompareResult> GetDifferingProps(XScanClass scandata, List <CompareResult> diffs) { XModels.XScanStar sscan = scandata.Star; base.GetDifferingProps(scandata, diffs); CompareResult.AddIfUnequal(diffs, this, "AbsoluteMagnitude", this.AbsoluteMagnitude, sscan.AbsoluteMagnitude); CompareResult.AddIfUnequal(diffs, this, "StellarMass", this.StellarMass, sscan.StellarMass); CompareResult.AddIfUnequal(diffs, this, "Age_MY", this.Age_MY, sscan.Age_MY); CompareResult.AddIfUnequal(diffs, this, "StarTypeId", this.StarTypeId, sscan.StarTypeId); CompareResult.AddIfUnequal(diffs, this, "LuminosityId", this.LuminosityId, sscan.LuminosityId == 0 ? null : (byte?)sscan.LuminosityId); return(diffs); }