void VesselCreated(Vessel v) { if (Serenity.GetModuleGroundExpControl(v) != null) { v.vesselName = Lib.BuildString(v.mainBody.name, " Site ", Lib.Greek()); } }
void VesselCreated(Vessel v) { #if !KSP170 && !KSP16 && !KSP15 && !KSP14 if (Serenity.GetModuleGroundExpControl(v) != null) { v.vesselName = Lib.BuildString(v.mainBody.name, " Surface Experiment ", Lib.Greek()); } #endif }
private static AntennaInfo GetAntennaInfo(Vessel v, bool powered, bool storm) { AntennaInfo ai = new AntennaInfo(); ai.powered = powered; ai.storm = storm; ai.transmitting = !string.IsNullOrEmpty(Science.Transmitting(v, true)); API.Comm.Init(ai, v); if (ai.strength > -1) { return(ai); } #if !KSP170 && !KSP16 && !KSP15 && !KSP14 // Serenity var cluster = Serenity.GetScienceCluster(v); if (cluster != null) { return(new AntennaInfoSerenity(v, cluster, storm, ai.transmitting).AntennaInfo()); } #endif // if CommNet is enabled if (HighLogic.fetch.currentGame.Parameters.Difficulty.EnableCommNet) { return(new AntennaInfoCommNet(v, powered, storm, ai.transmitting).AntennaInfo()); } // default: the simple stupid always connected signal system AntennaInfo antennaInfo = new AntennaInfoCommNet(v, powered, storm, ai.transmitting).AntennaInfo(); antennaInfo.ec *= 0.16; antennaInfo.linked = true; antennaInfo.status = (int)LinkStatus.direct_link; antennaInfo.strength = 1; // 100 % antennaInfo.target_name = "DSN: KSC"; return(antennaInfo); }
public override void OnLoad(ConfigNode node) { // deserialize data DB.Load(node); Communications.NetworkInitialized = false; Communications.NetworkInitializing = false; // initialize everything just once if (!initialized) { // add supply resources to pods Profile.SetupPods(); // initialize subsystems Cache.Init(); ResourceCache.Init(); Radiation.Init(); Science.Init(); LineRenderer.Init(); ParticleRenderer.Init(); Highlighter.Init(); UI.Init(); #if !KSP170 && !KSP16 && !KSP15 && !KSP14 Serenity.Init(); #endif // prepare storm data foreach (CelestialBody body in FlightGlobals.Bodies) { if (Storm.Skip_body(body)) { continue; } Storm_data sd = new Storm_data { body = body }; storm_bodies.Add(sd); } // various tweaks to the part icons in the editor Misc.TweakPartIcons(); // setup callbacks callbacks = new Callbacks(); // everything was initialized initialized = true; } // detect if this is a different savegame if (DB.uid != savegame_uid) { // clear caches Cache.Clear(); ResourceCache.Clear(); Message.all_logs.Clear(); // sync main window pos from db UI.Sync(); // remember savegame id savegame_uid = DB.uid; } Science.ClearDeferred(); }