Accent tags clickable, show name and desc in new window (#14995)

This commit is contained in:
DreamySkrell
2022-11-02 17:46:07 +01:00
committed by GitHub
parent cfb14d00f4
commit 17d970d73e
3 changed files with 22 additions and 2 deletions
+13
View File
@@ -689,6 +689,19 @@
var/datum/browser/flavor_win = new(usr, name, capitalize_first_letters(name), 500, 250)
flavor_win.set_content(replacetext(flavor_text, "\n", "<BR>"))
flavor_win.open()
if(href_list["accent_tag"])
var/datum/accent/accent = SSrecords.accents[href_list["accent_tag"]]
if(accent && istype(accent))
var/datum/browser/accent_win = new(usr, accent.name, capitalize_first_letters(accent.name), 500, 250)
var/html = "[accent.description]<br>"
var/datum/asset/spritesheet/S = get_asset_datum(/datum/asset/spritesheet/goonchat)
html += "[S.css_tag()]<br>"
html += {"[S.icon_tag(accent.tag_icon)]<br>"}
html += "([accent.text_tag])<br>"
accent_win.set_content(html)
accent_win.open()
if(href_list["flavor_change"])
update_flavor_text()