From 4306e952fc11a8ee7eee1dc7a2935076ef22b2ea Mon Sep 17 00:00:00 2001 From: The Sharkening <95130227+StrangeWeirdKitten@users.noreply.github.com> Date: Wed, 19 Mar 2025 23:45:55 -0400 Subject: [PATCH] You can now put a full size reference picture on the examine panel (#3339) ## About The Pull Request I also centered the tab titles so it looks a little straighter   ## Why It's Good For The Game Cause I want to throw art on the examine panel. It'll be a little slow switching back due to ByondUI. Sadly ## Proof Of Testing See above ## Changelog :cl: qol: Adds the ability to put a reference picture on the examine panel. /:cl: --- .../code/modules/mob/living/examine_tgui.dm | 6 +- .../modules/client/flavor_text/flavor_text.dm | 25 ++ .../packages/tgui/interfaces/ExaminePanel.jsx | 397 +++++++++++------- .../bubber/species_features.tsx | 17 + 4 files changed, 293 insertions(+), 152 deletions(-) diff --git a/modular_skyrat/master_files/code/modules/mob/living/examine_tgui.dm b/modular_skyrat/master_files/code/modules/mob/living/examine_tgui.dm index ec0dd5b9b4e..861c0178831 100644 --- a/modular_skyrat/master_files/code/modules/mob/living/examine_tgui.dm +++ b/modular_skyrat/master_files/code/modules/mob/living/examine_tgui.dm @@ -57,7 +57,8 @@ var/obscurity_examine_pref = preferences?.read_preference(/datum/preference/toggle/obscurity_examine) var/ooc_notes = "" var/headshot = "" - + var/art_ref = "" + var/art_ref_nsfw = preferences?.read_preference(/datum/preference/toggle/art_ref_nsfw) // Handle OOC notes first if(preferences) if(preferences.read_preference(/datum/preference/toggle/master_erp_preferences)) @@ -100,6 +101,7 @@ else headshot = holder_human.dna.features["headshot"] flavor_text = holder_human.dna.features["flavor_text"] + art_ref = holder_human.dna.features["art_ref"] name = holder.name //Custom species handling. Reports the normal custom species if there is not one set. if(holder_human.dna.species.lore_protected || holder_human.dna.features["custom_species"] == "") @@ -124,4 +126,6 @@ data["custom_species"] = custom_species data["custom_species_lore"] = custom_species_lore data["headshot"] = headshot + data["art_ref"] = art_ref + data["art_ref_nsfw"] = art_ref_nsfw return data diff --git a/modular_zubbers/code/modules/client/flavor_text/flavor_text.dm b/modular_zubbers/code/modules/client/flavor_text/flavor_text.dm index f53deb57077..a7dc7a4b3c1 100644 --- a/modular_zubbers/code/modules/client/flavor_text/flavor_text.dm +++ b/modular_zubbers/code/modules/client/flavor_text/flavor_text.dm @@ -9,6 +9,7 @@ var/headshot_nsfw = "" var/headshot_silicon = "" var/headshot_silicon_nsfw = "" + var/art_ref = "" /datum/preference/text/flavor_text_nsfw category = PREFERENCE_CATEGORY_NON_CONTEXTUAL @@ -88,6 +89,30 @@ stored_link[usr?.ckey] = value usr?.client?.prefs.headshot_silicon_nsfw = value +/datum/preference/text/headshot/art_ref + savefile_key = "art_ref" + +/datum/preference/text/headshot/art_ref + +/datum/preference/text/headshot/art_ref/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences) + target.dna.features["art_ref"] = value + +/datum/preference/text/headshot/art_ref/apply_headshot(value) + if(stored_link[usr.ckey] != value) + log_game("[usr] has set their art reference image to '[value]'.") + stored_link[usr?.ckey] = value + usr?.client?.prefs.art_ref = value + +/datum/preference/toggle/art_ref_nsfw + category = PREFERENCE_CATEGORY_NON_CONTEXTUAL + savefile_identifier = PREFERENCE_CHARACTER + savefile_key = "art_ref_nsfw" + default_value = FALSE + + +/datum/preference/toggle/art_ref_nsfw/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences) + return FALSE + //OOC notes for Silicons. Overwrites regular OOC notes when you are playing a Silicon character. //TODO: Make this your regular OOC notes if you don't have Silicon ones. Every time I've tried, for some reason regular OOC notes haven't shown. /datum/preference/text/ooc_notes/silicon diff --git a/tgui/packages/tgui/interfaces/ExaminePanel.jsx b/tgui/packages/tgui/interfaces/ExaminePanel.jsx index bc8959210ce..fdd94ff05cf 100644 --- a/tgui/packages/tgui/interfaces/ExaminePanel.jsx +++ b/tgui/packages/tgui/interfaces/ExaminePanel.jsx @@ -1,6 +1,13 @@ // THIS IS A SKYRAT UI FILE import { useState } from 'react'; -import { ByondUi, Section, Stack, Tabs } from 'tgui-core/components'; +import { + Box, + Button, + ByondUi, + Section, + Stack, + Tabs, +} from 'tgui-core/components'; import { resolveAsset } from '../assets'; import { useBackend } from '../backend'; @@ -34,9 +41,10 @@ const formatURLs = (text) => { return