Пример #1
0
        public bool CommandAload(Player user, Command command, string text)
        {
            text = Parser.GetStringArgument(text, 2).Text;

            Area area = new Area();

            area.Load(text);

            return(true);
        }
Пример #2
0
        public Server(Main application)
        {
            Application   = application;
            Global.Server = this;

            Global.Log("Booting up PolaMUD!\n\r");

            Global.Log("Loading terrain types... ");
            Global.TerrainTable.Add("Grass", new Terrain()
            {
                Name = "Grass"
            });
            Global.TerrainTable.Add("Forest", new Terrain()
            {
                Name = "Forest"
            });
            Global.TerrainTable.Add("Desert", new Terrain()
            {
                Name = "Desert"
            });
            RoomStyles.Generate();
            Global.Log("done!\n");

            Global.Log("Loading skills... ");
            List <Type> types = Assembly.GetCallingAssembly().GetTypes().Where(type => type.IsSubclassOf(typeof(Skill))).ToList();

            foreach (Type type in types)
            {
                if (type == typeof(Skill))
                {
                    continue;
                }
                Skill skill = (Skill)Activator.CreateInstance(type);
                Global.SkillTable.Add(skill.Name, skill);
                Global.Log(skill.Name + ", ");
            }
            Global.Log("done!\n");

            Global.Log("Loading areas...\n");
            Area area = new Area();

            area.Load("00_TestData\\limbo.xml");
            new Areas.TestArea();
            Global.Log("done!\n");

            Global.Log("Initializing game loop... ");
            Global.GameLoop = new GameLoop();
            Global.Log("done!\n");
        }
Пример #3
0
        public Server(Main application)
        {
            Application = application;
            Global.Server = this;

            Global.Log("Booting up PolaMUD!\n\r");

            Global.Log("Loading terrain types... ");
            Global.TerrainTable.Add("Grass", new Terrain() { Name = "Grass" });
            Global.TerrainTable.Add("Forest", new Terrain() { Name = "Forest" });
            Global.TerrainTable.Add("Desert", new Terrain() { Name = "Desert" });
            RoomStyles.Generate();
            Global.Log("done!\n");

            Global.Log("Loading skills... ");
            List<Type> types = Assembly.GetCallingAssembly().GetTypes().Where(type => type.IsSubclassOf(typeof(Skill))).ToList();
            foreach (Type type in types)
            {
                if (type == typeof(Skill))
                    continue;
                Skill skill = (Skill)Activator.CreateInstance(type);
                Global.SkillTable.Add(skill.Name, skill);
                Global.Log(skill.Name + ", ");
            }
            Global.Log("done!\n");

            Global.Log("Loading areas...\n");
            Area area = new Area();
            area.Load("00_TestData\\limbo.xml");
            new Areas.TestArea();
            Global.Log("done!\n");

            Global.Log("Initializing game loop... ");
            Global.GameLoop = new GameLoop();
            Global.Log("done!\n");
        }
Пример #4
0
        public bool CommandAload(Player user, Command command, string text)
        {
            text = Parser.GetStringArgument(text, 2).Text;

            Area area = new Area();
            area.Load(text);

            return true;
        }