private static void Display_MenuChanged(object sender, MenuChangedEventArgs e)
        {
            if (e.OldMenu is TitleMenu || e.NewMenu is TitleMenu || Game1.currentLocation == null || Game1.player == null)
            {
                return;
            }

            // Handle Saloon Delivery telephone dialogue menu
            const string questionKey = "telephone";

            if (e.NewMenu is DialogueBox dialogueBox &&
                Game1.currentLocation.lastQuestionKey == questionKey &&
                dialogueBox.characterDialogue?.speaker?.Name == GusDeliveryService.ShopOwner &&
                (Kitchen.HasOrWillReceiveKitchenCompletedMail() || Kitchen.IsKitchenComplete(Bundles.CC)))
            {
                if ((e.OldMenu == null || !(e.OldMenu is CommunityKitchen.ShopMenuNoInventory)) &&
                    (GusOnABike.IsGusOnFarm() || GusOnABike.WhereGus() != GusDeliveryService.ShopLocation))
                {
                    // Replace phonecall with dummy dialogue if Gus is already delivering food
                    Game1.activeClickableMenu = new DialogueBox(ModEntry.i18n.Get("dialogue.phone.invalid"));
                }
                else
                {
                    // Add delivery menu option to phonecall
                    GusDeliveryService.TryOpenDeliveryMenu();
                }
                return;
            }
        }
 internal static void AddConsoleCommands(string cmd)
 {
     Helper.ConsoleCommands.Add(
         name: cmd + "delivery",
         documentation: $"Open a new Saloon delivery menu.",
         callback: (string s, string[] args) =>
     {
         GusDeliveryService.OpenDeliveryMenu();
     });
     Helper.ConsoleCommands.Add(
         name: cmd + "gus",
         documentation: $"Create a new {nameof(GusOnABike)} on the farm.",
         callback: (string s, string[] args) =>
     {
         GusOnABike.Create();
     });
 }
 private static void GameLoop_TimeChanged(object sender, TimeChangedEventArgs e)
 {
     if (GusDeliveryService.ItemDeliveryChest.IsValueCreated &&
         GusDeliveryService.ItemDeliveryChest.Value.items.Any() &&
         !(Game1.activeClickableMenu is CommunityKitchen.ShopMenuNoInventory) &&
         (e.NewTime < GusDeliveryService.SaloonOpeningTime ||
          e.NewTime > GusDeliveryService.SaloonClosingTime ||
          e.NewTime >= GusDeliveryService.DeliveryEndTime))
     {
         if (!GusOnABike.IsGusOnFarm())
         {
             if (Game1.currentLocation is Farm)
             {
                 GusOnABike.Create();
             }
             else
             {
                 GusOnABike.Honk(isOnFarm: false);
                 GusDeliveryService.AddDeliveryChests();
             }
         }
     }
 }