Esempio n. 1
0
        public override ActivationResult Activate(Designator designator, Map map)
        {
            var visibleRect = AllowToolUtility.GetVisibleMapRect();
            var hitCount    = DesignateAllThings(designator, map,
                                                 t => MenuEntry_HaulUrgentAll.CanAutoDesignateThingForUrgentHauling(t) && visibleRect.Contains(t.Position));

            return(hitCount > 0 ? ActivationResult.Success(BaseTextKey, hitCount) : ActivationResult.Failure(BaseMessageKey));
        }
        public override ActivationResult Activate(Designator designator, Map map)
        {
            var thingIsVisible = GetVisibleThingFilter();
            var hitCount       = DesignateAllThings(designator, map,
                                                    t => MenuEntry_HaulUrgentAll.CanAutoDesignateThingForUrgentHauling(t) && thingIsVisible(t));

            return(hitCount > 0 ?
                   ActivationResult.Success(BaseTextKey, hitCount) :
                   ActivationResult.Failure(BaseMessageKey));
        }