From 6ba90d8bd3fef37c8bc15694fe5b2a220ca93b5c Mon Sep 17 00:00:00 2001
From: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Date: Tue, 2 Apr 2024 23:45:58 +0000
Subject: [PATCH] Clean up examine panel spans (#27044)
* updated erp prefs
* Update examine_tgui.dm
* Clean up examine panel spans (#1616)
* update examine panel spans
* update nif examine text
# Conflicts:
# code/modules/mob/living/carbon/human/examine.dm
* Update examine.dm
---------
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
---
.../mob/living/carbon/human/examine.dm | 24 +++++++-------
.../client/preferences/erp_preferences.dm | 31 +++++++++++++++++++
.../code/modules/mob/living/examine_tgui.dm | 6 ++--
.../modules/modular_implants/code/nifs.dm | 2 +-
.../character_preferences/skyrat/genitals.tsx | 5 +++
5 files changed, 53 insertions(+), 15 deletions(-)
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index a223004297c..653fddab2bd 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -450,16 +450,13 @@
"\[Add note\]"), "")
// SKYRAT EDIT ADDITION BEGIN - EXAMINE RECORDS
if(target_record && length(target_record.past_security_records) > RECORDS_INVISIBLE_THRESHOLD)
- . += "Past security records: \[View past security records\]"
+ . += "\[View past security records\]"
if (target_record && length(target_record.past_general_records) > RECORDS_INVISIBLE_THRESHOLD)
. += "\[View general records\]"
- //SKYRAT EDIT ADDITION END
else if(isobserver(user))
. += span_info("Quirks: [get_quirk_string(FALSE, CAT_QUIRK_ALL)]")
- . += ""
- //SKYRAT EDIT ADDITION BEGIN - EXAMINE RECORDS
if(isobserver(user) || user.mind?.can_see_exploitables || user.mind?.has_exploitables_override)
var/datum/record/crew/target_records = find_record(perpname)
if(target_records)
@@ -469,6 +466,8 @@
. += "\[View background info\]"
if((length(exploitable_text) > RECORDS_INVISIBLE_THRESHOLD) && ((exploitable_text) != EXPLOITABLE_DEFAULT_TEXT))
. += "\[View exploitable info\]"
+
+ . += EXAMINE_SECTION_BREAK
//SKYRAT EDIT END
//SKYRAT EDIT ADDITION BEGIN - GUNPOINT
if(gunpointing)
@@ -500,18 +499,19 @@
if (flavor_text_link)
. += flavor_text_link
- if(client)
- var/erp_status_pref = client.prefs.read_preference(/datum/preference/choiced/erp_status)
- if(erp_status_pref && !CONFIG_GET(flag/disable_erp_preferences))
- . += span_notice("ERP STATUS: [erp_status_pref]")
-
//Temporary flavor text addition:
if(temporary_flavor_text)
if(length_char(temporary_flavor_text) < TEMPORARY_FLAVOR_PREVIEW_LIMIT)
- . += span_notice("They look different than usual: [temporary_flavor_text]")
+ . += span_revennotice("
They look different than usual: [temporary_flavor_text]")
else
- . += span_notice("They look different than usual: [copytext_char(temporary_flavor_text, 1, TEMPORARY_FLAVOR_PREVIEW_LIMIT)]... More...")
- . += ""
+ . += span_revennotice("
They look different than usual: [copytext_char(temporary_flavor_text, 1, TEMPORARY_FLAVOR_PREVIEW_LIMIT)]... More...")
+
+ if(client)
+ var/erp_status_pref = client.prefs.read_preference(/datum/preference/choiced/erp_status)
+ if(erp_status_pref && !CONFIG_GET(flag/disable_erp_preferences))
+ . += EXAMINE_SECTION_BREAK
+ . += span_info("ERP Status: [span_revenboldnotice(erp_status_pref)]")
+
SEND_SIGNAL(src, COMSIG_ATOM_EXAMINE, user, .)
/**
diff --git a/modular_skyrat/master_files/code/modules/client/preferences/erp_preferences.dm b/modular_skyrat/master_files/code/modules/client/preferences/erp_preferences.dm
index a38943520c8..e7695e3524a 100644
--- a/modular_skyrat/master_files/code/modules/client/preferences/erp_preferences.dm
+++ b/modular_skyrat/master_files/code/modules/client/preferences/erp_preferences.dm
@@ -298,6 +298,37 @@
/datum/preference/choiced/erp_sexuality/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences)
return FALSE
+/datum/preference/choiced/erp_status_hypno
+ category = PREFERENCE_CATEGORY_NON_CONTEXTUAL
+ savefile_identifier = PREFERENCE_CHARACTER
+ savefile_key = "erp_status_pref_hypnosis"
+
+/datum/preference/choiced/erp_status_hypno/init_possible_values()
+ return list("Always/Whenever", "Gameplay Only", "Ask (L)OOC", "Check OOC Notes", "No")
+
+/datum/preference/choiced/erp_status_hypno/create_default_value()
+ return "No"
+
+/datum/preference/choiced/erp_status_hypno/is_accessible(datum/preferences/preferences)
+ if (!..(preferences))
+ return FALSE
+
+ if(CONFIG_GET(flag/disable_erp_preferences))
+ return FALSE
+
+ return preferences.read_preference(/datum/preference/toggle/master_erp_preferences)
+
+/datum/preference/choiced/erp_status_hypno/deserialize(input, datum/preferences/preferences)
+ if(CONFIG_GET(flag/disable_erp_preferences))
+ return "No"
+
+ if(!preferences.read_preference(/datum/preference/toggle/master_erp_preferences))
+ return "No"
+ return ..()
+
+/datum/preference/choiced/erp_status_hypno/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences)
+ return FALSE
+
/datum/preference/toggle/erp/vore_overlays
savefile_key = "vore_overlays"
default_value = FALSE
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 5648dda48d3..e542146f750 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
@@ -59,12 +59,14 @@
// Handle OOC notes first
if(preferences && preferences.read_preference(/datum/preference/toggle/master_erp_preferences))
var/e_prefs = preferences.read_preference(/datum/preference/choiced/erp_status)
- var/e_prefs_nc = preferences.read_preference(/datum/preference/choiced/erp_status_nc)
+ var/e_prefs_hypno = preferences.read_preference(/datum/preference/choiced/erp_status_hypno)
var/e_prefs_v = preferences.read_preference(/datum/preference/choiced/erp_status_v)
+ var/e_prefs_nc = preferences.read_preference(/datum/preference/choiced/erp_status_nc)
var/e_prefs_mechanical = preferences.read_preference(/datum/preference/choiced/erp_status_mechanics)
ooc_notes += "ERP: [e_prefs]\n"
- ooc_notes += "Non-Con: [e_prefs_nc]\n"
+ ooc_notes += "Hypnosis: [e_prefs_hypno]\n"
ooc_notes += "Vore: [e_prefs_v]\n"
+ ooc_notes += "Non-Con: [e_prefs_nc]\n"
ooc_notes += "ERP Mechanics: [e_prefs_mechanical]\n"
ooc_notes += "\n"
diff --git a/modular_skyrat/modules/modular_implants/code/nifs.dm b/modular_skyrat/modules/modular_implants/code/nifs.dm
index a184b4e7ed9..300c41413cf 100644
--- a/modular_skyrat/modules/modular_implants/code/nifs.dm
+++ b/modular_skyrat/modules/modular_implants/code/nifs.dm
@@ -464,7 +464,7 @@
/datum/component/nif_examine/proc/add_examine(mob/nif_user, mob/looker, list/examine_texts)
SIGNAL_HANDLER
- examine_texts += span_purple("[nif_examine_text]")
+ examine_texts += span_purple("[EXAMINE_SECTION_BREAK][EXAMINE_HINT(nif_examine_text)]")
///Checks to see if a human with a NIF has the nifsoft_to_find type of NIFSoft installed?
/mob/living/carbon/human/proc/find_nifsoft(datum/nifsoft/nifsoft_to_find)
diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/skyrat/genitals.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/skyrat/genitals.tsx
index 2a387eea994..9f420b7ebd9 100644
--- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/skyrat/genitals.tsx
+++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/skyrat/genitals.tsx
@@ -217,6 +217,11 @@ export const erp_status_pref_v: FeatureChoiced = {
component: FeatureDropdownInput,
};
+export const erp_status_pref_hypnosis: FeatureChoiced = {
+ name: 'ERP Hypnosis Status',
+ component: FeatureDropdownInput,
+};
+
export const erp_status_pref_mechanics: FeatureChoiced = {
name: 'ERP Mechanical Status',
component: FeatureDropdownInput,