public static void Convert(Structure farmStructure, StructureInfo oldFarmStructure) { if (oldFarmStructure == null) { return; } farmStructure.Coordinates = oldFarmStructure.coordinates; farmStructure.PointOfInteraction = oldFarmStructure.pointOfInteraction; }
public static void Convert(CustomFarm farm, CustomFarmVer1 oldFarm) { farm.ID = oldFarm.ID; farm.Name = oldFarm.Name; farm.Description = oldFarm.Description; farm.Folder = oldFarm.Folder; farm.Icon = oldFarm.Icon; farm.Version = oldFarm.version; farm.CabinCapacity = oldFarm.cabinCapacity; farm.AllowClose = oldFarm.allowClose; farm.AllowSeperate = oldFarm.allowSeperate; farm.FarmMap = new MapFile(oldFarm.farmMapFile, "Farm", "Farm", oldFarm.farmMapType); farm.AdditionalMaps = new List <MapFile>(); additionalMap.Convert(farm, oldFarm); farm.FarmHouse = new Structure(); StructureInfo.Convert(farm.FarmHouse, oldFarm.farmHouse); farm.GreenHouse = new Structure(); StructureInfo.Convert(farm.GreenHouse, oldFarm.greenHouse); farm.FarmCave = new Structure(); StructureInfo.Convert(farm.FarmCave, oldFarm.farmCave); farm.ShippingBin = new Structure(); StructureInfo.Convert(farm.ShippingBin, oldFarm.shippingBin); farm.MailBox = new Structure(); StructureInfo.Convert(farm.MailBox, oldFarm.mailBox); farm.GrandpaShrine = new Structure(); StructureInfo.Convert(farm.GrandpaShrine, oldFarm.grandpaShrine); farm.RabbitShrine = new Structure(); StructureInfo.Convert(farm.RabbitShrine, oldFarm.rabbitStatue); farm.PetWaterBowl = new Structure(); StructureInfo.Convert(farm.PetWaterBowl, oldFarm.petWaterBowl); farm.Neighbors = new List <Neighbor>(); farm.Neighbors = oldFarm.neighboringMaps; farm.Overrides = new List <MapFile>(); overrideMap.Convert(farm, oldFarm); resourceSpawns.Convert(farm, oldFarm); //forageSpawns.Convert(farm, oldFarm); farm.SpawnMonstersAtNight = oldFarm.spawnMonstersAtNight; farm.FurnitureList = oldFarm.furnitureList; farm.FurnitureLayoutFromCanon = oldFarm.furnitureLayoutFromCanon; farm.ObjectList = oldFarm.objectList; }