public override void LordToilTick()
{
base.LordToilTick();
if (this.lord.ticksInToil > GenTicks.TickRareInterval)
{
Building_OrbitalRelay orbitalRelay = OG_Util.FindOrbitalRelay(OG_Util.FactionOfMiningCo);
if (orbitalRelay != null)
{
IntVec3 hostilePosition = orbitalRelay.FindHostileInPerimeter();
if ((hostilePosition == IntVec3.Invalid) ||
(IntVec3Utility.ManhattanDistanceFlat(hostilePosition, this.FlagLoc) > 60)) // If an hostile is still in the perimeter, a new lord will be generated.
{
this.lord.ReceiveMemo("ThreatIsFinished");
}
}
}
}