Updated GetDataHandlers.cs - Adding /region name - hit a block and get the name of region you are in
This commit is contained in:
parent
011bdc720f
commit
2ed91e26a0
1 changed files with 16 additions and 0 deletions
|
|
@ -263,6 +263,14 @@ namespace TShockAPI
|
|||
int y = args.Data.ReadInt32();
|
||||
byte tiletype = args.Data.ReadInt8();
|
||||
|
||||
if (args.Player.AwaitingName)
|
||||
{
|
||||
args.Player.SendMessage("Region Name: " + TShock.Regions.InAreaRegionName(x, y), Color.Yellow);
|
||||
args.Player.SendTileSquare(x, y);
|
||||
args.Player.AwaitingName = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args.Player.AwaitingTemp1)
|
||||
{
|
||||
args.Player.TempArea.X = x;
|
||||
|
|
@ -584,6 +592,14 @@ namespace TShockAPI
|
|||
if (tilex < 0 || tilex >= Main.maxTilesX || tiley < 0 || tiley >= Main.maxTilesY)
|
||||
return false;
|
||||
|
||||
if (args.Player.AwaitingName)
|
||||
{
|
||||
args.Player.SendMessage("Region Name: " + TShock.Regions.InAreaRegionName(tilex, tiley) , Color.Yellow);
|
||||
args.Player.SendTileSquare(tilex, tiley);
|
||||
args.Player.AwaitingName = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args.Player.AwaitingTemp1)
|
||||
{
|
||||
args.Player.TempArea.X = tilex;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue