Пример #1
0
        public static void WriteParticles()
        {
            HTMLWriter.WriteHeader("ParticleSpawners");
            TypeWriter.WriteAll("WarriorsSnuggery.Objects.Particles", "ParticleSpawner", new[] { emptyTextNodes });

            HTMLWriter.WriteHeader("Particle");
            TypeWriter.Write(typeof(WarriorsSnuggery.Objects.Particles.ParticleType), new[] { emptyTextNodes });
        }
Пример #2
0
        public static void WriteActors()
        {
            TypeWriter.WriteAll("WarriorsSnuggery.Objects.Actors.Parts", "PartInfo", new object[] { new PartInitSet(string.Empty, emptyTextNodes) });

            HTMLWriter.WriteHeader("SimplePhysics");
            TypeWriter.Write(typeof(WarriorsSnuggery.Physics.SimplePhysicsType), new[] { emptyTextNodes });

            HTMLWriter.WriteHeader("BotBehaviors");
            TypeWriter.WriteAll("WarriorsSnuggery.Objects.Actors.Bot", "BotBehaviorType", new[] { emptyTextNodes });
        }
Пример #3
0
        public static void WriteSpells()
        {
            HTMLWriter.WriteHeader("SpellCaster");
            TypeWriter.Write(typeof(WarriorsSnuggery.Spells.SpellCasterType), new object[] { emptyTextNodes, "" });

            HTMLWriter.WriteHeader("Spell");
            TypeWriter.Write(typeof(WarriorsSnuggery.Spells.Spell), new[] { emptyTextNodes });

            HTMLWriter.WriteHeader("Effect");
            TypeWriter.Write(typeof(WarriorsSnuggery.Spells.Effect), new[] { emptyTextNodes });
        }
Пример #4
0
        public static void WriteWeapons()
        {
            HTMLWriter.WriteHeader("WeaponType");
            TypeWriter.Write(typeof(WarriorsSnuggery.Objects.Weapons.WeaponType), new[] { emptyTextNodes });

            HTMLWriter.WriteHeader("Projectiles");
            TypeWriter.WriteAll("WarriorsSnuggery.Objects.Weapons.Projectiles", "Projectile", new[] { emptyTextNodes });

            HTMLWriter.WriteHeader("Warheads");
            TypeWriter.WriteAll("WarriorsSnuggery.Objects.Weapons.Warheads", "Warhead", new[] { emptyTextNodes });
        }
Пример #5
0
        public static void WriteMaps()
        {
            HTMLWriter.WriteHeader("MapType");
            TypeWriter.Write(typeof(WarriorsSnuggery.Maps.MapType), Array.Empty <object>());

            HTMLWriter.WriteHeader("NoiseMap");
            TypeWriter.Write(typeof(WarriorsSnuggery.Maps.Noises.NoiseMapInfo), new object[] { -1, emptyTextNodes });

            HTMLWriter.WriteHeader("Generators");
            TypeWriter.WriteAll("WarriorsSnuggery.Maps.Generators", "GeneratorInfo", new object[] { -1, emptyTextNodes });

            HTMLWriter.WriteHeader("WeatherEffect");
            TypeWriter.Write(typeof(WarriorsSnuggery.Objects.Weather.WeatherEffect), new object[] { emptyTextNodes });
        }
Пример #6
0
 public static void WriteSounds()
 {
     HTMLWriter.WriteHeader("Sound");
     TypeWriter.Write(typeof(SoundType), new object[] { emptyTextNodes, true });
 }
Пример #7
0
 public static void WriteTrophies()
 {
     HTMLWriter.WriteHeader("Trophy");
     TypeWriter.Write(typeof(WarriorsSnuggery.Trophies.Trophy), new object[] { emptyTextNodes });
 }
Пример #8
0
 public static void WriteWalls()
 {
     TypeWriter.Write(typeof(WarriorsSnuggery.Objects.WallType), new object[] { (short)0, emptyTextNodes, true });
 }
Пример #9
0
 public static void WriteTerrain()
 {
     TypeWriter.Write(typeof(WarriorsSnuggery.Objects.TerrainType), new object[] { (ushort)0, emptyTextNodes, true });
 }
Пример #10
0
        public static void Main()
        {
            Console.Title = Title;

            FileExplorer.InitPaths();
            TypeWriter.Initialize();
            Console.ForegroundColor = ConsoleColor.White;

            Console.WriteLine("Welcome to the WarriorsSnuggery DocWriter. This program will search through the installation and create a documentation of the modding rules.");
            Console.WriteLine("Available are: ALL, ACTORS, PARTICLES, WEAPONS, TERRAIN, WALLS, MAPS, SPELLS, TROPHIES and SOUNDS.");

            Console.ForegroundColor = ConsoleColor.Yellow;

            Console.Write("Please enter what content should be created (e.g. ACTORS, TERRAIN): ");
            Console.ResetColor();

            var input = Console.ReadLine();

            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.Write("Write the documentation in dark mode? (y to accept): ");
            Console.ResetColor();

            DarkMode          = Console.ReadKey().Key == ConsoleKey.Y;
            HTMLWriter.Colors = DarkMode ? HTMLWriter.DarkModeColors : HTMLWriter.LightModeColors;
            Console.WriteLine();

            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine("--------------------------------------------------------------");

            DocumentationType[] types;
            try
            {
                types = getTypes(input);
            }
            catch (Exception)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Invalid input.");
                Console.ReadKey();
                return;
            }

            if (Debugger.IsAttached)
            {
                start(types);
            }
            else
            {
                try
                {
                    start(types);
                }
                catch (Exception)
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("Failed to init document/write rules.");
                    Console.ReadKey();
                    return;
                }
            }

            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine("--------------------------------------------------------------");
            Console.WriteLine("Done!");
            Console.ReadKey();
        }