public void ApplyReflectorBonus() { baseAntenna.antennaPower = baseAntennaRange + reflector.GetReflectorBonus() * FeedScale; baseAntenna.savedAntennaPower = baseAntennaRange + reflector.GetReflectorBonus() * FeedScale; StatusString = Localizer.Format("#LOC_NFEX_ModuleAntennaFeed_Field_ReflectorBuff_StatusString", Utils.ToSI(reflector.GetReflectorBonus() * FeedScale, "F0")); TargetString = Localizer.Format("<<1>>", reflector.part.partInfo.title); //baseAntenna.powerText = String.Format(baseAntenna.antennaPower); }
public void ApplyReflectorBonus() { if (baseAntenna != null) { baseAntenna.antennaPower = baseAntennaRange + reflector.GetReflectorBonus() * FeedScale; baseAntenna.savedAntennaPower = baseAntennaRange + reflector.GetReflectorBonus() * FeedScale; } else { try { FieldInfo fi = RTAntennaPartModule.GetType().GetField("Mode1DishRange"); fi.SetValue(RTAntennaPartModule, (float)(baseAntennaRange + reflector.GetReflectorBonus() * FeedScale)); } catch (Exception e) { Debug.LogError("[NearFutureExploration] [ModuleAntennaFeed]: Mismatched RemoteTech antenna module"); } } StatusString = Localizer.Format("#LOC_NFEX_ModuleAntennaFeed_Field_ReflectorBuff_StatusString", Utils.ToSI(reflector.GetReflectorBonus() * FeedScale, "F0")); TargetString = Localizer.Format("<<1>>", reflector.part.partInfo.title); //baseAntenna.powerText = String.Format(baseAntenna.antennaPower); }