public override void Entry(IModHelper helper)
        {
            endPoints = new Dictionary <string, Amazon.RegionEndpoint>()
            {
                { "USA", Amazon.RegionEndpoint.USEast1 },
                { "UK", Amazon.RegionEndpoint.EUWest2 },
                { "Germany", Amazon.RegionEndpoint.EUCentral1 },
                { "Canada", Amazon.RegionEndpoint.CACentral1 },
                { "Japan", Amazon.RegionEndpoint.APNortheast1 }
            };

            _helper   = helper;
            _manifest = ModManifest;


            try
            {
                config = Helper.ReadConfig <ModConfig>();
            }
            catch
            {
                config = new ModConfig();
                Helper.WriteConfig(config);
            }
            activeEndpoint = endPoints[config.Server];
            screenGraber   = new Screengraber();
            Helper.Events.GameLoop.OneSecondUpdateTicked += GameLoop_OneSecondUpdateTicked;

            helper.ConsoleCommands.Add("tts_update", "Updates new NPCs", (s, p) => setUpNPCConfig());

            Helper.WriteConfig <ModConfig>(config);

            helper.Events.GameLoop.SaveLoaded      += OnSaveLoaded;
            helper.Events.GameLoop.ReturnedToTitle += OnReturnedToTitle;

            helper.Events.Input.ButtonPressed += Input_ButtonPressed;

            neural.AddRange(new string[] {
                "Kevin", "Olivia",
            });

            neuralReplacements = new Dictionary <string, string>()
            {
                { "Kevin", "Justin" }, { "Olivia", "Nicole" }
            };

            news.AddRange(new string[] {
                "Matthew", "Joanna", "Lupe", "Amy"
            });

            voices.Add(LocalizedContentManager.LanguageCode.de, (new List <string>()
            {
                "Marlene", "Vicki", "Hans"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.en, (new List <string>()
            {
                "Brian", "Amy", "Joey", "Emma", "Nicole", "Olivia", "Justin", "Russell", "Joanna", "Matthew", "Kevin", "Kendra", "Salli", "Kimberly", "Geraint", "Ivy", "Raveena", "Aditi"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.es, (new List <string>()
            {
                "Lucia", "Conchita", "Enrique",
                "Mia",
                "Penelope", "Lupe", "Miguel",
                "Vitoria", "Camila", "Ricardo", "Cristiano", "Ines",
                "Bianca", "Carla", "Giorgio"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.pt, (new List <string>()
            {
                "Lucia", "Conchita", "Enrique",
                "Mia",
                "Penelope", "Lupe", "Miguel",
                "Vitoria", "Camila", "Ricardo", "Cristiano", "Ines"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.fr, (new List <string>()
            {
                "Celine", "Lea", "Mathieu", "Chantal"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.it, (new List <string>()
            {
                "Bianca", "Carla", "Giorgio",
                "Mia",
                "Penelope", "Lupe", "Miguel",
                "Lucia", "Conchita", "Enrique"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.ja, (new List <string>()
            {
                "Mizuki", "Takumi"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.ko, (new List <string>()
            {
                "Seoyeon"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.ru, (new List <string>()
            {
                "Tatyana", "Maxim"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.tr, (new List <string>()
            {
                "Filiz"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.zh, (new List <string>()
            {
                "Zhiyu"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.hu, new List <string>());


            voices.Add(LocalizedContentManager.LanguageCode.th, new List <string>());


            others.AddRange(typeof(VoiceId).GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static).Select(f => f.Name).Where(v => !voices.Any(vc => vc.Value.Contains(v))));
        }
예제 #2
0
        public override void Entry(IModHelper helper)
        {
            _helper   = helper;
            _manifest = ModManifest;
            config    = Helper.ReadConfig <ModConfig>();

            Helper.Events.GameLoop.OneSecondUpdateTicked += GameLoop_OneSecondUpdateTicked;

            helper.ConsoleCommands.Add("tts_update", "Updates new NPCs", (s, p) => setUpNPCConfig());

            Helper.WriteConfig <ModConfig>(config);
            string tmppath = Path.Combine(Path.Combine(Environment.CurrentDirectory, "Content"), "TTS");

            if (Directory.Exists(Path.Combine(Helper.DirectoryPath, "TTS")))
            {
                if (!Directory.Exists(tmppath))
                {
                    Directory.CreateDirectory(tmppath);
                }
            }

            helper.Events.GameLoop.SaveLoaded      += OnSaveLoaded;
            helper.Events.GameLoop.ReturnedToTitle += OnReturnedToTitle;

            voices.Add(LocalizedContentManager.LanguageCode.de, (new List <string>()
            {
                "Marlene", "Vicki", "Hans"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.en, (new List <string>()
            {
                "Brian", "Amy", "Joey", "Emma", "Nicole", "Justin", "Russell", "Matthew", "Kendra", "Salli", "Kimberly", "Geraint", "Ivy", "Raveena", "Aditi"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.es, (new List <string>()
            {
                "Lucia", "Conchita", "Enrique",
                "Mia",
                "Penelope", "Lupe", "Miguel",
                "Vitoria", "Camila", "Ricardo", "Cristiano", "Ines",
                "Bianca", "Carla", "Giorgio"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.pt, (new List <string>()
            {
                "Lucia", "Conchita", "Enrique",
                "Mia",
                "Penelope", "Lupe", "Miguel",
                "Vitoria", "Camila", "Ricardo", "Cristiano", "Ines"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.fr, (new List <string>()
            {
                "Celine", "Lea", "Mathieu", "Chantal"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.it, (new List <string>()
            {
                "Bianca", "Carla", "Giorgio",
                "Mia",
                "Penelope", "Lupe", "Miguel",
                "Lucia", "Conchita", "Enrique"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.ja, (new List <string>()
            {
                "Mizuki", "Takumi"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.ko, (new List <string>()
            {
                "Seoyeon"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.ru, (new List <string>()
            {
                "Tatyana", "Maxim"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.tr, (new List <string>()
            {
                "Filiz"
            }).OrderBy(v => v).ToList());

            voices.Add(LocalizedContentManager.LanguageCode.zh, (new List <string>()
            {
                "Zhiyu"
            }).OrderBy(v => v).ToList());
        }