示例#1
0
        public string FormatWallsSimple()
        {
            var walls = new List <WallInfo>();

            for (var i = -48; i < Main.maxItemTypes; i++)
            {
                var wall = TShock.Utils.GetItemById(i);
                if (!(wall.createWall > 0))
                {
                    continue;
                }
                var info = new WallInfo(wall.name, wall.type, wall.createWall);
                walls.Add(info);
            }
            var orderedWalls = from x in walls orderby x.createwall select x;

            return(JsonConvert.SerializeObject(orderedWalls, Formatting.Indented));
        }
示例#2
0
 public string FormatWallsSimple()
 {
     var walls = new List<WallInfo>();
     for (var i = -48; i < Main.maxItemTypes; i++)
     {
         var wall = TShock.Utils.GetItemById(i);
         if (!(wall.createWall > 0))
             continue;
         var info = new WallInfo(wall.name, wall.type, wall.createWall);
         walls.Add(info);
     }
     var orderedWalls = from x in walls orderby x.createwall select x;
     return JsonConvert.SerializeObject(orderedWalls, Formatting.Indented);
 }