private void UpdateStatus() { MyOxygenBlock oxygenBlock = this.GetOxygenBlock(); if (oxygenBlock == null || oxygenBlock.Room == null) { this.Status = VentStatus.Depressurized; } else if (oxygenBlock.Room.IsAirtight) { if (oxygenBlock.Room.OxygenLevel(base.CubeGrid.GridSize) >= 1f) { if (Sync.IsServer && MyVisualScriptLogicProvider.RoomFullyPressurized != null && this.Status != VentStatus.Pressurized) { MyVisualScriptLogicProvider.RoomFullyPressurized(base.EntityId, base.CubeGrid.EntityId, this.Name, base.CubeGrid.Name); } this.Status = VentStatus.Pressurized; } else if (oxygenBlock.Room.OxygenLevel(base.CubeGrid.GridSize) > 0.01f) { this.Status = (this.IsDepressurizing ? VentStatus.Depressurizing : VentStatus.Pressurizing); } else { this.Status = VentStatus.Depressurized; } } else { this.Status = VentStatus.Depressurized; } this.CheckEmissiveState(false); }