Files
Bubberstation/modular_zubbers/code/modules/client/examine_tgui.dm
Waterpig ecc7cf390f Minor pref changes before I go utterly insane doing something else (#2447)
## About The Pull Request

Makes some pref code correctly use apply_to_human and dna. This means
that if you switch mind around the prefs stay the same... I wonder why
I'm adding that

Removes deprecated headshot var from preferences. This used to be the
universal one on skyrat but since we have one for humans one for
silicons it was never really used in any place that couldn't be replaced
by dna on here.


## Why It's Good For The Game

Makes the code more consistent. And more ready for certain *fun*
activities

## Proof Of Testing

<details>
<summary>Screenshots/Videos</summary>


![image](https://github.com/user-attachments/assets/3e48def9-03e0-4556-a43b-f4d95626cfaa)

</details>

## Changelog

🆑
code: Makes headshot and nsfw preference code handling more consistent
with the rest. Savefiles are untouched by this
/🆑
2024-11-17 17:00:44 +00:00

36 lines
2.1 KiB
Plaintext

/datum/examine_panel/ui_data(mob/user)
var/list/data = ..()
var/datum/preferences/preferences = holder.client?.prefs
if(isnull(preferences))
return ..()
var/flavor_text_nsfw = ""
var/headshot_nsfw = ""
var/character_ad = ""
var/emote_length = preferences.read_preference(/datum/preference/choiced/emote_length)
var/approach = preferences.read_preference(/datum/preference/choiced/approach_pref)
var/furries = preferences.read_preference(/datum/preference/choiced/directory_character_prefs/furry_pref)
var/scalies = preferences.read_preference(/datum/preference/choiced/directory_character_prefs/scalie_pref)
var/others = preferences.read_preference(/datum/preference/choiced/directory_character_prefs/other_pref)
var/demihumans = preferences.read_preference(/datum/preference/choiced/directory_character_prefs/demihuman_pref)
var/humans = preferences.read_preference(/datum/preference/choiced/directory_character_prefs/human_pref)
var/show_nsfw_flavor_text = preferences.read_preference(/datum/preference/choiced/show_nsfw_flavor_text)
if(issilicon(holder) && !(show_nsfw_flavor_text == "Never"))
flavor_text_nsfw = preferences.read_preference(/datum/preference/text/flavor_text_nsfw/silicon)
headshot_nsfw = preferences.read_preference(/datum/preference/text/headshot/silicon/nsfw)
else if(ishuman(holder))
var/mob/living/carbon/human/holder_human = holder
if((show_nsfw_flavor_text == "Always On") || (show_nsfw_flavor_text == "Nude Only" && !(holder_human.w_uniform)))
flavor_text_nsfw = holder_human.dna.features["flavor_text_nsfw"]
headshot_nsfw = holder_human.dna.features["headshot_nsfw"]
character_ad += "Preferred Emote Length: [emote_length]\n"
character_ad += "How to Approach: [approach]\n"
character_ad += "Furries: [furries] | Scalies: [scalies] | Other: [others]\n"
character_ad += "Demis: [demihumans] | Humans: [humans]\n"
character_ad += "\n"
character_ad += preferences.read_preference(/datum/preference/text/character_ad)
data["character_ad"] = character_ad
data["flavor_text_nsfw"] = flavor_text_nsfw
data["headshot_nsfw"] = headshot_nsfw
return data