Ejemplo n.º 1
0
 public BodyScanAtmosphere(XScanAtmosphere scan, int id = 0)
 {
     Id = id;
     SurfacePressure         = scan.SurfacePressure;
     AtmosphereId            = scan.AtmosphereId;
     AtmosphereTypeId        = scan.AtmosphereTypeId == 0 ? (byte?)null : scan.AtmosphereTypeId;
     AtmosphereHot           = scan.Flags.HasFlag(XScanAtmosphere.ScanFlags.AtmosphereHot);
     AtmosphereThin          = scan.Flags.HasFlag(XScanAtmosphere.ScanFlags.AtmosphereThin);
     AtmosphereThick         = scan.Flags.HasFlag(XScanAtmosphere.ScanFlags.AtmosphereThick);
     AtmosphereComponent1Id  = scan.Component1Id == 0 ? (byte?)null : scan.Component1Id;
     AtmosphereComponent1Amt = scan.Component1Amt;
     AtmosphereComponent2Id  = scan.Component2Id == 0 ? (byte?)null : scan.Component2Id;
     AtmosphereComponent2Amt = scan.Component2Amt;
     AtmosphereComponent3Id  = scan.Component3Id == 0 ? (byte?)null : scan.Component3Id;
     AtmosphereComponent3Amt = scan.Component3Amt;
 }
Ejemplo n.º 2
0
 public bool Equals(XScanAtmosphere scan)
 {
     return(this.SurfacePressure == scan.SurfacePressure &&
            this.Atmosphere == scan.Atmosphere &&
            this.AtmosphereHot == scan.Flags.HasFlag(XScanAtmosphere.ScanFlags.AtmosphereHot) &&
            this.AtmosphereThin == scan.Flags.HasFlag(XScanAtmosphere.ScanFlags.AtmosphereThin) &&
            this.AtmosphereThick == scan.Flags.HasFlag(XScanAtmosphere.ScanFlags.AtmosphereThick) &&
            (this.AtmosphereTypeId == null || scan.AtmosphereType == null || this.AtmosphereType == scan.AtmosphereType) &&
            (this.AtmosphereComponent1Id == null || scan.Component1Id == 0 || (
                 this.AtmosphereComponent1 == scan.Component1Name &&
                 this.AtmosphereComponent1Amt == scan.Component1Amt &&
                 this.AtmosphereComponent2 == scan.Component2Name &&
                 this.AtmosphereComponent2Amt == scan.Component2Amt &&
                 this.AtmosphereComponent3 == scan.Component3Name &&
                 this.AtmosphereComponent3Amt == scan.Component3Amt
                 )));
 }