public override void PostSpawnSetup(bool respawningAfterLoad) { base.PostSpawnSetup(respawningAfterLoad); flickable = parent.GetComp <CompFlickable>(); breakdownable = parent.GetComp <CompBreakdownable>(); schedule = parent.GetComp <CompSchedule>(); // set flickable to false, to avoid immediately flooding the area with // deadly toxins. if (!respawningAfterLoad && flickable != null) { flickable.SwitchIsOn = false; } // get ventPos ventPos = GenGas.VentingPosition(parent); }
public override void DrawGhost(ThingDef def, IntVec3 pos, Rot4 rot, Color ghostCol, Thing thing = null) { var ventingPos = GenGas.VentingPosition(pos, rot); // draw venting cell GenDraw.DrawFieldEdges(new List <IntVec3> { ventingPos }, Color.white); // draw venting area var map = Find.CurrentMap; var affectedArea = GenGas.GetGasVentArea(ventingPos, map, def.GetCompProperties <CompProperties_GasVent>()?.ventingRadius ?? 0); if (affectedArea.NullOrEmpty()) { return; } GenDraw.DrawFieldEdges(affectedArea, Resources.GasGreen); }