public void ImportRegion( string name, int flags, int d, int h, List<string> items )
 {
     var reg = TShock.Regions.GetRegionByName(name);
     if( reg == null )
     {
         Console.WriteLine( "{0} was not found in tshocks region list.", name);
         return;
     }
     FlaggedRegion f = new FlaggedRegion(reg, flags);
     f.setDPS( d );
     f.setHPS(h);
     f.setBannedItems(items);
     regions.Add( name, f );
 }
Example #2
0
        public void ImportRegion(string name, int flags, int d, int h, List <string> items, Group tempGroup)
        {
            var reg = TShock.Regions.GetRegionByName(name);

            if (reg == null)
            {
                Console.WriteLine("{0} was not found in tshocks region list.", name);
                return;
            }
            FlaggedRegion f = new FlaggedRegion(reg, flags);

            f.setDPS(d);
            f.setHPS(h);
            f.setBannedItems(items);
            f.setTempGroup(tempGroup);
            regions.Add(name, f);
        }
Example #3
0
        public void ImportRegion(string name, int flags, int d, int h, List <string> items)  // add string wid after name
        {
            //public List<Region> ListAllRegions(string worldid);
            //var rid = TShock.Regions.ListAllRegions(wid);
            var reg = TShock.Regions.GetRegionByName(name);

            //var regwid = TShock.Regions.GetRegionByWorldID(wid);
            if (reg == null) // && regwid == Main.worldID.ToString // add rid.Equals(Main.worldID)
            {
                //Console.ForegroundColor = ConsoleColor.Magenta;
                //Log.Error("Some regions were not found in this world.");

                //Console.WriteLine( "{0} was not found in region list.", name);
                return;
            }
            FlaggedRegion f = new FlaggedRegion(reg, flags);

            f.setDPS(d);
            f.setHPS(h);
            f.setBannedItems(items);
            regions.Add(name, f);
        }