Ejemplo n.º 1
0
        // Token: 0x06000062 RID: 98 RVA: 0x00004058 File Offset: 0x00002258
        private void RecalculateBlockages()
        {
            if (windPathCells.Count == 0)
            {
                var collection =
                    RPWindTurbine_Utility.CalculateWindCells(parent.Position, parent.Rotation, parent.def.size);
                windPathCells.AddRange(collection);
            }

            windPathBlockedCells.Clear();
            windPathBlockedByThings.Clear();
            foreach (var intVec in windPathCells)
            {
                if (parent.Map.roofGrid.Roofed(intVec))
                {
                    windPathBlockedByThings.Add(null);
                    windPathBlockedCells.Add(intVec);
                }
                else
                {
                    var list = parent.Map.thingGrid.ThingsListAt(intVec);
                    foreach (var thing in list)
                    {
                        if (!thing.def.blockWind)
                        {
                            continue;
                        }

                        windPathBlockedByThings.Add(thing);
                        windPathBlockedCells.Add(intVec);
                        break;
                    }
                }
            }
        }
Ejemplo n.º 2
0
 // Token: 0x06000059 RID: 89 RVA: 0x00003BC8 File Offset: 0x00001DC8
 public override void DrawGhost(ThingDef def, IntVec3 center, Rot4 rot, Color ghostCol, Thing thing = null)
 {
     GenDraw.DrawFieldEdges(RPWindTurbine_Utility.CalculateWindCells(center, rot, def.size).ToList());
 }