예제 #1
0
파일: Refinery.cs 프로젝트: andy-uq/Echo
        /// <summary>Unload raw ore from a ship</summary>
        /// <param name="ship"></param>
        /// <returns>True if ore was unloaded</returns>
        public bool UnloadOre(Ship ship)
        {
            AssertShipInRange(ship, "unload raw ore to this refinery");

            IItem ore = ship.RemoveCargo(Ore.OreID);
            if (ore != null)
            {
                UnrefinedOre += ore.Quantity;
                Universe.EventPump.RaiseEvent(ship, EventType.ShipCargo, "Unloaded {0:n0} raw ore to {1}", ore.Quantity, Name);

                return true;
            }

            return false;
        }
예제 #2
0
파일: Manufactory.cs 프로젝트: andy-uq/Echo
        /// <summary>Unload refined ore from a ship</summary>
        /// <param name="ship"></param>
        /// <returns>True if ore was unloaded</returns>
        public bool UnloadRefinedOre(Ship ship)
        {
            AssertShipInRange(ship, "unload refined ore to this manufactory");

            IItem ore = ship.RemoveCargo(RefinedOre.RefinedOreID);

            if (ore != null)
            {
                OreRemaining += ore.Quantity;

                Universe.EventPump.RaiseEvent(ship, EventType.ShipCargo, "Unloaded {0:n0} refined ore to {1}", ore.Quantity, Name);

                return true;
            }

            return false;
        }