diff --git a/Core/Commands/Info.cs b/Core/Commands/Info.cs index 83d938f..d345b89 100644 --- a/Core/Commands/Info.cs +++ b/Core/Commands/Info.cs @@ -16,6 +16,23 @@ namespace BetterSecondBot.HttpService { public HTTP_Info(SecondBot mainbot, TokenStorage setuptokens) : base(mainbot, setuptokens) { } + [About("Lists objects that are sculpty type in the current sim that the bot can see")] + [ReturnHints("A json object of [UUID=Pos]")] + [Route(HttpVerbs.Get, "/ListSculptys/{token}")] + public object ListSculptys(string token) + { + Dictionary Sculpts = new Dictionary(); + Dictionary objects_copy = bot.GetClient.Network.CurrentSim.ObjectsPrimitives.Copy(); + foreach (KeyValuePair Obj in objects_copy) + { + if (Obj.Value.Type == PrimType.Sculpt) + { + Sculpts.Add(Obj.Value.ID.ToString(), Obj.Value.Position.ToString()); + } + } + return BasicReply(JsonConvert.SerializeObject(Sculpts), "ListSculptys"); + } + [About("Fetchs the current bot")] [ReturnHints("The build ID of the bot")] [Route(HttpVerbs.Get, "/Version/{token}")]