public void SetVentOpen(bool open) { ventOpen = open; CompHasButton compHasButton = this.GetComp <CompHasButton>(); if (compHasButton != null) { compHasButton.SetActiveState(ventOpen); } }
public override void SpawnSetup(Map map, bool respawningAfterLoad) { base.SpawnSetup(map, respawningAfterLoad); compPowerBattery = this.GetComp <CompPowerBattery>(); compBatteryShare = this.GetComp <CompPocketDimensionBatteryShare>(); CompHasButton compHasButton = this.GetComp <CompHasButton>(); if (compHasButton.Active != ventOpen) { compHasButton.SetActiveState(ventOpen); } }