From 4f708621fa93a4b6141e67e1c8fdf48d88fd7d0c Mon Sep 17 00:00:00 2001 From: Madpeter <57852827+Madpeterz@users.noreply.github.com> Date: Fri, 26 Sep 2025 18:36:39 +0100 Subject: [PATCH] add GetCurrentParcelUUID --- SecondBotEvents/Commands/ParcelCommands.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/SecondBotEvents/Commands/ParcelCommands.cs b/SecondBotEvents/Commands/ParcelCommands.cs index cf27819..58c30bd 100644 --- a/SecondBotEvents/Commands/ParcelCommands.cs +++ b/SecondBotEvents/Commands/ParcelCommands.cs @@ -48,6 +48,26 @@ namespace SecondBotEvents.Commands } return BasicReply(targetparcel.LocalID.ToString()); } + [About("Requests the current parcel uuid")] + [ReturnHints("parcel uuid")] + [ReturnHintsFailure("Error not in a sim")] + [ReturnHintsFailure("Parcel data not ready")] + [ReturnHintsFailure("Unable to get parcel uuid")] + [CmdTypeGet()] + public object GetCurrentParcelUUID() + { + KeyValuePair tests = SetupCurrentParcel(); + if (tests.Key == false) + { + return Failure(tests.Value); + } + UUID test = GetClient().Parcels.RequestRemoteParcelID(GetClient().Self.SimPosition, GetClient().Network.CurrentSim.Handle, GetClient().Network.CurrentSim.RegionID); + if(test == UUID.Zero) + { + return Failure("Unable to get parcel uuid"); + } + return BasicReply(test.ToString()); + } [About("Requests the bot update its list of parcels ready for other commands")] [ReturnHints("ok")]