public static void UnmarkLegendaryLocation(GameObject target)
        {
            JournalMapNote mapNote = JournalAPI.GetMapNote(MakeSecretId(target));

            if (mapNote != null)
            {
                JournalAPI.DeleteMapNote(mapNote);
                Popup.Show("Your journal entry for " + target.DisplayNameOnlyDirect + "&y has been deleted.");
            }
        }
 public static void ToggleLegendaryLocationMarker(GameObject target)
 {
     if (JournalAPI.GetMapNote(MakeSecretId(target)) == null)
     {
         MarkLegendaryLocation(target);
     }
     else
     {
         UnmarkLegendaryLocation(target);
     }
 }
 public override bool HandleEvent(OwnerGetInventoryActionsEvent E)
 {
     if ((E.Object.HasProperty("Hero") || E.Object.GetStringProperty("Role") == "Hero") && E.Object.HasPart(typeof(GivesRep)))
     {
         if (JournalAPI.GetMapNote(MakeSecretId(E.Object)) == null)
         {
             E.AddAction("Mark Legendary Location in Journal", "mark location in journal", CmdJournalMarkLegendary, FireOnActor: true, WorksAtDistance: true, WorksTelepathically: true);
         }
         else
         {
             E.AddAction("Remove Marked Legendary Location from Journal", "unmark location in journal", CmdJournalUnmarkLegendary, FireOnActor: true, WorksAtDistance: true, WorksTelepathically: true);
         }
     }
     return(base.HandleEvent(E));
 }