Exemplo n.º 1
0
            public void findtech(string matchStr)
            {
                var matched = techtypeCache.find(matchStr);

                L10n.str("ids_findEntries").format(matched.Count).onScreen();
                showMessages(matched, L10n.str("ids_techType"));
            }
        // used for last string from console text
        static string tryCompleteString(string str, StringCache stringCache)
        {
            var matched = stringCache.findByPrefix(str);

            if (matched.Count > 1)
            {
                showMessages(matched, L10n.str("ids_matched"));
            }

            return(getCommonPrefix(matched, str));
        }
            void OnConsoleCommand_findtech(NotificationCenter.Notification n)
            {
                if (n.getArgCount() == 0)
                {
                    return;
                }

                var matched = techtypeCache.find(n.getArg(0));

                L10n.str("ids_findEntries").format(matched.Count).onScreen();
                showMessages(matched, L10n.str("ids_techType"));
            }
        static void showMessages(List <string> msgs, string msg)
        {
            int maxCount = ErrorMessageSettings.getSlotCount(true);

            if (Main.config.maxListSize > 0)
            {
                maxCount = Math.Min(maxCount, Main.config.maxListSize);
            }

            if (msgs.Count > maxCount)
            {
                L10n.str("ids_listTooLarge").format(msgs.Count, maxCount - 1).onScreen();
            }

            msgs.onScreen(msg, maxCount - 1);
        }
Exemplo n.º 5
0
 public void action() => L10n.str("ids_loremIpsum").format(index++).onScreen();