From f5b206e9120c62e58a3448a9c6d6ce4d584eef82 Mon Sep 17 00:00:00 2001 From: Madpeter <57852827+Madpeterz@users.noreply.github.com> Date: Mon, 17 Feb 2025 21:43:43 +0000 Subject: [PATCH] Update ParcelCommands.cs --- SecondBotEvents/Commands/ParcelCommands.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/SecondBotEvents/Commands/ParcelCommands.cs b/SecondBotEvents/Commands/ParcelCommands.cs index b939144..96e09e4 100644 --- a/SecondBotEvents/Commands/ParcelCommands.cs +++ b/SecondBotEvents/Commands/ParcelCommands.cs @@ -32,6 +32,20 @@ namespace SecondBotEvents.Commands [ClassInfo("Control the land under our feet")] public partial class ParcelCommands(EventsSecondBot setmaster) : CommandsAPI(setmaster) { + [About("Requests the current parcel local id")] + [ReturnHints("parcel local id (int)")] + [ReturnHintsFailure("Error not in a sim")] + [ReturnHintsFailure("Parcel data not ready")] + public object GetCurrentParcelId() + { + KeyValuePair tests = SetupCurrentParcel(); + if (tests.Key == false) + { + return Failure(tests.Value); + } + return BasicReply(targetparcel.LocalID.ToString()); + } + [About("Requests the bot update its list of parcels ready for other commands")] [ReturnHints("ok")] public object UpdateListOfParcels()