public override void TakeSettingData(StationBase oldStationData)
        {
            TradeStation loadedData   = (TradeStation)oldStationData;
            List <Item>  currentGoods = _goods;

            _goods = loadedData._goods;

            foreach (Item nowItem in Goods)
            {
                foreach (Item beforeItem in currentGoods)
                {
                    if (nowItem.SerializedDefinition != beforeItem.SerializedDefinition)
                    {
                        continue;
                    }

                    nowItem.CurrentCargo = beforeItem.CurrentCargo;

                    break; // first out
                }
            }

            ProduceFrom = loadedData.ProduceFrom;
            ReduceFrom  = loadedData.ReduceFrom;
        }
        public override void TakeSettingData(StationBase oldStationData)
        {
            FactoryStation loadedData = oldStationData as FactoryStation;

            if (loadedData != null)
            {
                if (loadedData.Credits.SerializedDefinition != Credits.SerializedDefinition)
                {
                    loadedData.Credits.CurrentCargo = Credits.CurrentCargo;
                    Credits = loadedData.Credits;
                }

                SynchronizeRecipes(loadedData.Recipes);
            }

            RefreshStock();
        }
Пример #3
0
 public abstract void TakeSettingData(StationBase oldStationData);