protected override void ReceiveCompSignal(string signal) { base.ReceiveCompSignal(signal); if (signal == CompUpgrade.UpgradeCompleteSignal) { ConfigureChannelComp(); } if (signal == CompChannelSelector.ChannelChangedSignal) { RemoteTechUtility.ReportPowerUse(this, 2f); } }
public void DoDetonation() { wantDetonation = false; if (!IsPowered) { PlayNeedPowerEffect(); return; } RemoteTechUtility.ReportPowerUse(this, 20f); SoundDefOf.FlickSwitch.PlayOneShot(this); RemoteTechUtility.TriggerReceiversInNetworkRange(this, channels?.Channel ?? RemoteTechUtility.DefaultChannel); }
private void PushGas() { if (FrontAndBackAreAccessble()) { var sourceCloud = RemoteTechUtility.TryFindGasCloudAt(Map, sourceCell); if (sourceCloud != null) { RemoteTechUtility.ReportPowerUse(this); // move only whole units of concentration moveBuffer += Mathf.Min(sourceCloud.Concentration - MinSourceConcentration, statVentAmount / GenTicks.TicksPerRealSecond); if (moveBuffer > 1) { var moveAmount = Mathf.FloorToInt(moveBuffer); RemoteTechUtility.DeployGas(Map, targetCell, sourceCloud.def, moveAmount); sourceCloud.ReceiveConcentration(-moveAmount); moveBuffer -= moveAmount; } } } }