adds GetCurrentParcelSize
This commit is contained in:
parent
f0500fa67b
commit
93ab8b3ca8
1 changed files with 18 additions and 0 deletions
|
|
@ -66,6 +66,24 @@ namespace SecondBotEvents.Commands
|
|||
return BasicReply(JsonConvert.SerializeObject(reply));
|
||||
}
|
||||
|
||||
[About("Requests the current parcel size")]
|
||||
[ReturnHints("width,height as a csv")]
|
||||
[ReturnHintsFailure("Error not in a sim")]
|
||||
[ReturnHintsFailure("Parcel data not ready")]
|
||||
public object GetCurrentParcelSize()
|
||||
{
|
||||
KeyValuePair<bool, string> tests = SetupCurrentParcel();
|
||||
if (tests.Key == false)
|
||||
{
|
||||
return Failure(tests.Value);
|
||||
}
|
||||
Vector3 start = targetparcel.AABBMin;
|
||||
Vector3 end = targetparcel.AABBMax;
|
||||
Vector3 dif = end - start;
|
||||
return BasicReply(dif.X.ToString() + "," + dif.Y.ToString());
|
||||
}
|
||||
|
||||
|
||||
[About("requests the parcel layout as a SVG\n call UpdateListOfParcels first to update list before calling")]
|
||||
[ReturnHints("json encoded svg")]
|
||||
public object GetSimParcelLayers()
|
||||
|
|
|
|||
Loading…
Reference in a new issue