Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PlanetaryLink"/> class.
 /// </summary>
 /// <param name="colony">The colony.</param>
 /// <param name="src">The source.</param>
 internal PlanetaryLink(PlanetaryColony colony, EsiPlanetaryLink src)
 {
     Colony           = colony;
     SourcePinID      = src.SourcePinID;
     DestinationPinID = src.DestinationPinID;
     LinkLevel        = src.LinkLevel;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PlanetaryRoute"/> class.
 /// </summary>
 /// <param name="colony">The colony.</param>
 /// <param name="src">The source.</param>
 internal PlanetaryRoute(PlanetaryColony colony, EsiPlanetaryRoute src)
 {
     Colony           = colony;
     ID               = src.RouteID;
     SourcePinID      = src.SourcePinID;
     DestinationPinID = src.DestinationPinID;
 }
Beispiel #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PlanetaryPin"/> class.
        /// </summary>
        /// <param name="colony">The colony.</param>
        /// <param name="src">The source.</param>
        internal PlanetaryPin(PlanetaryColony colony, EsiPlanetaryPin src)
        {
            var type      = StaticItems.GetItemByID(src.TypeID);
            var extractor = src.ExtractorDetails;
            var contents  = src.Contents;

            type.ThrowIfNull(nameof(type));

            Colony        = colony;
            ID            = src.PinID;
            TypeID        = src.TypeID;
            TypeName      = type.Name;
            SchematicID   = src.SchematicID;
            InstallTime   = src.InstallTime;
            ExpiryTime    = src.ExpiryTime;
            State         = GetState();
            ContentVolume = GetVolume();

            if (extractor != null)
            {
                CycleTime        = (short)extractor.CycleTime;
                QuantityPerCycle = extractor.QuantityPerCycle;
            }

            // Old EVEMon could only handle one item in contents
            if (contents != null && contents.Count > 0)
            {
                var firstItem = contents[0];
                int typeID    = firstItem.TypeID;
                ContentQuantity = firstItem.Amount;
                ContentTypeID   = typeID;
                ContentTypeName = StaticItems.GetItemName(typeID);
            }
            else
            {
                ContentQuantity = 0;
                ContentTypeID   = 0;
                ContentTypeName = string.Empty;
            }
            LastLaunchTime = src.LastCycleStart;

            GroupName = type.GroupName;
        }
Beispiel #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PlanetaryPin"/> class.
        /// </summary>
        /// <param name="colony">The colony.</param>
        /// <param name="src">The source.</param>
        internal PlanetaryPin(PlanetaryColony colony, SerializablePlanetaryPin src)
        {
            Colony           = colony;
            ID               = src.PinID;
            TypeID           = src.TypeID;
            TypeName         = GetPinName(src.TypeName);
            SchematicID      = src.SchematicID;
            CycleTime        = src.CycleTime;
            QuantityPerCycle = src.QuantityPerCycle;
            ContentQuantity  = src.ContentQuantity;
            ContentTypeID    = src.ContentTypeID;
            ContentTypeName  = src.ContentTypeName;
            LastLaunchTime   = src.LastLaunchTime;
            InstallTime      = src.InstallTime;
            ExpiryTime       = src.ExpiryTime;
            State            = GetState();
            ContentVolume    = GetVolume();

            GroupName = StaticItems.GetItemByID(src.TypeID).GroupName;
        }