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();
 }
예제 #2
0
 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());
         }
     }
 }
예제 #3
0
 public SyncDataModel(DeliveryChest chest) : base(chest)
 {
     this.DeliveryOptions = chest.DeliveryOptions;
 }