예제 #1
0
 public static void Convert(CustomFarm farm, CustomFarmVer1 oldFarm)
 {
     foreach (overrideMap om in oldFarm.overrideMaps)
     {
         farm.Overrides.Add(new MapFile(om.FileName, om.Location, om.type));
     }
 }
예제 #2
0
 public static void Convert(CustomFarm farm, CustomFarmVer1 oldFarm)
 {
     foreach (additionalMap am in oldFarm.additionalMaps)
     {
         farm.AdditionalMaps.Add(new MapFile(am.FileName, am.mapType, am.Location));
     }
 }
예제 #3
0
        public static void Convert(CustomFarm farm, CustomFarmVer1 oldFarm)
        {
            LargeDebris largeDebris = new LargeDebris();

            largeDebris.ResourceList = new List <Spawn>();

            foreach (resourceSpawns rs in oldFarm.Resource)
            {
                Spawn item = new Spawn();
                if (rs.itemId == 0)
                {
                    if (rs.itemName == "Stump")
                    {
                        item.ItemId = 600;
                    }
                    else if (rs.itemName == "Log")
                    {
                        item.ItemId = 602;
                    }
                    else if (rs.itemName == "Boulder")
                    {
                        item.ItemId = 672;
                    }
                    else
                    {
                        continue;
                    }
                }
                else if (rs.itemId == 600 || rs.itemId == 602 || rs.itemId == 672)
                {
                    item.ItemId = rs.itemId;
                }
                else
                {
                    continue;
                }

                item.Seasons          = rs.SeasonsToSpawn;
                item.Boundary         = rs.SpawnType;
                item.AreaBinding      = rs.area;
                item.TileBinding      = rs.TileIndex;
                item.Chance           = rs.chance;
                item.RainModifier     = new Modifier(rs.rainAddition, rs.rainMultipler);
                item.NewMonthModifier = new Modifier(rs.newMonthAddition, rs.newMonthMultipler);
                item.NewYearModifier  = new Modifier(rs.newYearAddition, rs.newYearMultipler);
                item.AmountMin        = rs.minimumAmount;
                item.AmountMax        = rs.maximumAmount;
                item.CooldownMin      = rs.minCooldown;
                item.CooldownMax      = rs.maxCooldown;
                item.DaysLeft         = rs.daysTilNextSpawn;

                largeDebris.ResourceList.Add(item);
            }
            farm.ResourceClumps = largeDebris;
        }
예제 #4
0
        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;
        }