public void StartTransmit() { if (this.m_Status == enumTransponderStatus.Charged) { if (!this.AnyOtherTransmitionOnSameMode()) { this.m_Status = enumTransponderStatus.Transmitting; } else { Messages.Message("Only One Transponder Can Transmit at a Time.", MessageSound.Negative); } } else { Messages.Message("Insufficient Charge Level to Contact Ship.", MessageSound.RejectInput); if (this.m_AutoCall) { this.m_AutoCall = false; } else { this.m_AutoCall = true; } } }
public void SwitchMode() { this.m_Status = enumTransponderStatus.Charging; //this.m_CurrentChargeLevel = 0; if (this.m_Mode == emumTransponderMode.OrbitalTrader) { this.m_Mode = emumTransponderMode.TraderCaravanArrival; } else { this.m_Mode = emumTransponderMode.OrbitalTrader; } }
public override void TickRare() { base.TickRare(); //switch (this.m_Status) //{ // case enumTransponderStatus.Charging: // { // break; // } // default: // { // break; // } //} if (this.m_Status == enumTransponderStatus.Charging) { if (this.m_Power.PowerOn) { if (DebugSettings.unlimitedPower) { this.m_CurrentChargeLevel += Building_SubspaceBurstTransponder.CHARGE_RATE * 20; } else { this.m_CurrentChargeLevel += Building_SubspaceBurstTransponder.CHARGE_RATE; } if (this.m_CurrentChargeLevel > this.CurrentMaxChargeLevel) { this.m_CurrentChargeLevel = this.CurrentMaxChargeLevel; this.m_Status = enumTransponderStatus.Charged; if (this.m_AutoCall) { this.StartTransmit(); } } } } if (this.m_Status == enumTransponderStatus.Transmitting) { if (DebugSettings.unlimitedPower) { this.m_CurrentChargeLevel -= Building_SubspaceBurstTransponder.DISCHARGE_RATE * 20; } else { this.m_CurrentChargeLevel -= Building_SubspaceBurstTransponder.DISCHARGE_RATE; } if (this.m_CurrentChargeLevel <= 0) { this.m_CurrentChargeLevel = 0; this.m_Status = enumTransponderStatus.Charging; this.SummonTrader(); } } }