public SerializableChestLocation(DeliveryChest chest) { if (chest == null || chest.Location == null) { return; } if (chest.Location.Location != null) { Location = chest.Location.Location.NameOrUniqueName; } X = (int)chest.Location.TileLocation.X; Y = (int)chest.Location.TileLocation.Y; isFridge = chest.IsFridge(); }
public SaveDataModel(DeliveryChest chest) : base(chest) { MatchColor = chest.DeliveryOptions.MatchColor; foreach (DeliveryCategories cat in Enum.GetValues(typeof(DeliveryCategories))) { if (chest.DeliveryOptions.Send[(int)cat] > 0) { Send.Add(cat.ToString() + ":" + chest.DeliveryOptions.Send[(int)cat].ToString()); } if (chest.DeliveryOptions.Receive[(int)cat] > 0) { Receive.Add(cat.ToString() + ":" + chest.DeliveryOptions.Receive[(int)cat].ToString()); } } }
public SyncDataModel(DeliveryChest chest) : base(chest) { this.DeliveryOptions = chest.DeliveryOptions; }