Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Source/1.5/Comp/CompShipBay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public override void PostExposeData()
public CellRect bayRect;
Matrix4x4 matrix = new Matrix4x4();
public HashSet<IntVec3> reservedArea = new HashSet<IntVec3>();
private bool? needDrawRoof = null;
HashSet<CompFueledTravel> dockedShuttles = new HashSet<CompFueledTravel>();
CompRefuelable compRefuelable;
CompPowerTrader compPowerTrader;
Expand Down Expand Up @@ -140,7 +141,12 @@ public IntVec3 CanFitShuttleSize(VehiclePawn vehicle) //we only have square shut
public override void PostDraw()
{
base.PostDraw();
if ((Find.PlaySettings.showRoofOverlay || parent.GetRoom() != null && parent.GetRoom().Cells.Any(c => c.Fogged(parent.Map))) && parent.Position.Roofed(parent.Map))
// Get room is slow if not enclosed, so update flag rarely.
if (needDrawRoof == null || Find.TickManager.TicksGame % 60 == 0)
{
needDrawRoof = parent.GetRoom() != null && parent.GetRoom().Cells.Any(c => c.Fogged(parent.Map));
}
if ((Find.PlaySettings.showRoofOverlay || (needDrawRoof ?? false)) && parent.Position.Roofed(parent.Map))
{
//roofedGraphic.Draw(new Vector3(parent.DrawPos.x, Altitudes.AltitudeFor(AltitudeLayer.MoteOverhead), parent.DrawPos.z), parent.Rotation, parent);

Expand Down