//public override IEnumerable<Gizmo> GetGizmos()
 public static void Postfix(ref IEnumerable <Gizmo> __result, Building_Bed __instance)
 {
     if (HomeBedComp.Get(__instance, out Pawn traveler))
     {
         if (traveler != null)
         {
             List <Gizmo> result = __result.ToList();
             result.Add(new BedOwnerGizmo(traveler, "TD.TravelerOwned"));
             __result = result;
         }
     }
 }
        protected override void FinishedRemoving()
        {
            pawn.Map.GetComponent <PlacedBedsMapComponent>().placedBeds.Remove(pawn);
            Thing minifiedThing = Building.Uninstall();

            pawn.inventory.innerContainer.TryAdd(minifiedThing.SplitOff(1));

            if (HomeBedComp.Get(pawn, out Building_Bed bed))
            {
                pawn?.ownership?.ClaimBedIfNonMedical(bed);
            }
        }
        //public override void SpawnSetup(Map map, bool respawningAfterLoad)
        public static void Postfix(Pawn __instance, Map map, bool respawningAfterLoad)
        {
            if (respawningAfterLoad)
            {
                return;
            }

            if (map?.IsPlayerHome ?? false)
            {
                if (HomeBedComp.Get(__instance, out Building_Bed homeBed) &&
                    homeBed?.Map == map && !homeBed.ForPrisoners &&
                    (Settings.Get().reclaimAggresively || RestUtility.IsValidBedFor(homeBed, __instance, __instance, false, true)))
                {
                    Log.Message($"Re-claming Home bed {homeBed} for {__instance}");
                    __instance.ownership?.ClaimBedIfNonMedical(homeBed);
                }
                Log.Message($"Removing Home beds for {__instance}");
                HomeBedComp.Remove(__instance);
            }
        }