mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-18 11:44:05 +01:00
[MIRROR] adds spoiler function to statpanel (#10515)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
b737759f85
commit
f95f69638e
@@ -250,3 +250,6 @@
|
||||
#define span_major_announcement_title(str) ("<span class='major_announcement_title'>" + str + "</span>")
|
||||
#define span_ooc_announcement_text(str) ("<span class='ooc_announcement_text'>" + str + "</span>")
|
||||
#define span_subheader_announcement_text(str) ("<span class='subheader_announcement_text'>" + str + "</span>")
|
||||
|
||||
// special spans
|
||||
#define span_spoiler(str) ("<span class='spoiler'>" + str + "</span>")
|
||||
|
||||
@@ -170,7 +170,7 @@ SUBSYSTEM_DEF(statpanels)
|
||||
if(description_holders["antag"])
|
||||
examine_update += span_red(span_bold("[description_holders["antag"]]")) + "<br />" //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
|
||||
|
||||
+2
-3
@@ -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
|
||||
|
||||
|
||||
@@ -439,6 +439,7 @@
|
||||
|
||||
var/flavor_text = print_flavor_text()
|
||||
if(flavor_text)
|
||||
flavor_text = replacetext(flavor_text, "||", "")
|
||||
msg += "[flavor_text]"
|
||||
|
||||
// VOREStation Start
|
||||
|
||||
@@ -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
|
||||
|
||||
+13
-2
@@ -517,8 +517,19 @@
|
||||
src << browse(null, t1)
|
||||
|
||||
if(href_list["flavor_more"])
|
||||
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", name, replacetext(flavor_text, "\n", "<BR>")), 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", "<BR>")
|
||||
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 ..()
|
||||
|
||||
Reference in New Issue
Block a user