Beispiel #1
0
        public DifficultySetting(DifficultySetting original)
        {
            SkillAI     = original.SkillAI;
            PrecisionAI = original.PrecisionAI;

            DifficultyItems = new List <DifficultyItem>(original.DifficultyItems);
        }
Beispiel #2
0
        /// <summary>
        /// Get difficulty flags string. Formatted for A2 or A3
        /// </summary>
        /// <param name="diff">The difficulty settings object that contains the items</param>
        /// <param name="game">If this is "a3" special Arma3 settings will be added </param>
        /// <returns></returns>
        private static string GetProfileOptions(DifficultySetting diff, string game)
        {
            var profileOptions = "";

            profileOptions += "\t\tclass Options" + NewLine() + "\t\t{" + NewLine();
            foreach (var diffItem in diff.DifficultyItems)
            {
                if (diffItem.Name.Contains("(A3)") && game != "a3")
                {
                    continue;
                }
                profileOptions += "\t\t\t" + diffItem.GetConfigString() + NewLine();
            }
            profileOptions += "\t\t};" + NewLine();

            return(profileOptions);
        }
Beispiel #3
0
        private static string GetProfileSkills(DifficultySetting difficultySetting)
        {
            var profileSkills = "";

            profileSkills +=
                "\t\taiLevelPreset=" +
                difficultySetting.AILevelPreset.ToString(CultureInfo.InvariantCulture) +
                ";" + NewLine() + NewLine() +
                "\t\tclass CustomAILevel" + NewLine() +
                "\t\t{" + NewLine() +
                "\t\t\tskillAI=" + difficultySetting.SkillAI.ToString(CultureInfo.InvariantCulture) + ";" + NewLine() +
                "\t\t\tprecisionAI=" + difficultySetting.PrecisionAI.ToString(CultureInfo.InvariantCulture) + ";" +
                NewLine() +
                "\t\t};" + NewLine();

            return(profileSkills);
        }