コード例 #1
0
        public static void Initialize()
        {
            Current = new ConfigManager();

            if (MTFOUtil.IsLoaded && MTFOUtil.HasCustomContent)
            {
                try
                {
                    BasePath = Path.Combine(MTFOUtil.CustomPath, "ExtraEnemyCustomization");

                    Logger.Debug("Loading Model.json...");
                    if (TryLoadConfig(BasePath, "Model.json", out ModelCustomConfig modelConfig))
                    {
                        Current.ModelCustom = modelConfig;
                    }

                    Logger.Debug("Loading Ability.json...");
                    if (TryLoadConfig(BasePath, "Ability.json", out AbilityCustomConfig abilityConfig))
                    {
                        Current.AbilityCustom = abilityConfig;
                    }

                    Logger.Debug("Loading Projectile.json...");
                    if (TryLoadConfig(BasePath, "Projectile.json", out ProjectileCustomConfig projConfig))
                    {
                        Current.ProjectileCustom = projConfig;
                    }

                    Logger.Debug("Loading Tentacle.json...");
                    if (TryLoadConfig(BasePath, "Tentacle.json", out TentacleCustomConfig tentacleConfig))
                    {
                        Current.TentacleCustom = tentacleConfig;
                    }

                    Logger.Debug("Loading Detection.json...");
                    if (TryLoadConfig(BasePath, "Detection.json", out DetectionCustomConfig detectionConfig))
                    {
                        Current.DetectionCustom = detectionConfig;
                    }

                    Logger.Debug("Loading ScoutWave.json");
                    if (TryLoadConfig(BasePath, "ScoutWave.json", out ScoutWaveConfig scoutWaveConfig))
                    {
                        CustomScoutWaveManager.AddScoutSetting(scoutWaveConfig.Expeditions);
                        CustomScoutWaveManager.AddTargetSetting(scoutWaveConfig.TargetSettings);
                        CustomScoutWaveManager.AddWaveSetting(scoutWaveConfig.WaveSettings);
                    }
                }
                catch (Exception e)
                {
                    Logger.Error($"Error Occured While reading ExtraEnemyCustomization.json file: {e}");
                }
            }
            else
            {
                Logger.Warning("No Custom content were found, No Customization will be applied");
            }

            Current.GenerateBuffer();
        }
コード例 #2
0
 private static void Postfix(ES_ScoutScream __instance)
 {
     if (__instance.m_state == ES_ScoutScream.ScoutScreamState.Done)
     {
         if (__instance.m_stateDoneTimer >= 0.0f)
         {
             __instance.m_stateDoneTimer = -1.0f;
             if (SNet.IsMaster)
             {
                 CustomScoutWaveManager.TriggerScoutWave(__instance.m_enemyAgent);
             }
         }
     }
 }