add GetParcelTraffic command
This commit is contained in:
parent
0038152ce7
commit
c99e9a263b
1 changed files with 15 additions and 0 deletions
|
|
@ -51,6 +51,21 @@ namespace BetterSecondBot.HttpService
|
||||||
return Failure("ok", "SetParcelSale", new [] { amount, avatar });
|
return Failure("ok", "SetParcelSale", new [] { amount, avatar });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[About("Gets the parcel Dwell (Traffic) value and returns it via the reply target")]
|
||||||
|
[ReturnHints("traffic value")]
|
||||||
|
[ReturnHintsFailure("Error not in a sim")]
|
||||||
|
[ReturnHintsFailure("Parcel data not ready")]
|
||||||
|
[Route(HttpVerbs.Get, "/GetParcelTraffic/{token}")]
|
||||||
|
public object GetParcelTraffic(string token)
|
||||||
|
{
|
||||||
|
KeyValuePair<bool, string> tests = SetupCurrentParcel(token, "parcel", "GetParcelTraffic");
|
||||||
|
if (tests.Key == false)
|
||||||
|
{
|
||||||
|
return Failure(tests.Value, "GetParcelTraffic");
|
||||||
|
}
|
||||||
|
return BasicReply(targetparcel.Dwell.ToString(), "GetParcelTraffic");
|
||||||
|
}
|
||||||
|
|
||||||
[About("Changes the parcel landing mode to point and sets the landing point")]
|
[About("Changes the parcel landing mode to point and sets the landing point")]
|
||||||
[ReturnHints("ok")]
|
[ReturnHints("ok")]
|
||||||
[ReturnHintsFailure("Error not in a sim")]
|
[ReturnHintsFailure("Error not in a sim")]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue