FluffyManager.ManagerJob_Foraging.CleanAreaDesignations C# (CSharp) Method

CleanAreaDesignations() private method

private CleanAreaDesignations ( ) : void
return void
        private void CleanAreaDesignations()
        {
            foreach ( Designation des in Designations )
            {
                if ( !des.target.HasThing )
                {
                    des.Delete();
                }

                // if area is not null and does not contain designate location, remove designation.
                else if ( !ForagingArea?.ActiveCells.Contains( des.target.Thing.Position ) ?? false )
                {
                    des.Delete();
                }
            }
        }