Fixed "/region info -d" possibly not hiding the boundaries properly sometimes.
This commit is contained in:
parent
86b03466a3
commit
899fd6f299
1 changed files with 91 additions and 92 deletions
|
|
@ -2843,9 +2843,7 @@ namespace TShockAPI
|
|||
}
|
||||
case "info":
|
||||
{
|
||||
if (args.Parameters.Count > 1)
|
||||
{
|
||||
if (args.Parameters.Count > 4)
|
||||
if (args.Parameters.Count == 1 || args.Parameters.Count > 4)
|
||||
{
|
||||
args.Player.SendErrorMessage("Invalid syntax! Proper syntax: /region info <region> [-d] [page]");
|
||||
break;
|
||||
|
|
@ -2936,19 +2934,20 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
|
||||
new Timer((dummy) => {
|
||||
Timer boundaryHideTimer = null;
|
||||
boundaryHideTimer = new Timer((state) => {
|
||||
foreach (Point boundaryPoint in Utils.Instance.EnumerateRegionBoundaries(regionArea))
|
||||
if ((boundaryPoint.X + boundaryPoint.Y & 1) == 0)
|
||||
args.Player.SendTileSquare(boundaryPoint.X, boundaryPoint.Y, 1);
|
||||
|
||||
// ReSharper disable AccessToModifiedClosure
|
||||
Debug.Assert(boundaryHideTimer != null);
|
||||
boundaryHideTimer.Dispose();
|
||||
// ReSharper restore AccessToModifiedClosure
|
||||
},
|
||||
null, 5000, Timeout.Infinite
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
args.Player.SendErrorMessage("Invalid syntax! Proper syntax: /region info <name>");
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue