예제 #1
0
        public static string DupeSpawnerCheck(ArrayList SpawnerList, string Messages)
        {
            int numDuped = 0;

            foreach (MegaSpawner fromCompare in SpawnerList)
            {
                ArrayList CompareList = MC.CompileSameLocationList(fromCompare);

                foreach (MegaSpawner toCompare in CompareList)
                {
                    numDuped += MC.SpawnerCompare(fromCompare, toCompare, true);
                }
            }

            if (numDuped > 0)
            {
                Messages = String.Format("{0} There {1} {2} duped spawner{3} detected and removed.", Messages, numDuped == 1 ? "was" : "were", numDuped, numDuped == 1 ? "" : "s");
            }
            else
            {
                Messages = String.Format("{0} There were no duped spawners detected.", Messages);
            }

            return(Messages);
        }