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>
This commit is contained in:
lessthanthree
2024-04-03 01:45:58 +02:00
committed by GitHub
co-authored by Useroth
parent 56053b6013
commit 6ba90d8bd3
5 changed files with 53 additions and 15 deletions
+12 -12
View File
@@ -450,16 +450,13 @@
"<a href='?src=[REF(src)];hud=s;add_note=1;examine_time=[world.time]'>\[Add note\]</a>"), "")
// SKYRAT EDIT ADDITION BEGIN - EXAMINE RECORDS
if(target_record && length(target_record.past_security_records) > RECORDS_INVISIBLE_THRESHOLD)
. += "<span class='deptradio'>Past security records:</span> <a href='?src=[REF(src)];hud=s;secrecords=1;examine_time=[world.time]'>\[View past security records\]</a>"
. += "<a href='?src=[REF(src)];hud=s;secrecords=1;examine_time=[world.time]'>\[View past security records\]</a>"
if (target_record && length(target_record.past_general_records) > RECORDS_INVISIBLE_THRESHOLD)
. += "<a href='?src=[REF(src)];hud=[HAS_TRAIT(user, TRAIT_SECURITY_HUD) ? "s" : "m"];genrecords=1;examine_time=[world.time]'>\[View general records\]</a>"
//SKYRAT EDIT ADDITION END
else if(isobserver(user))
. += span_info("<b>Quirks:</b> [get_quirk_string(FALSE, CAT_QUIRK_ALL)]")
. += "</span>"
//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 @@
. += "<a href='?src=[REF(src)];bgrecords=1'>\[View background info\]</a>"
if((length(exploitable_text) > RECORDS_INVISIBLE_THRESHOLD) && ((exploitable_text) != EXPLOITABLE_DEFAULT_TEXT))
. += "<a href='?src=[REF(src)];exprecords=1'>\[View exploitable info\]</a>"
. += 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("<b>They look different than usual:</b> [temporary_flavor_text]")
. += span_revennotice("<br>They look different than usual: [temporary_flavor_text]")
else
. += span_notice("<b>They look different than usual:</b> [copytext_char(temporary_flavor_text, 1, TEMPORARY_FLAVOR_PREVIEW_LIMIT)]... <a href='?src=[REF(src)];temporary_flavor=1'>More...</a>")
. += "</span>"
. += span_revennotice("<br>They look different than usual: [copytext_char(temporary_flavor_text, 1, TEMPORARY_FLAVOR_PREVIEW_LIMIT)]... <a href='?src=[REF(src)];temporary_flavor=1'>More...</a>")
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, .)
/**
@@ -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
@@ -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"
@@ -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("<b>[nif_examine_text]</b>")
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)
@@ -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,