From 00de6dc6c1a34986c6f14297fb0c3239da8de437 Mon Sep 17 00:00:00 2001 From: S34N <12197162+S34NW@users.noreply.github.com> Date: Thu, 17 Jun 2021 10:30:30 +0100 Subject: [PATCH] Adds pref to remove internals pressure from status tab, adds it to inspect text (#16110) * yeets the internals from status panel * adds pressure reading to the tank inspect text * Adds a pref toggle * numbers are hard * catchup with master * Revert "catchup with master" This reverts commit bb972cb11080c1bd16440fbb9a3f23fccccd07e4. --- code/__DEFINES/preferences.dm | 3 ++- code/game/objects/items/weapons/tanks/tanks.dm | 1 + code/modules/client/preference/preferences_toggles.dm | 8 ++++++++ code/modules/mob/living/carbon/human/human.dm | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index d136d7190d5..ba292ab65f6 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -55,8 +55,9 @@ // Yes I know this being an "enable to disable" is misleading, but it avoids having to tweak all existing pref entries #define PREFTOGGLE_2_REVERB_DISABLE 512 #define PREFTOGGLE_2_FORCE_WHITE_RUNECHAT 1024 +#define PREFTOGGLE_2_SIMPLE_STAT_PANEL 2048 -#define TOGGLES_2_TOTAL 2047 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined. +#define TOGGLES_2_TOTAL 4095 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined. #define TOGGLES_2_DEFAULT (PREFTOGGLE_2_FANCYUI|PREFTOGGLE_2_ITEMATTACK|PREFTOGGLE_2_WINDOWFLASHING|PREFTOGGLE_2_RUNECHAT|PREFTOGGLE_2_DEATHMESSAGE|PREFTOGGLE_2_EMOTE_BUBBLE) diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index be1e8e48feb..df6c3a4c988 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -102,6 +102,7 @@ descriptive = "furiously hot" . += "\The [bicon(icon)][src] feels [descriptive]" + . += "The pressure gauge displays [round(air_contents.return_pressure())] kPa" /obj/item/tank/blob_act(obj/structure/blob/B) if(B && B.loc == loc) diff --git a/code/modules/client/preference/preferences_toggles.dm b/code/modules/client/preference/preferences_toggles.dm index d3ac6cc874b..2bb7b7529e2 100644 --- a/code/modules/client/preference/preferences_toggles.dm +++ b/code/modules/client/preference/preferences_toggles.dm @@ -348,3 +348,11 @@ prefs.toggles2 ^= PREFTOGGLE_2_FORCE_WHITE_RUNECHAT prefs.save_preferences(src) to_chat(src, "Your runechats will [(prefs.toggles2 & PREFTOGGLE_2_FORCE_WHITE_RUNECHAT) ? "no longer" : "now"] be forced to be white.") + +/client/verb/toggle_simple_stat_panel() + set name = "Toggle Simple Status Panel" + set category = "Preferences" + set desc = "Toggles detailed information on the status panel" + prefs.toggles2 ^= PREFTOGGLE_2_SIMPLE_STAT_PANEL + prefs.save_preferences(src) + to_chat(src, "You will [(prefs.toggles2 & PREFTOGGLE_2_SIMPLE_STAT_PANEL) ? "no longer" : "now"] get detailed information on the status panel.") diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index ea3d135402f..dd1f1cab01f 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -177,9 +177,12 @@ stat(null, "GPS: [COORD(T)]") if(locate(/obj/item/assembly/health) in total_user_contents) stat(null, "Health: [health]") + if(internal) if(!internal.air_contents) qdel(internal) + else if(client?.prefs.toggles2 & PREFTOGGLE_2_SIMPLE_STAT_PANEL) + stat(null, "Internals Tank Connected") else stat("Internal Atmosphere Info", internal.name) stat("Tank Pressure", internal.air_contents.return_pressure())