Adding getting region name for region messages
This commit is contained in:
parent
2094aaa0d9
commit
8d2d41d0c9
1 changed files with 14 additions and 0 deletions
|
|
@ -342,6 +342,20 @@ namespace TShockAPI.DB
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string InAreaRegionName(int x, int y)
|
||||||
|
{
|
||||||
|
foreach (Region region in Regions)
|
||||||
|
{
|
||||||
|
if (x >= region.Area.Left && x <= region.Area.Right &&
|
||||||
|
y >= region.Area.Top && y <= region.Area.Bottom &&
|
||||||
|
region.DisableBuild)
|
||||||
|
{
|
||||||
|
return region.Name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public static List<string> ListIDs(string MergedIDs)
|
public static List<string> ListIDs(string MergedIDs)
|
||||||
{
|
{
|
||||||
return MergedIDs.Split(new []{','}, StringSplitOptions.RemoveEmptyEntries).ToList();
|
return MergedIDs.Split(new []{','}, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue