mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-12 16:38:18 +01:00
Merge pull request #1088 from ArchieBeepBoop/sillycons
Flavortext... But as an element.
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
var/t_is = p_are()
|
||||
var/obscure_name
|
||||
var/dispSize = round(12*size_multiplier) // gets the character's sprite size percent and converts it to the nearest half foot
|
||||
var/output = ""
|
||||
|
||||
if(isliving(user))
|
||||
var/mob/living/L = user
|
||||
@@ -24,25 +23,13 @@
|
||||
if (vassDesc != "")
|
||||
. += vassDesc
|
||||
|
||||
output = "<center>"
|
||||
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
|
||||
if(gender)
|
||||
output += "[icon2html('hyperstation/icons/chat/gender.dmi', world, gender)]"
|
||||
|
||||
output += "<b>[src.name]</b>"
|
||||
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]!"
|
||||
output += "([H.dna.custom_species ? H.dna.custom_species : pref_species.name])"
|
||||
output += "</center>"
|
||||
|
||||
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))
|
||||
@@ -416,30 +403,9 @@
|
||||
else if(isobserver(user) && traitstring)
|
||||
. += "<span class='info'><b>Traits:</b> [traitstring]</span>"
|
||||
|
||||
|
||||
if(print_flavor_text())
|
||||
output += "<br><b>General</b>"
|
||||
if(get_visible_name() == "Unknown") //Are we sure we know who this is? Don't show flavor text unless we can recognize them. Prevents certain metagaming with impersonation.
|
||||
. += "...?"
|
||||
output += "<br>...?"
|
||||
else if(skipface) //Sometimes we're not unknown, but impersonating someone in a hardsuit, let's not reveal our flavor text then either.
|
||||
. += "...?"
|
||||
output += "<br>...?"
|
||||
else
|
||||
. += "[print_flavor_text()]"
|
||||
output += "<br>[url_encode(flavor_text)]"
|
||||
if(ooc_text)
|
||||
output += "<br><br><i><b>OOC</b>"
|
||||
output += "<br>[url_encode(ooc_text)]"
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, msg)
|
||||
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .) //This also handles flavor texts now
|
||||
. += "*---------*</span>"
|
||||
|
||||
//stat panel
|
||||
if(ishuman(src))
|
||||
user.client << output(output, "statbrowser:update_examine") //open the examine window
|
||||
user.client << output(null, "statbrowser:create_mobexamine") //open the examine window
|
||||
|
||||
/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!
|
||||
var/list/dat = list()
|
||||
if(!pronoun_replacement)
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
if(!CONFIG_GET(flag/disable_human_mood))
|
||||
AddComponent(/datum/component/mood)
|
||||
AddElement(/datum/element/mob_holder/micro, "micro")
|
||||
AddElement(/datum/element/flavor_text/carbon, "", "Flavor Text", "", MAX_FLAVOR_LEN, FALSE, TRUE, "flavor_text")
|
||||
AddElement(/datum/element/flavor_text, "", "Temporary Flavor Text", "This should be used only for things pertaining to the current round!")
|
||||
|
||||
/mob/living/carbon/human/Destroy()
|
||||
QDEL_NULL(physiology)
|
||||
|
||||
@@ -55,6 +55,11 @@
|
||||
diag_hud_set_status()
|
||||
diag_hud_set_health()
|
||||
|
||||
/mob/living/silicon/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/flavor_text, "", "Silicon Flavor Text", "", MAX_FLAVOR_LEN, FALSE, TRUE, "silicon_flavor_text")
|
||||
AddElement(/datum/element/flavor_text, "", "Temporary Flavor Text", "This should be used only for things pertaining to the current round!")
|
||||
|
||||
/mob/living/silicon/med_hud_set_health()
|
||||
return //we use a different hud
|
||||
|
||||
|
||||
@@ -525,13 +525,6 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
|
||||
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["flavor_change"])
|
||||
update_flavor_text()
|
||||
|
||||
if(href_list["refresh"])
|
||||
if(machine && in_range(src, usr))
|
||||
show_inv(machine)
|
||||
|
||||
@@ -129,9 +129,7 @@
|
||||
///Whether the mob is updating glide size when movespeed updates or not
|
||||
var/updating_glide_size = TRUE
|
||||
|
||||
var/flavor_text = ""
|
||||
var/ooc_text = ""
|
||||
var/flavor_text_2 = "" //version of the above that only lasts for the current round.
|
||||
|
||||
///////TYPING INDICATORS///////
|
||||
/// Set to true if we want to show typing indicators.
|
||||
|
||||
@@ -2,31 +2,6 @@
|
||||
////////////////////SUBTLE COMMAND////////////////////
|
||||
//////////////////////////////////////////////////////
|
||||
|
||||
/mob/proc/update_flavor_text()
|
||||
set src in usr
|
||||
if(usr != src)
|
||||
to_chat(usr, "No.")
|
||||
var/msg = stripped_multiline_input(usr, "Set the flavor text in your 'examine' verb. IC only!", "Flavor Text", html_decode(flavor_text), MAX_MESSAGE_LEN, TRUE)
|
||||
|
||||
if(msg)
|
||||
flavor_text = html_encode(msg)
|
||||
|
||||
flavor_text = msg
|
||||
|
||||
/mob/proc/warn_flavor_changed()
|
||||
if(flavor_text && flavor_text != "") // don't spam people that don't use it!
|
||||
to_chat(src, "<h2 class='alert'>OOC Warning:</h2>")
|
||||
to_chat(src, "<span class='alert'>Your flavor text is likely out of date! <a href='?src=[REF(src)];flavor_change=1'>Change</a></span>")
|
||||
|
||||
/mob/proc/print_flavor_text()
|
||||
if(flavor_text && flavor_text != "")
|
||||
// We are decoding and then encoding to not only get correct amount of characters, but also to prevent partial escaping characters being shown.
|
||||
var/msg = html_decode(replacetext(flavor_text, "\n", " "))
|
||||
if(length_char(msg) <= 40)
|
||||
return "<span class='notice'>[html_encode(msg)]</span>"
|
||||
else
|
||||
return "<span class='notice'>[html_encode(copytext_char(msg, 1, 37))]... <a href='?src=[REF(src)];flavor_more=1'>More...</span></a>"
|
||||
|
||||
/mob/proc/get_top_level_mob()
|
||||
if(istype(src.loc,/mob)&&src.loc!=src)
|
||||
var/mob/M=src.loc
|
||||
|
||||
Reference in New Issue
Block a user