public override void Process(PDAEncyclopediaEntryAdd packet) { using (packetSender.Suppress <PDAEncyclopediaEntryAdd>()) { PDAEncyclopedia.Add(packet.Key, true); } }
void Start() { health = gameObject.AddComponent <TurbineHealth>(); health.SetData(); health.health = 200f; PDAEncyclopedia.Add("WindTurbine", true); }
private static void UpdatePostfix(LeakingRadiation __instance) { if (__instance.radiationFixed && !CrafterLogic.IsCraftRecipeUnlocked(DeathRun.filterChip.TechType) && Config.POISONED.Equals(DeathRun.config.surfaceAir)) { PDAEncyclopedia.Add("FilterChip", true); KnownTech.Add(DeathRun.filterChip.TechType, true); //DeathRun.saveData.playerSave.setCue("FilterChip", 5); } }
void Start() { health = gameObject.EnsureComponent <TurbineHealth>(); //gameObject.AddComponent<TurbineHealth>(); health.SetData(); health.health = 200f; #if SUBNAUTICA PDAEncyclopedia.Add("WindTurbine", true); #elif BELOWZERO PDAEncyclopedia.Add("WindTurbine", true, false); #endif }
private void SetEncyclopediaEntry(List <string> entries) { Log.Info("Received initial sync packet with " + entries.Count + " encyclopedia entries"); using (packetSender.Suppress <PDAEncyclopediaEntryAdd>()) { foreach (string entry in entries) { PDAEncyclopedia.Add(entry, false); } } }
public void Start() { PDAEncyclopedia.Add(DeepEngine._ClassID, true); //Activate PowerRelay solarPowerRelay = CraftData.GetPrefabForTechType(TechType.SolarPanel).GetComponent <PowerRelay>(); _powerSource = this.gameObject.AddComponent <PowerSource>(); _powerSource.maxPower = QPatch.Config.MaxPowerAllowed; _powerFX = this.gameObject.AddComponent <PowerFX>(); _powerFX.vfxPrefab = solarPowerRelay.powerFX.vfxPrefab; _powerFX.attachPoint = this.gameObject.transform; _powerRelay = this.gameObject.AddComponent <PowerRelay>(); _powerRelay.powerFX = _powerFX; _powerRelay.maxOutboundDistance = 15; _powerRelay.internalPowerSource = _powerSource; // Play Audio SetupAudio(); //Start coroutines StartCoroutine(EmitEnergy()); StartCoroutine(UpdateUI()); }
private void Process(ClientScanEncyclopedia msg) { using (new MessageBlocker()) { PDAEncyclopedia.Add(msg.key, false); } }
public static void Postfix() { // Don't do anything if we're holding on the "press any key to continue" screen or intro cinematic if (DeathRunUtils.isIntroStillGoing()) { return; } // Adds our "Data Bank" entries if (!DeathRun.encyclopediaAdded && (DeathRun.saveData.playerSave.startedGame > 0)) { DeathRun.encyclopediaAdded = true; PDAEncyclopedia.Add("DeathRun", false); PDAEncyclopedia.Add("Aggression", false); PDAEncyclopedia.Add("Atmosphere", false); PDAEncyclopedia.Add("CrushDepth", false); PDAEncyclopedia.Add("Explosion", false); PDAEncyclopedia.Add("Nitrogen", false); PDAEncyclopedia.Add("Radiation", false); PDAEncyclopedia.Add("PowerCosts", false); PDAEncyclopedia.Add("LifePodSank", false); PDAEncyclopedia.Add("ExitVehicles", false); } // Officially start our mod's timer/monitor, if we haven't if (DeathRun.saveData.playerSave.startedGame == 0) { DeathRun.saveData.playerSave.startedGame = DayNightCycle.main.timePassedAsFloat; DeathRun.playerMonitor.Update(DayNightCycle.main.timePassedAsFloat); DeathRun.playerIsDead = false; return; } if (DeathRun.saveData.podSave.spotPicked) { DeathRun.saveData.runData.startNewRun(); DeathRun.saveData.podSave.spotPicked = false; DeathRun.playerIsDead = false; } // If any difficulty settings have changed, make sure we register any lower ones against the score stats if ((DeathRun.configDirty > 0) && (Time.time > DeathRun.configDirty + 5)) { DeathRun.saveData.runData.countSettings(); DeathRun.configDirty = 0; } DeathRun.playerMonitor.Update(DayNightCycle.main.timePassedAsFloat); float interval = DeathRun.playerMonitor.currValue - DeathRun.playerMonitor.prevValue; // Update our "time alive" DeathRun.saveData.playerSave.currentLife += interval; DeathRun.saveData.playerSave.allLives += interval; // Roll the "Mod Intro" messages if (!DeathRun.saveData.playerSave.killOpening && (DayNightCycle.main.timePassedAsFloat - DeathRun.saveData.playerSave.startedGame < 200)) { doIntroMessages(); } else { DeathRun.saveData.playerSave.killOpening = true; } // Respawn messages if ((DeathRun.saveData.playerSave.timeOfDeath > 0) && ((DayNightCycle.main.timePassedAsFloat - DeathRun.saveData.playerSave.timeOfDeath < 200))) { doRespawnMessages(); } // Delayed encyclopedia entries if ((DeathRun.saveData.playerSave.cueTime > 0) && (DayNightCycle.main.timePassedAsFloat > DeathRun.saveData.playerSave.cueTime)) { if (!"".Equals(DeathRun.saveData.playerSave.cueKey)) { PDAEncyclopedia.Add(DeathRun.saveData.playerSave.cueKey, true); if (KnownTechInitPatcher.UnlockSound != null) { try { PDASounds.queue.PlayQueued(KnownTechInitPatcher.UnlockSound); } catch (Exception exception) { Debug.LogException(exception); } } } DeathRun.saveData.playerSave.cueTime = 0; } }