diff --git a/code/__defines/span.dm b/code/__defines/span.dm
index 8f192ca7dd..b0d1dfe329 100644
--- a/code/__defines/span.dm
+++ b/code/__defines/span.dm
@@ -250,3 +250,6 @@
#define span_major_announcement_title(str) ("" + str + "")
#define span_ooc_announcement_text(str) ("" + str + "")
#define span_subheader_announcement_text(str) ("")
+
+// special spans
+#define span_spoiler(str) ("" + str + "")
diff --git a/code/controllers/subsystems/statpanel.dm b/code/controllers/subsystems/statpanel.dm
index c1c5edc83d..d1eaa55a93 100644
--- a/code/controllers/subsystems/statpanel.dm
+++ b/code/controllers/subsystems/statpanel.dm
@@ -170,7 +170,7 @@ SUBSYSTEM_DEF(statpanels)
if(description_holders["antag"])
examine_update += span_red(span_bold("[description_holders["antag"]]")) + "
" //Red, malicious antag-related text
- target.stat_panel.send_message("update_examine", examine_update)
+ target.stat_panel.send_message("update_examine", list("EX" = examine_update, "UPD" = target.prefs.examine_text_mode == EXAMINE_MODE_SWITCH_TO_PANEL))
/datum/controller/subsystem/statpanels/proc/set_tickets_tab(client/target)
/* CHOMPRemove Start, our tickets are handled differently
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index e31e4c211e..374c169a73 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -240,13 +240,12 @@
else
f_name += "oil-stained [name][infix]."
- var/list/output = list("[icon2html(src,user.client)] That's [f_name] [suffix]", get_examine_desc())
+ var/examine_text = replacetext(get_examine_desc(), "||", "")
+ var/list/output = list("[icon2html(src,user.client)] That's [f_name] [suffix]", examine_text)
if(user.client?.prefs.examine_text_mode == EXAMINE_MODE_INCLUDE_USAGE)
output += description_info
- if(user.client?.prefs.examine_text_mode == EXAMINE_MODE_SWITCH_TO_PANEL)
- user.client.statpanel = "Examine" // Switch to stat panel
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, output)
return output
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index 98223a2303..a0fc6e12c7 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -439,6 +439,7 @@
var/flavor_text = print_flavor_text()
if(flavor_text)
+ flavor_text = replacetext(flavor_text, "||", "")
msg += "[flavor_text]"
// VOREStation Start
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index c261b801b4..8a2e6b23e7 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -1141,7 +1141,6 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon()
var/image/wing_image = get_wing_image(FALSE)
-
if(wing_image)
wing_image.layer = BODY_LAYER+WING_LAYER
overlays_standing[WING_LAYER] = wing_image
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index cd0b9c1501..a72672cce9 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -517,8 +517,19 @@
src << browse(null, t1)
if(href_list["flavor_more"])
- usr << browse(text("
[][]", name, replacetext(flavor_text, "\n", "
")), text("window=[];size=500x200", name))
- onclose(usr, "[name]")
+ var/examine_text = splittext(flavor_text, "||")
+ var/index = 0
+ var/rendered_text = ""
+ for(var/part in examine_text)
+ if(index % 2)
+ rendered_text += span_spoiler("[part]")
+ else
+ rendered_text += "[part]"
+ index++
+ examine_text = replacetext(rendered_text, "\n", "
")
+ var/datum/browser/popup = new(usr, "[name]", "[name]", 500, 300, src)
+ popup.set_content(examine_text)
+ popup.open()
if(href_list["flavor_change"])
update_flavor_text()
return ..()
diff --git a/html/browser/common.css b/html/browser/common.css
index 4fe3c31d04..671df60ed3 100644
--- a/html/browser/common.css
+++ b/html/browser/common.css
@@ -409,3 +409,14 @@ div.notice
.underline {
text-decoration: underline;
}
+
+.spoiler{
+ background-color: gray;
+ color: transparent;
+ user-select: none;
+}
+
+.spoiler:hover{
+ background-color: inherit;
+ color: inherit;
+}
diff --git a/html/statbrowser.css b/html/statbrowser.css
index 1161633f52..606c812ea6 100644
--- a/html/statbrowser.css
+++ b/html/statbrowser.css
@@ -280,3 +280,14 @@ body.dark {
.linkelem:hover {
text-decoration: underline;
}
+
+.spoiler{
+ background-color: gray;
+ color: transparent;
+ user-select: none;
+}
+
+.spoiler:hover{
+ background-color: inherit;
+ color: inherit;
+}
diff --git a/html/statbrowser.js b/html/statbrowser.js
index f9ccd63cc1..f861e0e142 100644
--- a/html/statbrowser.js
+++ b/html/statbrowser.js
@@ -283,7 +283,19 @@ function draw_examine() {
var div_content = document.createElement("div");
for (var i = 0; i < examine.length; i++) {
var parameter = document.createElement('p');
- parameter.innerHTML = examine[i];
+ var textList = examine[i].split("||");
+ if(textList.length > 1) {
+ for(var j = 0; j < textList.length; j++) {
+ var spoilerText = document.createElement('span');
+ if(j % 2) {
+ spoilerText.className = "spoiler";
+ }
+ spoilerText.innerHTML = textList[j];
+ parameter.appendChild(spoilerText);
+ }
+ } else {
+ parameter.innerHTML = examine[i];
+ }
div_content.appendChild(parameter);
}
var images = div_content.querySelectorAll("img");
@@ -1051,8 +1063,8 @@ Byond.subscribeTo('add_admin_tabs', function (ht) {
addPermanentTab("Tickets");
});
-Byond.subscribeTo('update_examine', function (S) {
- examine = S;
+Byond.subscribeTo('update_examine', function (payload) {
+ examine = payload.EX;
if (examine.length > 0 && !verb_tabs.includes("Examine")) {
verb_tabs.push("Examine");
addPermanentTab("Examine")
@@ -1060,7 +1072,9 @@ Byond.subscribeTo('update_examine', function (S) {
if (current_tab == "Examine") {
draw_examine();
}
- //tab_change("Examine"); //This is handled by DM code and a pref setting already
+ if(payload.UPD) {
+ tab_change("Examine");
+ }
})
Byond.subscribeTo('update_sdql2', function (S) {
diff --git a/interface/stylesheet.dm b/interface/stylesheet.dm
index e5b2e75ee3..07a3c3116e 100644
--- a/interface/stylesheet.dm
+++ b/interface/stylesheet.dm
@@ -180,5 +180,8 @@ BIG IMG.icon {width: 32px; height: 32px;}
.pnarrate {color: #009AB2;}
+.spoiler {background-color: gray;color: transparent;user-select: none;}
+
+.spoiler:hover {background-color: inherit;color: inherit;}
"}
diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
index 22dd6ade3f..e66650f4ec 100644
--- a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
+++ b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
@@ -1427,7 +1427,22 @@ $border-width-px: $border-width * 1px;
line-height: 0.3;
}
+.psionic {
+ color: hsl(300, 50%, 40%);
+}
+
.wingdings {
- color: #0077ff;
+ color: hsl(212, 100%, 50%);
font-family: Wingdings, Webdings;
}
+
+.spoiler {
+ background-color: hsl(0, 0%, 50%);
+ color: transparent;
+ user-select: none;
+}
+
+.spoiler:hover {
+ background-color: inherit;
+ color: inherit;
+}
diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss
index 9f5e32e087..cf7756037a 100644
--- a/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss
+++ b/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss
@@ -1455,10 +1455,21 @@ $border-width-px: $border-width * 1px;
}
.psionic {
- color: #993399;
+ color: hsl(300, 50%, 40%);
}
.wingdings {
- color: #0077ff;
+ color: hsl(212, 100%, 50%);
font-family: Wingdings, Webdings;
}
+
+.spoiler {
+ background-color: hsl(0, 0%, 50%);
+ color: transparent;
+ user-select: none;
+}
+
+.spoiler:hover {
+ background-color: inherit;
+ color: inherit;
+}
diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-vchatdark.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-vchatdark.scss
index 89423b759f..9719b6f708 100644
--- a/tgui/packages/tgui-panel/styles/tgchat/chat-vchatdark.scss
+++ b/tgui/packages/tgui-panel/styles/tgchat/chat-vchatdark.scss
@@ -1429,10 +1429,21 @@ $border-width-px: $border-width * 1px;
}
.psionic {
- color: #993399;
+ color: hsl(300, 50%, 40%);
}
.wingdings {
- color: #0077ff;
+ color: hsl(212, 100%, 50%);
font-family: Wingdings, Webdings;
}
+
+.spoiler {
+ background-color: hsl(0, 0%, 50%);
+ color: transparent;
+ user-select: none;
+}
+
+.spoiler:hover {
+ background-color: inherit;
+ color: inherit;
+}
diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-vchatlight.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-vchatlight.scss
index d20d7586ea..0300499a5a 100644
--- a/tgui/packages/tgui-panel/styles/tgchat/chat-vchatlight.scss
+++ b/tgui/packages/tgui-panel/styles/tgchat/chat-vchatlight.scss
@@ -1453,10 +1453,21 @@ $border-width-px: $border-width * 1px;
}
.psionic {
- color: #993399;
+ color: hsl(300, 50%, 40%);
}
.wingdings {
- color: #0077ff;
+ color: hsl(212, 100%, 50%);
font-family: Wingdings, Webdings;
}
+
+.spoiler {
+ background-color: hsl(0, 0%, 50%);
+ color: transparent;
+ user-select: none;
+}
+
+.spoiler:hover {
+ background-color: inherit;
+ color: inherit;
+}