コード例 #1
0
        // Token: 0x06000056 RID: 86 RVA: 0x00003B5C File Offset: 0x00001D5C
        public override void DrawGhost(ThingDef def, IntVec3 loc, Rot4 rot, Color ghostCol, Thing thing = null)
        {
            GenDraw.DrawFieldEdges(CompPowerPlant_RPElectroliser.GroundCells(loc, rot).ToList(), Color.white);
            var color = WaterCellsPresent(loc, rot, Find.CurrentMap)
                ? Designator_Place.CanPlaceColor.ToOpaque()
                : Designator_Place.CannotPlaceColor.ToOpaque();

            GenDraw.DrawFieldEdges(CompPowerPlant_RPElectroliser.WaterUseCells(loc, rot).ToList(), color);
        }
コード例 #2
0
        // Token: 0x06000055 RID: 85 RVA: 0x00003AF8 File Offset: 0x00001CF8
        private bool WaterCellsPresent(IntVec3 loc, Rot4 rot, Map map)
        {
            foreach (var item in CompPowerPlant_RPElectroliser.WaterUseCells(loc, rot))
            {
                if (!map.terrainGrid.TerrainAt(item).IsWater)
                {
                    return(false);
                }
            }

            return(true);
        }