コード例 #1
0
        // 获取所有据点的所有收获物
        public static void GetAllBooties()
        {
            AutoHarvest.InitializeBooties();

            foreach (var parts in DateFile.instance.homeShopBootysDate)
            {
                int partId = parts.Key;
                var places = parts.Value;
                foreach (var place in places)
                {
                    int placeId   = place.Key;
                    var buildings = place.Value;
                    foreach (var building in buildings)
                    {
                        int buildingIndex = building.Key;
                        var booties       = building.Value;
                        foreach (var booty in booties.ToArray())
                        {
                            bool gotBooty = AutoHarvest.GetBooty(partId, placeId, buildingIndex, booty);
                            if (gotBooty)
                            {
                                booties.Remove(booty);
                                AutoHarvest.RecordBooty(booty);
                            }
                        }
                    }
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// 获取所有据点的所有收获物
        /// </summary>
        public static void GetAllBooties()
        {
            AutoHarvest.InitializeBooties();

            foreach (var parts in DateFile.instance.homeShopBootysDate)
            {
                int partId = parts.Key;
                var places = parts.Value;
                foreach (var place in places)
                {
                    int placeId   = place.Key;
                    var buildings = place.Value;
                    foreach (var building in buildings)
                    {
                        int buildingIndex = building.Key;
                        var booties       = building.Value;
                        foreach (var booty in booties.ToArray())
                        {
                            bool gotBooty = AutoHarvest.GetBooty(partId, placeId, buildingIndex, booty);
                            if (gotBooty)
                            {
                                booties.Remove(booty);
                                AutoHarvest.RecordBooty(booty);
                            }
                        }
                    }
                }
            }

            AutoHarvest.RecordHarvestDetails();

            if (Main.settings.showNewActorWindow && AutoHarvest.harvestedActors.Count > 0)
            {
                GetActorWindow.instance.ShowGetActorWindow(AutoHarvest.harvestedActors, 0);
            }
        }