Esempio n. 1
0
        public float GetTerrainModifiedCost(PathingCapabilitiesDef capabilities, float terrainCost)
        {
            float gradeModifier = (this.Grade > capabilities.MinGrade) ? 1f + this.Grade * capabilities.GradeMultiplier : 1f;

            return(this.Distance * gradeModifier * terrainCost);
        }
Esempio n. 2
0
        public bool IsBlocked(PathingCapabilitiesDef capabilities)
        {
            float maxGrade = capabilities.MaxGrade * CacheNodeLink.PathBlockerGradeMultiplier;

            return(this.To.Steepness > capabilities.MaxSteepness || this.MaxGrade > maxGrade || this.Reciprocal.MaxGrade > maxGrade || this.To.IsImpassibleTerrain);
        }