mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-12 16:53:35 +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
@@ -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