예제 #1
0
        internal static Dictionary <string, string> LoadLocalizationText(TextReader reader, Dictionary <string, string> dict, bool overwrite = false, string default_namespace = null)
        {
            StringTableManager.StringCollection last_coll = null;
            string last_id = null;

            LoadLocalizationTextGeneral(reader, (id) => dict.ContainsKey(id), (id, coll) => {
                if (last_coll != null)
                {
                    var str = last_coll.GetExactString(0);
                    if (last_coll.Count() > 1)
                    {
                        Logger.Warn($"Randomized localizations are not supported by DF localization. Only the first option ('{str}') will be used.");
                    }
                    dict[last_id] = str;
                }
                last_id   = id;
                last_coll = coll;
            }, overwrite, default_namespace);

            if (last_id != null)
            {
                dict[last_id] = last_coll.GetExactString(0);
                if (last_coll.Count() > 1)
                {
                    Logger.Warn($"Randomized localizations are not supported by DF localization. Only the first option ('{dict[last_id]}') will be used.");
                }
            }

            return(dict);
        }
예제 #2
0
 public void LogWarning(string tag, object message)
 {
     GungeonLogger.Warn(_FormatMessage(message, tag: tag));
 }