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

🆑
fix: NSFW Headshots no longer override regular ones
/🆑

---------

Co-authored-by: Esixdotnet <156951974+Esixdotnet@users.noreply.github.com>
This commit is contained in:
Waterpig
2024-02-24 15:16:13 +01:00
committed by GitHub
co-authored by Esixdotnet
parent e8bfa45189
commit ef9cd0dd44
@@ -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