From ef9cd0dd441223f2cd4637053f58e8ff14b7df2f Mon Sep 17 00:00:00 2001 From: Waterpig <49160555+Majkl-J@users.noreply.github.com> Date: Sat, 24 Feb 2024 15:16:13 +0100 Subject: [PATCH] Fixes headshot stuff (#1031) ## About The Pull Request closes: #917 ## Why It's Good For The Game This hopefully resolves the headshot issue. TM this first, if it works, I'll add the refactor of the procs upstream to keep modular ## Changelog :cl: fix: NSFW Headshots no longer override regular ones /:cl: --------- Co-authored-by: Esixdotnet <156951974+Esixdotnet@users.noreply.github.com> --- .../modules/client/flavor_text/flavor_text.dm | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/modular_zubbers/modules/client/flavor_text/flavor_text.dm b/modular_zubbers/modules/client/flavor_text/flavor_text.dm index 48ca30074c6..247effc329c 100644 --- a/modular_zubbers/modules/client/flavor_text/flavor_text.dm +++ b/modular_zubbers/modules/client/flavor_text/flavor_text.dm @@ -3,6 +3,13 @@ //NSFW Flavor text, a way to let players express their NSFW side without having it be visible in their normal flavor text. //TODO: Make this save to the mob rather than just be pulled from the client. //TODO: Everytime I try currently, it makes the NSFW headshot overwrite the regular headshot, both of which aren't associated with this. It's super weird. + + +/datum/preferences + var/headshot_nsfw = "" + var/headshot_silicon = "" + var/headshot_silicon_nsfw = "" + /datum/preference/text/flavor_text_nsfw category = PREFERENCE_CATEGORY_NON_CONTEXTUAL savefile_identifier = PREFERENCE_CHARACTER @@ -45,6 +52,12 @@ /datum/preference/text/headshot/nsfw/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences) return FALSE +/datum/preference/text/headshot/nsfw/apply_headshot(value) + if(stored_link[usr.ckey] != value) + log_game("[usr] has set their NSFW Headshot image to '[value]'.") + stored_link[usr?.ckey] = value + usr?.client?.prefs.headshot_nsfw = value + //This is literally just the same as the original headshot pref but for silicons :) /datum/preference/text/headshot/silicon savefile_key = "headshot_silicon" @@ -52,6 +65,13 @@ /datum/preference/text/headshot/silicon/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences) return FALSE +/datum/preference/text/headshot/silicon/apply_headshot(value) + if(stored_link[usr.ckey] != value) + to_chat(usr, span_notice("Please use a relatively SFW image of the head and shoulder area to maintain immersion level. Think of it as a headshot for your ID. Lastly, [span_bold("do not use a real life photo or use any image that is less than serious.")]")) + log_game("[usr] has set their Silicon Headshot image to '[value]'.") + stored_link[usr?.ckey] = value + usr?.client?.prefs.headshot_silicon = value + //Same as the original NSFW headshot pref, but for silicons. /datum/preference/text/headshot/silicon/nsfw savefile_key = "headshot_silicon_nsfw" @@ -59,6 +79,12 @@ /datum/preference/text/headshot/silicon/nsfw/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences) return FALSE +/datum/preference/text/headshot/silicon/nsfw/apply_headshot(value) + if(stored_link[usr.ckey] != value) + log_game("[usr] has set their NSFW Silicon Headshot image to '[value]'.") + stored_link[usr?.ckey] = value + usr?.client?.prefs.headshot_silicon_nsfw = value + //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