Made flavor texts into an element datum.
This commit is contained in:
@@ -2390,6 +2390,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
else
|
||||
character.Digitigrade_Leg_Swap(TRUE)
|
||||
|
||||
SEND_SIGNAL(character, COMSIG_HUMAN_PREFS_COPIED_TO, src, icon_updates, roundstart_checks)
|
||||
|
||||
//let's be sure the character updates
|
||||
if(icon_updates)
|
||||
character.update_body()
|
||||
|
||||
@@ -1010,3 +1010,8 @@
|
||||
|
||||
/mob/living/carbon/can_hold_items()
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/proc/update_flavor_text_feature(new_text)
|
||||
if(!dna)
|
||||
return
|
||||
dna.features["flavor_text"] = new_text
|
||||
|
||||
@@ -25,15 +25,10 @@
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
|
||||
if(ishuman(src)) //user just returned, y'know, the user's own species. dumb.
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/datum/species/pref_species = H.dna.species
|
||||
if(get_visible_name() == "Unknown") // same as flavor text, but hey it works.
|
||||
. += "You can't make out what species they are."
|
||||
else if(skipface)
|
||||
. += "You can't make out what species they are."
|
||||
else
|
||||
. += "[t_He] [t_is] a [H.dna.custom_species ? H.dna.custom_species : pref_species.name]!"
|
||||
if(skipface || get_visible_name() == "Unknown")
|
||||
. += "You can't make out what species they are."
|
||||
else
|
||||
. += "[t_He] [t_is] a [dna.custom_species ? dna.custom_species : dna.species.name]!"
|
||||
|
||||
//uniform
|
||||
if(w_uniform && !(SLOT_W_UNIFORM in obscured))
|
||||
@@ -389,18 +384,8 @@
|
||||
else if(isobserver(user) && traitstring)
|
||||
. += "<span class='info'><b>Traits:</b> [traitstring]</span>"
|
||||
|
||||
//No flavor text unless the face can be seen. Prevents certain metagaming with impersonation.
|
||||
var/invisible_man = skipface || get_visible_name() == "Unknown"
|
||||
if(invisible_man)
|
||||
. += "...?"
|
||||
else
|
||||
var/flavor = print_flavor_text(flavor_text)
|
||||
if(flavor)
|
||||
. += flavor
|
||||
var/temp_flavor = print_flavor_text(flavor_text_2,TRUE)
|
||||
if(temp_flavor)
|
||||
. += temp_flavor
|
||||
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)
|
||||
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .) //This also handles flavor texts now
|
||||
|
||||
. += "*---------*</span>"
|
||||
|
||||
/mob/living/proc/status_effect_examines(pronoun_replacement) //You can include this in any mob's examine() to show the examine texts of status effects!
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
verbs += /mob/living/proc/mob_sleep
|
||||
verbs += /mob/living/proc/lay_down
|
||||
verbs += /mob/living/carbon/human/proc/underwear_toggle //fwee
|
||||
verbs += /mob/proc/set_flavor
|
||||
verbs += /mob/proc/set_flavor_2
|
||||
|
||||
//initialize limbs first
|
||||
create_bodyparts()
|
||||
@@ -40,6 +38,10 @@
|
||||
. = ..()
|
||||
if(!CONFIG_GET(flag/disable_human_mood))
|
||||
AddComponent(/datum/component/mood)
|
||||
AddElement(/datum/element/flavor_text/carbon)
|
||||
AddElement(/datum/element/flavor_text, null, null, "Temporary Flavor Text",
|
||||
"Sets a description of your character's current appearance. Use this for emotions, poses etc.",
|
||||
"This should be used only for things pertaining to the current round!")
|
||||
|
||||
/mob/living/carbon/human/Destroy()
|
||||
QDEL_NULL(physiology)
|
||||
|
||||
@@ -504,14 +504,6 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
|
||||
unset_machine()
|
||||
src << browse(null, t1)
|
||||
|
||||
if(href_list["flavor_more"])
|
||||
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", name, replacetext(flavor_text, "\n", "<BR>")), text("window=[];size=500x200", name))
|
||||
onclose(usr, "[name]")
|
||||
|
||||
if(href_list["flavor2_more"])
|
||||
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", name, replacetext(flavor_text_2, "\n", "<BR>")), text("window=[];size=500x200", name))
|
||||
onclose(usr, "[name]")
|
||||
|
||||
if(href_list["refresh"])
|
||||
if(machine && in_range(src, usr))
|
||||
show_inv(machine)
|
||||
|
||||
Reference in New Issue
Block a user