Exemplo n.º 1
0
        public bool DesignatorAllowed(Designator d)
        {
            Designator_Place designator_Place = d as Designator_Place;

            if (designator_Place != null)
            {
                return(!disallowedBuildings.Contains(designator_Place.PlacingDef));
            }
            return(!disallowedDesignatorTypes.Contains(d.GetType()));
        }
        private ThingDef GetDesignatorCost(Designator des)
        {
            Designator_Place designator_Place = des as Designator_Place;

            if (designator_Place != null)
            {
                BuildableDef placingDef = designator_Place.PlacingDef;
                if (placingDef.costList.Count > 0)
                {
                    return(placingDef.costList.MaxBy((ThingDefCountClass c) => c.thingDef.BaseMarketValue * (float)c.count).thingDef);
                }
            }
            return(null);
        }
Exemplo n.º 3
0
        public bool DesignatorAllowed(Designator d)
        {
            Designator_Place designator_Place = d as Designator_Place;
            bool             result;

            if (designator_Place != null)
            {
                result = !this.disallowedBuildings.Contains(designator_Place.PlacingDef);
            }
            else
            {
                result = !this.disallowedDesignatorTypes.Contains(d.GetType());
            }
            return(result);
        }