Exemplo n.º 1
0
        static void Postfix(ref string __result)
        {
            int ct = 0;

            while (Patch_Cache.UsedRuinsNames.Contains(__result))
            {
                if (ct++ > 10)
                {
                    //In practice, I've never seen this take more than 2 attempts, but adding a short circuit just in case.
                    XRLCore.Log("QudUX: (Warning) Failed to find a suitable name for Ruins location after >10 attempts. Allowing duplicate name: " + __result);
                    break;
                }
                __result = Egcb_JournalUtilities.GenerateName();
            }
            Patch_Cache.UsedRuinsNames.Add(__result);
            //XRLCore.Log("NameRuinsSite result: " + __result);
        }
        public string DebugGetKnownLocationsList()
        {
            string retVal = String.Empty;
            List <JournalMapNote> mapNotes = JournalAPI.MapNotes;

            foreach (JournalMapNote jmn in mapNotes)
            {
                if (jmn.revealed) //player knows about it
                {
                    bool zoneWasVisited = (XRLCore.Core.Game.ZoneManager.CachedZones.ContainsKey(jmn.zoneid) ||
                                           Egcb_JournalUtilities.FrozenZoneDataExists(jmn.zoneid));
                    retVal += "\n  " + jmn.text + "  [visited? = " + zoneWasVisited + "]";
                    retVal += " [formatStripped = " + ConsoleLib.Console.ColorUtility.StripFormatting(jmn.text) + "]";
                }
            }
            return(retVal);
        }