static void Postfix(PLInGameUI __instance) { if (DebugModeCommand.DebugMode && PLServer.Instance != null && PLEncounterManager.Instance != null && PLNetworkManager.Instance != null && GameVersion.Version != string.Empty) { Vector3 pos; if (PLNetworkManager.Instance.LocalPlayer != null) { PLPawn localPawn = PLNetworkManager.Instance.LocalPlayer.GetPawn(); pos = localPawn != null ? localPawn.transform.position : Vector3.zero; } else { pos = Vector3.zero; } PLPersistantEncounterInstance encounter = PLEncounterManager.Instance.GetCurrentPersistantEncounterInstance(); int levelID = encounter != null?encounter.LevelID.GetDecrypted() : -1; PLSectorInfo sectorInfo = PLServer.GetCurrentSector(); string visualType = sectorInfo != null?sectorInfo.VisualIndication.ToString() : "--"; int sector = sectorInfo != null ? sectorInfo.ID : -1; PLGlobal.SafeLabelSetText(__instance.CurrentVersionLabel, $"{GameVersion.Version}\nPOS: {pos}, Level ID: {levelID}, Sector: {sector}, Visual: {visualType}"); } }
public static bool PacifistStatus = false; //Whether the game has recieved a message from host saying pacifist is true static void Postfix() //Runs code which sets pacifist label { //checks whether game is a pacifist run, and whether the client is the host, or the client has been told by the host. if (PLServer.Instance != null && (PhotonNetwork.isMasterClient && PLServer.Instance.PacifistRun || PacifistStatus)) { PLGlobal.SafeLabelSetText(PLInGameUI.Instance.CurrentVersionLabel, $"{PLInGameUI.Instance.CurrentVersionLabel.text} (Pacifist)"); } }
//public static GameObject BrokenReactorVisual = PLEncounterManager.Instance.PlayerShip.InteriorDynamic.Find("Reactor_01_GlassBroken"); static void Postfix(PLNetworkManager __instance, Text ___CurrentVersionLabel) { if (PLServer.Instance != null && PLEncounterManager.Instance.PlayerShip != null && PLEncounterManager.Instance.PlayerShip.ReactorInstance != null) { //string ReactorStatus = string.Empty; //bool ReactorIsFine = (!PLEncounterManager.Instance.PlayerShip.IsReactorOverheated() && !PLEncounterManager.Instance.PlayerShip.IsReactorTempCritical() && !PLEncounterManager.Instance.PlayerShip.IsReactorInMeltdown()); /* * This is gonna be neat. * * string CurrentReactorIcon = ""; * string ReactorIcon1 = "╪"; * string ReactorIcon2 = "╬"; * string ReactorIcon3 = "╫"; * string ReactorIcon4 = "║"; * string ReactorIcon5 = "Φ"; * string ReactorIcon6 = "Θ"; */ if (PLEncounterManager.Instance.PlayerShip.IsReactorOverheated()) { ReactorStatus = "<color=#ff8c00>REACTOR SAFETY SHUTDOWN ENGAGED!</color> <color=#B8860B>~╫~</color>"; } else if (PLEncounterManager.Instance.PlayerShip.ShouldEjectReactorCore()) { ReactorStatus = "<color=red>CORE IMPLOSION</color> <color=red><╪></color> <color=red>IMMINENT</color>"; } else if (PLEncounterManager.Instance.PlayerShip.IsReactorInMeltdown()) { ReactorStatus = "<color=red>CORE</color> <color=red><╪></color> <color=red>JETTISONED</color>"; } else if (PLEncounterManager.Instance.PlayerShip.IsReactorTempCritical()) { ReactorStatus = "<color=red>DANGER:</color> <color=#FFA500>THERMAL STRESS</color> <color=red><b>~╫~</b></color>"; } else if (PLEncounterManager.Instance.PlayerShip.CoreInstability > 0) { ReactorStatus = "<color=yellow>Unstable - Recovering </color><color=#ff8c00><b><<╪>></b></color>"; } else { ReactorStatus = "Stable <color=#32CD32><╫></color>"; } if (PLEncounterManager.Instance.PlayerShip.CoreInstability > 0) { ReactorStatus += " <color=#FFA500>STABILITY: " + Mathf.RoundToInt(Mathf.Clamp01(1f - PLEncounterManager.Instance.PlayerShip.CoreInstability) * 100f).ToString("000") + "%</color>"; } else { ReactorStatus += " Temperature: " + Mathf.RoundToInt(PLEncounterManager.Instance.PlayerShip.MyStats.ReactorTempCurrent / PLEncounterManager.Instance.PlayerShip.MyStats.ReactorTempMax * 100f).ToString("000") + "%"; } if (IsReadoutEnabled) { PLGlobal.SafeLabelSetText(___CurrentVersionLabel, $"{___CurrentVersionLabel.text}\n\n\n\nRSTS: {ReactorStatus}"); } else if (!IsReadoutEnabled) { ReactorStatus = string.Empty; } } }
static void Postfix(PLNetworkManager __instance, Text ___CurrentVersionLabel) { PLGlobal.SafeLabelSetText(___CurrentVersionLabel, $"{___CurrentVersionLabel.text}\nPPL {PPLVersion}"); }