Rewrite examine() to pass a list around

This commit is contained in:
Aronai Sieyes
2020-04-29 16:42:50 -04:00
committed by VirgoBot
parent 8c5c0a7cfb
commit 6ebd249748
214 changed files with 2021 additions and 1120 deletions
+9 -13
View File
@@ -196,24 +196,20 @@
return //Doesn't do anything right now because none of the things that can be done to a regular MMI make any sense for these
/obj/item/device/mmi/digital/examine(mob/user)
if(!..(user))
return
var/msg = "<span class='info'>*---------*</span>\nThis is [bicon(src)] \a <EM>[src]</EM>!\n[desc]\n"
msg += "<span class='warning'>"
. = ..()
if(src.brainmob && src.brainmob.key)
switch(src.brainmob.stat)
if(CONSCIOUS)
if(!src.brainmob.client) msg += "It appears to be in stand-by mode.\n" //afk
if(UNCONSCIOUS) msg += "<span class='warning'>It doesn't seem to be responsive.</span>\n"
if(DEAD) msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
if(!src.brainmob.client)
. += "<span class='warning'>It appears to be in stand-by mode.</span>" //afk
if(UNCONSCIOUS)
. += "<span class='warning'>It doesn't seem to be responsive.</span>"
if(DEAD)
. += "<span class='deadsay'>It appears to be completely inactive.</span>"
else
msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
msg += "</span><span class='info'>*---------*</span>"
to_chat(user,msg)
return
. += "<span class='deadsay'>It appears to be completely inactive.</span>"
/obj/item/device/mmi/digital/emp_act(severity)
if(!src.brainmob)
return
@@ -85,25 +85,6 @@
M.show_message("<font color='blue'>The positronic brain buzzes and beeps, and the golden lights fade away. Perhaps you could try again?</font>")
playsound(src, 'sound/misc/buzzbeep.ogg', 50, 1)
/obj/item/device/mmi/digital/posibrain/examine(mob/user)
if(!..(user))
return
var/msg = "<span class='info'>*---------*</span>\nThis is [bicon(src)] \a <EM>[src]</EM>!\n[desc]\n"
msg += "<span class='warning'>"
if(src.brainmob && src.brainmob.key)
switch(src.brainmob.stat)
if(CONSCIOUS)
if(!src.brainmob.client) msg += "It appears to be in stand-by mode.\n" //afk
if(UNCONSCIOUS) msg += "<span class='warning'>It doesn't seem to be responsive.</span>\n"
if(DEAD) msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
else
msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
msg += "</span><span class='info'>*---------*</span>"
to_chat(user,msg)
return
/obj/item/device/mmi/digital/posibrain/emp_act(severity)
if(!src.brainmob)
return
+91 -84
View File
@@ -1,10 +1,11 @@
/mob/living/carbon/human/examine(mob/user)
// . = ..() //Note that we don't call parent. We build the list by ourselves.
var/skip_gear = 0
var/skip_body = 0
if(alpha <= EFFECTIVE_INVIS)
src.loc.examine(user)
return
return src.loc.examine(user) // Returns messages as if they examined wherever the human was
var/looks_synth = looksSynthetic()
@@ -75,12 +76,6 @@
BP_L_LEG = skip_body & EXAMINE_SKIPLEGS,
BP_R_LEG = skip_body & EXAMINE_SKIPLEGS)
var/list/msg = list("<span class='info'>*---------*<br>This is ")
msg += "[bicon(src)] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated
msg += "<EM>[src.name]</EM>"
var/datum/gender/T = gender_datums[get_visible_gender()]
if((skip_gear & EXAMINE_SKIPJUMPSUIT) && (skip_body & EXAMINE_SKIPFACE)) //big suits/masks/helmets make it hard to tell their gender
@@ -98,6 +93,7 @@
// Just in case someone VVs the gender to something strange. It'll runtime anyway when it hits usages, better to CRASH() now with a helpful message.
CRASH("Gender datum was null; key was '[((skip_gear & EXAMINE_SKIPJUMPSUIT) && (skip_body & EXAMINE_SKIPFACE)) ? PLURAL : gender]'")
var/name_ender = ""
if(!((skip_gear & EXAMINE_SKIPJUMPSUIT) && (skip_body & EXAMINE_SKIPFACE)))
//VOREStation Add Start
if(custom_species)
@@ -110,16 +106,12 @@
else if(gender == FEMALE)
use_gender = "a gynoid"
msg += ", <b><font color='#555555'>[use_gender]!</font></b>"
name_ender = ", <b><font color='#555555'>[use_gender]!</font></b>[species.get_additional_examine_text(src)]"
else if(species.name != "Human")
msg += ", <b><font color='[species.get_flesh_colour(src)]'>\a [species.get_examine_name()]!</font></b>"
name_ender = ", <b><font color='[species.get_flesh_colour(src)]'>\a [species.get_examine_name()]!</font></b>[species.get_additional_examine_text(src)]"
var/extra_species_text = species.get_additional_examine_text(src)
if(extra_species_text)
msg += "[extra_species_text]"
msg += "<br>"
var/list/msg = list("<span class='info'>*---------*","This is [bicon(src)] <EM>[src.name]</EM>[name_ender]")
//uniform
if(w_uniform && !(skip_gear & EXAMINE_SKIPJUMPSUIT) && w_uniform.show_examine)
@@ -142,16 +134,16 @@
tie_msg += " Attached to it is [english_list(accessories_visible)]."
if(w_uniform.blood_DNA)
msg += "<span class='warning'>[T.He] [T.is] wearing [bicon(w_uniform)] [w_uniform.gender==PLURAL?"some":"a"] [(w_uniform.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [w_uniform.name]![tie_msg]</span><br>"
msg += "<span class='warning'>[T.He] [T.is] wearing [bicon(w_uniform)] [w_uniform.gender==PLURAL?"some":"a"] [(w_uniform.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [w_uniform.name]![tie_msg]</span>"
else
msg += "[T.He] [T.is] wearing [bicon(w_uniform)] \a [w_uniform].[tie_msg]<br>"
msg += "[T.He] [T.is] wearing [bicon(w_uniform)] \a [w_uniform].[tie_msg]"
//head
if(head && !(skip_gear & EXAMINE_SKIPHELMET) && head.show_examine)
if(head.blood_DNA)
msg += "<span class='warning'>[T.He] [T.is] wearing [bicon(head)] [head.gender==PLURAL?"some":"a"] [(head.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [head.name] on [T.his] head!</span><br>"
msg += "<span class='warning'>[T.He] [T.is] wearing [bicon(head)] [head.gender==PLURAL?"some":"a"] [(head.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [head.name] on [T.his] head!</span>"
else
msg += "[T.He] [T.is] wearing [bicon(head)] \a [head] on [T.his] head.<br>"
msg += "[T.He] [T.is] wearing [bicon(head)] \a [head] on [T.his] head."
//suit/armour
if(wear_suit)
@@ -162,73 +154,73 @@
tie_msg += " Attached to it is [english_list(U.accessories)]."
if(wear_suit.blood_DNA)
msg += "<span class='warning'>[T.He] [T.is] wearing [bicon(wear_suit)] [wear_suit.gender==PLURAL?"some":"a"] [(wear_suit.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [wear_suit.name][tie_msg]!</span><br>"
msg += "<span class='warning'>[T.He] [T.is] wearing [bicon(wear_suit)] [wear_suit.gender==PLURAL?"some":"a"] [(wear_suit.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [wear_suit.name][tie_msg]!</span>"
else
msg += "[T.He] [T.is] wearing [bicon(wear_suit)] \a [wear_suit].[tie_msg]<br>"
msg += "[T.He] [T.is] wearing [bicon(wear_suit)] \a [wear_suit].[tie_msg]"
//suit/armour storage
if(s_store && !(skip_gear & EXAMINE_SKIPSUITSTORAGE) && s_store.show_examine)
if(s_store.blood_DNA)
msg += "<span class='warning'>[T.He] [T.is] carrying [bicon(s_store)] [s_store.gender==PLURAL?"some":"a"] [(s_store.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [s_store.name] on [T.his] [wear_suit.name]!</span><br>"
msg += "<span class='warning'>[T.He] [T.is] carrying [bicon(s_store)] [s_store.gender==PLURAL?"some":"a"] [(s_store.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [s_store.name] on [T.his] [wear_suit.name]!</span>"
else
msg += "[T.He] [T.is] carrying [bicon(s_store)] \a [s_store] on [T.his] [wear_suit.name].<br>"
msg += "[T.He] [T.is] carrying [bicon(s_store)] \a [s_store] on [T.his] [wear_suit.name]."
//back
if(back && !(skip_gear & EXAMINE_SKIPBACKPACK) && back.show_examine)
if(back.blood_DNA)
msg += "<span class='warning'>[T.He] [T.has] [bicon(back)] [back.gender==PLURAL?"some":"a"] [(back.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [back] on [T.his] back.</span><br>"
msg += "<span class='warning'>[T.He] [T.has] [bicon(back)] [back.gender==PLURAL?"some":"a"] [(back.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [back] on [T.his] back.</span>"
else
msg += "[T.He] [T.has] [bicon(back)] \a [back] on [T.his] back.<br>"
msg += "[T.He] [T.has] [bicon(back)] \a [back] on [T.his] back."
//left hand
if(l_hand && l_hand.show_examine)
if(l_hand.blood_DNA)
msg += "<span class='warning'>[T.He] [T.is] holding [bicon(l_hand)] [l_hand.gender==PLURAL?"some":"a"] [(l_hand.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [l_hand.name] in [T.his] left hand!</span><br>"
msg += "<span class='warning'>[T.He] [T.is] holding [bicon(l_hand)] [l_hand.gender==PLURAL?"some":"a"] [(l_hand.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [l_hand.name] in [T.his] left hand!</span>"
else
msg += "[T.He] [T.is] holding [bicon(l_hand)] \a [l_hand] in [T.his] left hand.<br>"
msg += "[T.He] [T.is] holding [bicon(l_hand)] \a [l_hand] in [T.his] left hand."
//right hand
if(r_hand && r_hand.show_examine)
if(r_hand.blood_DNA)
msg += "<span class='warning'>[T.He] [T.is] holding [bicon(r_hand)] [r_hand.gender==PLURAL?"some":"a"] [(r_hand.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [r_hand.name] in [T.his] right hand!</span><br>"
msg += "<span class='warning'>[T.He] [T.is] holding [bicon(r_hand)] [r_hand.gender==PLURAL?"some":"a"] [(r_hand.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [r_hand.name] in [T.his] right hand!</span>"
else
msg += "[T.He] [T.is] holding [bicon(r_hand)] \a [r_hand] in [T.his] right hand.<br>"
msg += "[T.He] [T.is] holding [bicon(r_hand)] \a [r_hand] in [T.his] right hand."
//gloves
if(gloves && !(skip_gear & EXAMINE_SKIPGLOVES) && gloves.show_examine)
if(gloves.blood_DNA)
msg += "<span class='warning'>[T.He] [T.has] [bicon(gloves)] [gloves.gender==PLURAL?"some":"a"] [(gloves.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [gloves.name] on [T.his] hands!</span><br>"
msg += "<span class='warning'>[T.He] [T.has] [bicon(gloves)] [gloves.gender==PLURAL?"some":"a"] [(gloves.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [gloves.name] on [T.his] hands!</span>"
else
msg += "[T.He] [T.has] [bicon(gloves)] \a [gloves] on [T.his] hands.<br>"
msg += "[T.He] [T.has] [bicon(gloves)] \a [gloves] on [T.his] hands."
else if(blood_DNA && !(skip_body & EXAMINE_SKIPHANDS))
msg += "<span class='warning'>[T.He] [T.has] [(hand_blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained hands!</span><br>"
msg += "<span class='warning'>[T.He] [T.has] [(hand_blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained hands!</span>"
//handcuffed?
if(handcuffed && handcuffed.show_examine)
if(istype(handcuffed, /obj/item/weapon/handcuffs/cable))
msg += "<span class='warning'>[T.He] [T.is] [bicon(handcuffed)] restrained with cable!</span><br>"
msg += "<span class='warning'>[T.He] [T.is] [bicon(handcuffed)] restrained with cable!</span>"
else
msg += "<span class='warning'>[T.He] [T.is] [bicon(handcuffed)] handcuffed!</span><br>"
msg += "<span class='warning'>[T.He] [T.is] [bicon(handcuffed)] handcuffed!</span>"
//buckled
if(buckled)
msg += "<span class='warning'>[T.He] [T.is] [bicon(buckled)] buckled to [buckled]!</span><br>"
msg += "<span class='warning'>[T.He] [T.is] [bicon(buckled)] buckled to [buckled]!</span>"
//belt
if(belt && !(skip_gear & EXAMINE_SKIPBELT) && belt.show_examine)
if(belt.blood_DNA)
msg += "<span class='warning'>[T.He] [T.has] [bicon(belt)] [belt.gender==PLURAL?"some":"a"] [(belt.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [belt.name] about [T.his] waist!</span><br>"
msg += "<span class='warning'>[T.He] [T.has] [bicon(belt)] [belt.gender==PLURAL?"some":"a"] [(belt.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [belt.name] about [T.his] waist!</span>"
else
msg += "[T.He] [T.has] [bicon(belt)] \a [belt] about [T.his] waist.<br>"
msg += "[T.He] [T.has] [bicon(belt)] \a [belt] about [T.his] waist."
//shoes
if(shoes && !(skip_gear & EXAMINE_SKIPSHOES) && shoes.show_examine)
if(shoes.blood_DNA)
msg += "<span class='warning'>[T.He] [T.is] wearing [bicon(shoes)] [shoes.gender==PLURAL?"some":"a"] [(shoes.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [shoes.name] on [T.his] feet!</span><br>"
msg += "<span class='warning'>[T.He] [T.is] wearing [bicon(shoes)] [shoes.gender==PLURAL?"some":"a"] [(shoes.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [shoes.name] on [T.his] feet!</span>"
else
msg += "[T.He] [T.is] wearing [bicon(shoes)] \a [shoes] on [T.his] feet.<br>"
msg += "[T.He] [T.is] wearing [bicon(shoes)] \a [shoes] on [T.his] feet."
else if(feet_blood_DNA && !(skip_body & EXAMINE_SKIPHANDS))
msg += "<span class='warning'>[T.He] [T.has] [(feet_blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained feet!</span><br>"
msg += "<span class='warning'>[T.He] [T.has] [(feet_blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained feet!</span>"
//mask
if(wear_mask && !(skip_gear & EXAMINE_SKIPMASK) && wear_mask.show_examine)
@@ -237,24 +229,24 @@
descriptor = "in [T.his] mouth"
if(wear_mask.blood_DNA)
msg += "<span class='warning'>[T.He] [T.has] [bicon(wear_mask)] [wear_mask.gender==PLURAL?"some":"a"] [(wear_mask.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [wear_mask.name] [descriptor]!</span><br>"
msg += "<span class='warning'>[T.He] [T.has] [bicon(wear_mask)] [wear_mask.gender==PLURAL?"some":"a"] [(wear_mask.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [wear_mask.name] [descriptor]!</span>"
else
msg += "[T.He] [T.has] [bicon(wear_mask)] \a [wear_mask] [descriptor].<br>"
msg += "[T.He] [T.has] [bicon(wear_mask)] \a [wear_mask] [descriptor]."
//eyes
if(glasses && !(skip_gear & EXAMINE_SKIPEYEWEAR) && glasses.show_examine)
if(glasses.blood_DNA)
msg += "<span class='warning'>[T.He] [T.has] [bicon(glasses)] [glasses.gender==PLURAL?"some":"a"] [(glasses.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [glasses] covering [T.his] eyes!</span><br>"
msg += "<span class='warning'>[T.He] [T.has] [bicon(glasses)] [glasses.gender==PLURAL?"some":"a"] [(glasses.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [glasses] covering [T.his] eyes!</span>"
else
msg += "[T.He] [T.has] [bicon(glasses)] \a [glasses] covering [T.his] eyes.<br>"
msg += "[T.He] [T.has] [bicon(glasses)] \a [glasses] covering [T.his] eyes."
//left ear
if(l_ear && !(skip_gear & EXAMINE_SKIPEARS) && l_ear.show_examine)
msg += "[T.He] [T.has] [bicon(l_ear)] \a [l_ear] on [T.his] left ear.<br>"
msg += "[T.He] [T.has] [bicon(l_ear)] \a [l_ear] on [T.his] left ear."
//right ear
if(r_ear && !(skip_gear & EXAMINE_SKIPEARS) && r_ear.show_examine)
msg += "[T.He] [T.has] [bicon(r_ear)] \a [r_ear] on [T.his] right ear.<br>"
msg += "[T.He] [T.has] [bicon(r_ear)] \a [r_ear] on [T.his] right ear."
//ID
if(wear_id && wear_id.show_examine)
@@ -266,27 +258,27 @@
var/obj/item/weapon/card/id/idcard = wear_id
id = idcard.registered_name
if(id && (id != real_name) && (get_dist(src, usr) <= 1) && prob(10))
msg += "<span class='warning'>[T.He] [T.is] wearing [bicon(wear_id)] \a [wear_id] yet something doesn't seem right...</span><br>"
msg += "<span class='warning'>[T.He] [T.is] wearing [bicon(wear_id)] \a [wear_id] yet something doesn't seem right...</span>"
else*/
msg += "[T.He] [T.is] wearing [bicon(wear_id)] \a [wear_id].<br>"
msg += "[T.He] [T.is] wearing [bicon(wear_id)] \a [wear_id]."
//Jitters
if(is_jittery)
if(jitteriness >= 300)
msg += "<span class='warning'><B>[T.He] [T.is] convulsing violently!</B></span><br>"
msg += "<span class='warning'><B>[T.He] [T.is] convulsing violently!</B></span>"
else if(jitteriness >= 200)
msg += "<span class='warning'>[T.He] [T.is] extremely jittery.</span><br>"
msg += "<span class='warning'>[T.He] [T.is] extremely jittery.</span>"
else if(jitteriness >= 100)
msg += "<span class='warning'>[T.He] [T.is] twitching ever so slightly.</span><br>"
msg += "<span class='warning'>[T.He] [T.is] twitching ever so slightly.</span>"
//splints
for(var/organ in BP_ALL)
var/obj/item/organ/external/o = get_organ(organ)
if(o && o.splinted && o.splinted.loc == o)
msg += "<span class='warning'>[T.He] [T.has] \a [o.splinted] on [T.his] [o.name]!</span><br>"
msg += "<span class='warning'>[T.He] [T.has] \a [o.splinted] on [T.his] [o.name]!</span>"
if(suiciding)
msg += "<span class='warning'>[T.He] appears to have commited suicide... there is no hope of recovery.</span><br>"
msg += "<span class='warning'>[T.He] appears to have commited suicide... there is no hope of recovery.</span>"
msg += attempt_vr(src,"examine_weight",args) //VOREStation Code
msg += attempt_vr(src,"examine_nutrition",args) //VOREStation Code
@@ -297,12 +289,12 @@
msg += attempt_vr(src,"examine_chimera",args) //VOREStation Code
if(mSmallsize in mutations)
msg += "[T.He] [T.is] very short!<br>"
msg += "[T.He] [T.is] very short!"
if (src.stat)
msg += "<span class='warning'>[T.He] [T.is]n't responding to anything around [T.him] and seems to be asleep.</span><br>"
msg += "<span class='warning'>[T.He] [T.is]n't responding to anything around [T.him] and seems to be asleep.</span>"
if((stat == 2 || src.losebreath) && get_dist(user, src) <= 3)
msg += "<span class='warning'>[T.He] [T.does] not appear to be breathing.</span><br>"
msg += "<span class='warning'>[T.He] [T.does] not appear to be breathing.</span>"
if(istype(user, /mob/living/carbon/human) && !user.stat && Adjacent(user))
user.visible_message("<b>[usr]</b> checks [src]'s pulse.", "You check [src]'s pulse.")
spawn(15)
@@ -313,15 +305,16 @@
to_chat(user, "<span class='deadsay'>[T.He] [T.has] a pulse!</span>")
if(fire_stacks)
msg += "[T.He] [T.is] covered in some liquid.<br>"
msg += "[T.He] [T.is] covered in some liquid."
if(on_fire)
msg += "<span class='warning'>[T.He] [T.is] on fire!.</span><br>"
msg += "<span class='warning'>[T.He] [T.is] on fire!.</span>"
var/ssd_msg = species.get_ssd(src)
if(ssd_msg && (!should_have_organ("brain") || has_brain()) && stat != DEAD)
if(!key)
msg += "<span class='deadsay'>[T.He] [T.is] [ssd_msg]. It doesn't look like [T.he] [T.is] waking up anytime soon.</span><br>"
msg += "<span class='deadsay'>[T.He] [T.is] [ssd_msg]. It doesn't look like [T.he] [T.is] waking up anytime soon.</span>"
else if(!client)
<<<<<<< HEAD
msg += "<span class='deadsay'>[T.He] [T.is] [ssd_msg].</span><br>"
//VOREStation Add Start
if(client && ((client.inactivity / 10) / 60 > 10)) //10 Minutes
@@ -329,6 +322,9 @@
else if(disconnect_time)
msg += "\[Disconnected/ghosted [round(((world.realtime - disconnect_time)/10)/60)] minutes ago\]\n"
//VOREStation Add End
=======
msg += "<span class='deadsay'>[T.He] [T.is] [ssd_msg].</span>"
>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038)
var/list/wound_flavor_text = list()
var/list/is_bleeding = list()
@@ -341,9 +337,9 @@
var/obj/item/organ/external/E = organs_by_name[organ_tag]
if(!E)
wound_flavor_text["[organ_descriptor]"] = "<span class='warning'><b>[T.He] [T.is] missing [T.his] [organ_descriptor].</b></span><br>"
wound_flavor_text["[organ_descriptor]"] = "<span class='warning'><b>[T.He] [T.is] missing [T.his] [organ_descriptor].</b></span>"
else if(E.is_stump())
wound_flavor_text["[organ_descriptor]"] = "<span class='warning'><b>[T.He] [T.has] a stump where [T.his] [organ_descriptor] should be.</b></span><br>"
wound_flavor_text["[organ_descriptor]"] = "<span class='warning'><b>[T.He] [T.has] a stump where [T.his] [organ_descriptor] should be.</b></span>"
else
continue
@@ -352,47 +348,51 @@
if((temp.organ_tag in hidden) && hidden[temp.organ_tag])
continue //Organ is hidden, don't talk about it
if(temp.status & ORGAN_DESTROYED)
wound_flavor_text["[temp.name]"] = "<span class='warning'><b>[T.He] [T.is] missing [T.his] [temp.name].</b></span><br>"
wound_flavor_text["[temp.name]"] = "<span class='warning'><b>[T.He] [T.is] missing [T.his] [temp.name].</b></span>"
continue
if(!looks_synth && temp.robotic == ORGAN_ROBOT)
if(!(temp.brute_dam + temp.burn_dam))
wound_flavor_text["[temp.name]"] = "[T.He] [T.has] a [temp.name].<br>"
wound_flavor_text["[temp.name]"] = "[T.He] [T.has] a [temp.name]."
else
wound_flavor_text["[temp.name]"] = "<span class='warning'>[T.He] [T.has] a [temp.name] with [temp.get_wounds_desc()]!</span><br>"
wound_flavor_text["[temp.name]"] = "<span class='warning'>[T.He] [T.has] a [temp.name] with [temp.get_wounds_desc()]!</span>"
continue
else if(temp.wounds.len > 0 || temp.open)
if(temp.is_stump() && temp.parent_organ && organs_by_name[temp.parent_organ])
var/obj/item/organ/external/parent = organs_by_name[temp.parent_organ]
wound_flavor_text["[temp.name]"] = "<span class='warning'>[T.He] has [temp.get_wounds_desc()] on [T.his] [parent.name].</span><br>"
wound_flavor_text["[temp.name]"] = "<span class='warning'>[T.He] has [temp.get_wounds_desc()] on [T.his] [parent.name].</span>"
else
wound_flavor_text["[temp.name]"] = "<span class='warning'>[T.He] has [temp.get_wounds_desc()] on [T.his] [temp.name].</span><br>"
wound_flavor_text["[temp.name]"] = "<span class='warning'>[T.He] has [temp.get_wounds_desc()] on [T.his] [temp.name].</span>"
else
wound_flavor_text["[temp.name]"] = ""
if(temp.dislocated == 2)
wound_flavor_text["[temp.name]"] += "<span class='warning'>[T.His] [temp.joint] is dislocated!</span><br>"
wound_flavor_text["[temp.name]"] += "<span class='warning'>[T.His] [temp.joint] is dislocated!</span>"
if(temp.brute_dam > temp.min_broken_damage || (temp.status & (ORGAN_BROKEN | ORGAN_MUTATED)))
wound_flavor_text["[temp.name]"] += "<span class='warning'>[T.His] [temp.name] is dented and swollen!</span><br>"
wound_flavor_text["[temp.name]"] += "<span class='warning'>[T.His] [temp.name] is dented and swollen!</span>"
if(temp.germ_level > INFECTION_LEVEL_TWO && !(temp.status & ORGAN_DEAD))
wound_flavor_text["[temp.name]"] += "<span class='warning'>[T.His] [temp.name] looks very infected!</span><br>"
wound_flavor_text["[temp.name]"] += "<span class='warning'>[T.His] [temp.name] looks very infected!</span>"
else if(temp.status & ORGAN_DEAD)
wound_flavor_text["[temp.name]"] += "<span class='warning'>[T.His] [temp.name] looks rotten!</span><br>"
wound_flavor_text["[temp.name]"] += "<span class='warning'>[T.His] [temp.name] looks rotten!</span>"
if(temp.status & ORGAN_BLEEDING)
is_bleeding["[temp.name]"] += "<span class='danger'>[T.His] [temp.name] is bleeding!</span><br>"
is_bleeding["[temp.name]"] += "<span class='danger'>[T.His] [temp.name] is bleeding!</span>"
if(temp.applied_pressure == src)
applying_pressure = "<span class='info'>[T.He] is applying pressure to [T.his] [temp.name].</span><br>"
applying_pressure = "<span class='info'>[T.He] is applying pressure to [T.his] [temp.name].</span>"
for(var/limb in wound_flavor_text)
msg += wound_flavor_text[limb]
var/flavor = wound_flavor_text[limb]
if(flavor)
msg += flavor
for(var/limb in is_bleeding)
msg += is_bleeding[limb]
var/blood = is_bleeding[limb]
if(blood)
msg += blood
for(var/implant in get_visible_implants(0))
msg += "<span class='danger'>[src] [T.has] \a [implant] sticking out of [T.his] flesh!</span><br>"
msg += "<span class='danger'>[src] [T.has] \a [implant] sticking out of [T.his] flesh!</span>"
if(digitalcamo)
msg += "[T.He] [T.is] repulsively uncanny!<br>"
msg += "[T.He] [T.is] repulsively uncanny!"
if(hasHUD(user,"security"))
var/perpname = name
@@ -410,8 +410,8 @@
if(R.fields["name"] == perpname)
criminal = R.fields["criminal"]
msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a><br>"
msg += "<span class = 'deptradio'>Security records:</span> <a href='?src=\ref[src];secrecord=`'>\[View\]</a> <a href='?src=\ref[src];secrecordadd=`'>\[Add comment\]</a><br>"
msg += "<span class='deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>"
msg += "<span class='deptradio'>Security records:</span> <a href='?src=\ref[src];secrecord=`'>\[View\]</a> <a href='?src=\ref[src];secrecordadd=`'>\[Add comment\]</a>"
if(hasHUD(user,"medical"))
var/perpname = name
@@ -429,13 +429,15 @@
if (R.fields["name"] == perpname)
medical = R.fields["p_stat"]
msg += "<span class = 'deptradio'>Physical status:</span> <a href='?src=\ref[src];medical=1'>\[[medical]\]</a><br>"
msg += "<span class = 'deptradio'>Medical records:</span> <a href='?src=\ref[src];medrecord=`'>\[View\]</a> <a href='?src=\ref[src];medrecordadd=`'>\[Add comment\]</a><br>"
msg += "<span class='deptradio'>Physical status:</span> <a href='?src=\ref[src];medical=1'>\[[medical]\]</a>"
msg += "<span class='deptradio'>Medical records:</span> <a href='?src=\ref[src];medrecord=`'>\[View\]</a> <a href='?src=\ref[src];medrecordadd=`'>\[Add comment\]</a>"
if(print_flavor_text())
msg += "[print_flavor_text()]<br>"
var/flavor_text = print_flavor_text()
if(flavor_text)
msg += "[flavor_text]"
<<<<<<< HEAD
// VOREStation Start
if(ooc_notes)
msg += "<span class = 'deptradio'>OOC Notes:</span> <a href='?src=\ref[src];ooc_notes=1'>\[View\]</a>\n"
@@ -445,6 +447,11 @@
// VOREStation End
msg += "*---------*</span><br>"
msg += applying_pressure
=======
msg += "*---------*</span>"
if(applying_pressure)
msg += applying_pressure
>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038)
var/show_descs = show_descriptors_to(user)
if(show_descs)
@@ -453,9 +460,9 @@
if(pose)
if(!findtext(pose, regex("\[.?!]$"))) // Will be zero if the last character is not a member of [.?!]
pose = addtext(pose,".") //Makes sure all emotes end with a period.
msg += "<br>[T.He] [pose]"
msg += "<br>[T.He] [pose]" //<br> intentional, extra gap.
to_chat(user, jointext(msg, null))
return msg
//Helper procedure. Called by /mob/living/carbon/human/examine() and /mob/living/carbon/human/Topic() to determine HUD access to security and medical records.
/proc/hasHUD(mob/M as mob, hudtype)
+17 -20
View File
@@ -1,42 +1,39 @@
/mob/living/silicon/ai/examine(mob/user)
if(!..(user))
return
. = ..()
var/msg = ""
if (src.stat == DEAD)
msg += "<span class='deadsay'>It appears to be powered-down.</span>\n"
. += "<span class='deadsay'>It appears to be powered-down.</span>"
else
msg += "<span class='warning'>"
if (src.getBruteLoss())
if (src.getBruteLoss() < 30)
msg += "It looks slightly dented.\n"
. += "<span class='warning'>It looks slightly dented.</span>"
else
msg += "<B>It looks severely dented!</B>\n"
. += "<span class='warning'><B>It looks severely dented!</B></span>"
if (src.getFireLoss())
if (src.getFireLoss() < 30)
msg += "It looks slightly charred.\n"
. += "<span class='warning'>It looks slightly charred.</span>"
else
msg += "<B>Its casing is melted and heat-warped!</B>\n"
. += "<span class='warning'><B>Its casing is melted and heat-warped!</B></span>"
if (src.getOxyLoss() && (aiRestorePowerRoutine != 0 && !APU_power))
if (src.getOxyLoss() > 175)
msg += "<B>It seems to be running on backup power. Its display is blinking a \"BACKUP POWER CRITICAL\" warning.</B>\n"
. += "<span class='warning'><B>It seems to be running on backup power. Its display is blinking a \"BACKUP POWER CRITICAL\" warning.</B></span>"
else if(src.getOxyLoss() > 100)
msg += "<B>It seems to be running on backup power. Its display is blinking a \"BACKUP POWER LOW\" warning.</B>\n"
. += "<span class='warning'><B>It seems to be running on backup power. Its display is blinking a \"BACKUP POWER LOW\" warning.</B></span>"
else
msg += "It seems to be running on backup power.\n"
. += "<span class='warning'>It seems to be running on backup power.</span>"
if (src.stat == UNCONSCIOUS)
msg += "It is non-responsive and displaying the text: \"RUNTIME: Sensory Overload, stack 26/3\".\n"
msg += "</span>"
. += "<span class='warning'>It is non-responsive and displaying the text: \"RUNTIME: Sensory Overload, stack 26/3\".</span>"
if(deployed_shell)
msg += "The wireless networking light is blinking.\n"
msg += "*---------*"
. += "The wireless networking light is blinking."
. += "*---------*"
if(hardware && (hardware.owner == src))
msg += "<br>"
msg += hardware.get_examine_desc()
to_chat(user,msg)
. += hardware.get_examine_desc()
user.showLaws(src)
return
/mob/proc/showLaws(var/mob/living/silicon/S)
return
+12 -7
View File
@@ -1,9 +1,9 @@
/mob/living/silicon/pai/examine(mob/user)
..(user, infix = ", personal AI")
. = ..(user, infix = ", personal AI")
var/msg = ""
switch(src.stat)
if(CONSCIOUS)
<<<<<<< HEAD
if(!src.client) msg += "\nIt appears to be in stand-by mode.\n" //afk
if(UNCONSCIOUS) msg += "\n<span class='warning'>It doesn't seem to be responding.</span>\n"
if(DEAD) msg += "\n<span class='deadsay'>It looks completely unsalvageable.</span>\n"
@@ -15,12 +15,17 @@
// VOREStation Edit: End
msg += "\n*---------*"
=======
if(!src.client) . += "It appears to be in stand-by mode." //afk
if(UNCONSCIOUS) . += "<span class='warning'>It doesn't seem to be responding.</span>"
if(DEAD) . += "<span class='deadsay'>It looks completely unsalvageable.</span>"
. += "*---------*"
>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038)
if(print_flavor_text()) msg += "\n[print_flavor_text()]\n"
if(print_flavor_text()) . += "\n[print_flavor_text()]\n"
if (pose)
if( findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0 )
if(!findtext(pose, regex("\[.?!]$"))) // Will be zero if the last character is not a member of [.?!]
pose = addtext(pose,".") //Makes sure all emotes end with a period.
msg += "\nIt is [pose]"
to_chat(user,msg)
. += "<br>It is [pose]" //Extra <br> intentional
@@ -29,10 +29,10 @@
var/force_holder = null //
/obj/item/weapon/gripper/examine(mob/user)
..()
. = ..()
if(wrapped)
to_chat(user, "<span class='notice'>\The [src] is holding \the [wrapped].</span>")
wrapped.examine(user)
. += "<span class='notice'>\The [src] is holding \the [wrapped].</span>"
. += wrapped.examine(user)
/obj/item/weapon/gripper/CtrlClick(mob/user)
drop_item()
@@ -63,9 +63,9 @@
visible_message("\The [src] voices a strident beep, indicating a drone chassis is prepared.")
/obj/machinery/drone_fabricator/examine(mob/user)
..(user)
. = ..()
if(produce_drones && drone_progress >= 100 && istype(user,/mob/observer/dead) && config.allow_drone_spawn && count_drones() < config.max_maint_drones)
to_chat(user, "<BR><B>A drone is prepared. Select 'Join As Drone' from the Ghost tab to spawn as a maintenance drone.</B>")
. += "<br><B>A drone is prepared. Select 'Join As Drone' from the Ghost tab to spawn as a maintenance drone.</B>"
/obj/machinery/drone_fabricator/proc/create_drone(var/client/player)
@@ -1,34 +1,32 @@
/mob/living/silicon/robot/examine(mob/user)
var/custom_infix = custom_name ? ", [modtype] [braintype]" : ""
..(user, infix = custom_infix)
. = ..(user, infix = custom_infix)
var/msg = ""
msg += "<span class='warning'>"
if (src.getBruteLoss())
if (src.getBruteLoss() < 75)
msg += "It looks slightly dented.\n"
. += "<span class='warning'>It looks slightly dented.</span>"
else
msg += "<B>It looks severely dented!</B>\n"
. += "<span class='warning'><B>It looks severely dented!</B></span>"
if (src.getFireLoss())
if (src.getFireLoss() < 75)
msg += "It looks slightly charred.\n"
. += "<span class='warning'>It looks slightly charred.</span>"
else
msg += "<B>It looks severely burnt and heat-warped!</B>\n"
msg += "</span>"
. += "<span class='warning'><B>It looks severely burnt and heat-warped!</B></span>"
if(opened)
msg += "<span class='warning'>Its cover is open and the power cell is [cell ? "installed" : "missing"].</span>\n"
. += "<span class='warning'>Its cover is open and the power cell is [cell ? "installed" : "missing"].</span>"
else
msg += "Its cover is closed.\n"
. += "Its cover is closed."
if(!has_power)
msg += "<span class='warning'>It appears to be running on backup power.</span>\n"
. += "<span class='warning'>It appears to be running on backup power.</span>"
switch(src.stat)
if(CONSCIOUS)
if(shell)
msg += "It appears to be an [deployed ? "active" : "empty"] AI shell.\n"
. += "It appears to be an [deployed ? "active" : "empty"] AI shell."
else if(!src.client)
<<<<<<< HEAD
msg += "It appears to be in stand-by mode.\n" //afk
if(UNCONSCIOUS) msg += "<span class='warning'>It doesn't seem to be responding.</span>\n"
if(DEAD) msg += "<span class='deadsay'>It looks completely unsalvageable.</span>\n"
@@ -40,14 +38,18 @@
// VOREStation Edit: End
msg += "*---------*"
=======
. += "It appears to be in stand-by mode." //afk
if(UNCONSCIOUS) . += "<span class='warning'>It doesn't seem to be responding.</span>"
if(DEAD) . += "<span class='deadsay'>It looks completely unsalvageable.</span>"
. += "*---------*"
>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038)
if(print_flavor_text()) msg += "\n[print_flavor_text()]\n"
if(print_flavor_text()) . += "<br>[print_flavor_text()]"
if (pose)
if( findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0 )
if(!findtext(pose, regex("\[.?!]$"))) // Will be zero if the last character is not a member of [.?!]
pose = addtext(pose,".") //Makes sure all emotes end with a period.
msg += "\nIt is [pose]"
. += "<br>It is [pose]" //Extra <br> intentional
to_chat(user,msg)
user.showLaws(src)
return
@@ -430,10 +430,9 @@
max_doors = 5
/obj/item/weapon/inflatable_dispenser/examine(var/mob/user)
if(!..(user))
return
to_chat(user, "It has [stored_walls] wall segment\s and [stored_doors] door segment\s stored.")
to_chat(user, "It is set to deploy [mode ? "doors" : "walls"]")
. = ..()
. += "It has [stored_walls] wall segment\s and [stored_doors] door segment\s stored."
. += "It is set to deploy [mode ? "doors" : "walls"]"
/obj/item/weapon/inflatable_dispenser/attack_self()
mode = !mode
@@ -1,3 +1,4 @@
<<<<<<< HEAD
// Parrots can talk, and may repeat things it hears.
/mob/living/simple_mob/animal/passive/bird/parrot
name = "parrot"
@@ -249,4 +250,257 @@
if(holder.stat || !holder.say_list || !message || speaker == holder)
return
var/datum/say_list/S = holder.say_list
=======
// Parrots can talk, and may repeat things it hears.
/mob/living/simple_mob/animal/passive/bird/parrot
name = "parrot"
description_info = "You can give it a headset by clicking on it with a headset. \
To remove it, click the bird while on grab intent."
has_langs = list("Galactic Common", "Bird")
ai_holder_type = /datum/ai_holder/simple_mob/passive/parrot
// A headset, so that talking parrots can yell at the crew over comms.
// If set to a type, on initialize it will be instantiated into that type.
var/obj/item/device/radio/headset/my_headset = null
// Say list
/datum/say_list/bird/poly
speak = list(
"Poly wanna cracker!",
"Check the singulo, you chucklefucks!",
"Wire the solars, you lazy bums!",
"WHO TOOK THE DAMN HARDSUITS?",
"OH GOD ITS FREE CALL THE SHUTTLE",
"Danger! Crystal hyperstructure instability!",
"CRYSTAL DELAMINATION IMMINENT.",
"Tweet tweet, I'm a Teshari.",
"Chitters.",
"Meteors have been detected on a collision course with the station!"
)
// Lets the AI use headsets.
// Player-controlled parrots will need to do it manually.
/mob/living/simple_mob/animal/passive/bird/parrot/ISay(message)
if(my_headset && prob(50))
var/list/keys = list()
for(var/channel in my_headset.channels)
var/key = get_radio_key_from_channel(channel)
if(key)
keys += key
if(keys.len)
var/key_used = pick(keys)
return say("[key_used] [message]")
return say(message)
// Ugly saycode so parrots can use their headsets.
/mob/living/simple_mob/animal/passive/bird/parrot/handle_message_mode(message_mode, message, verb, speaking, used_radios)
..()
if(message_mode)
if(my_headset && istype(my_headset, /obj/item/device/radio))
my_headset.talk_into(src, message, message_mode, verb, speaking)
used_radios += my_headset
// Clicked on while holding an object.
/mob/living/simple_mob/animal/passive/bird/parrot/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/device/radio/headset))
give_headset(I, user)
return
return ..()
// Clicked on by empty hand.
/mob/living/simple_mob/animal/passive/bird/parrot/attack_hand(mob/living/L)
if(L.a_intent == I_GRAB && my_headset)
remove_headset(L)
else
..()
/mob/living/simple_mob/animal/passive/bird/parrot/proc/give_headset(obj/item/device/radio/headset/new_headset, mob/living/user)
if(!istype(new_headset))
to_chat(user, span("warning", "\The [new_headset] isn't a headset."))
return
if(my_headset)
to_chat(user, span("warning", "\The [src] is already wearing \a [my_headset]."))
return
else
user.drop_item(new_headset)
my_headset = new_headset
new_headset.forceMove(src)
to_chat(user, span("warning", "You place \a [new_headset] on \the [src]. You monster."))
to_chat(src, span("notice", "\The [user] gives you \a [new_headset]. You should put it to good use immediately."))
return
/mob/living/simple_mob/animal/passive/bird/parrot/proc/remove_headset(mob/living/user)
if(!my_headset)
to_chat(user, "<span class='warning'>\The [src] doesn't have a headset to remove, thankfully.</span>")
else
ISay("BAWWWWWK LEAVE THE HEADSET BAWKKKKK!")
my_headset.forceMove(get_turf(src))
user.put_in_hands(my_headset)
to_chat(user, span("notice", "You take away \the [src]'s [my_headset.name]. Finally."))
to_chat(src, span("warning", "\The [user] takes your [my_headset.name] away! How cruel!"))
my_headset = null
/mob/living/simple_mob/animal/passive/bird/parrot/examine(mob/user)
. = ..()
if(my_headset)
. += "It is wearing \a [my_headset]."
/mob/living/simple_mob/animal/passive/bird/parrot/Initialize()
if(my_headset)
my_headset = new my_headset(src)
return ..()
// Subtypes.
// Best Bird
/mob/living/simple_mob/animal/passive/bird/parrot/poly
name = "Poly"
desc = "It's a parrot. An expert on quantum cracker theory."
icon_state = "poly"
icon_rest = "poly-held"
icon_dead = "poly-dead"
tt_desc = "E Ara macao"
my_headset = /obj/item/device/radio/headset/headset_eng
say_list_type = /datum/say_list/bird/poly
// Best Bird with best headset.
/mob/living/simple_mob/animal/passive/bird/parrot/poly/ultimate
my_headset = /obj/item/device/radio/headset/omni
/mob/living/simple_mob/animal/passive/bird/parrot/kea
name = "kea"
desc = "A species of parrot. On Earth, they are unique among other parrots for residing in alpine climates. \
They are known to be intelligent and curious, which has made some consider them a pest."
icon_state = "kea"
icon_rest = "kea-held"
icon_dead = "kea-dead"
tt_desc = "E Nestor notabilis"
/mob/living/simple_mob/animal/passive/bird/parrot/eclectus
name = "eclectus"
desc = "A species of parrot, this species features extreme sexual dimorphism in their plumage's colors. \
A male eclectus has emerald green plumage, where as a female eclectus has red and purple plumage."
icon_state = "eclectus"
icon_rest = "eclectus-held"
icon_dead = "eclectus-dead"
tt_desc = "E Eclectus roratus"
/mob/living/simple_mob/animal/passive/bird/parrot/eclectus/Initialize()
gender = pick(MALE, FEMALE)
if(gender == FEMALE)
icon_state = "eclectusf"
icon_rest = "eclectusf-held"
icon_dead = "eclectusf-dead"
return ..()
/mob/living/simple_mob/animal/passive/bird/parrot/grey_parrot
name = "grey parrot"
desc = "A species of parrot. This one is predominantly grey, but has red tail feathers."
icon_state = "agrey"
icon_rest = "agrey-held"
icon_dead = "agrey-dead"
tt_desc = "E Psittacus erithacus"
/mob/living/simple_mob/animal/passive/bird/parrot/black_headed_caique
name = "black-headed caique"
desc = "A species of parrot, these birds have a distinct black color on their heads, distinguishing them from their relative Caiques."
icon_state = "bcaique"
icon_rest = "bcaique-held"
icon_dead = "bcaique-dead"
tt_desc = "E Pionites melanocephalus"
/mob/living/simple_mob/animal/passive/bird/parrot/white_caique
name = "white-bellied caique"
desc = "A species of parrot, they are also known as the Green-Thighed Parrot."
icon_state = "wcaique"
icon_rest = "wcaique-held"
icon_dead = "wcaique-dead"
tt_desc = "E Pionites leucogaster"
/mob/living/simple_mob/animal/passive/bird/parrot/budgerigar
name = "budgerigar"
desc = "A species of parrot, they are also known as the common parakeet, or in some circles, the budgie. \
This one is has its natural colors of green and yellow."
icon_state = "gbudge"
icon_rest = "gbudge-held"
icon_dead = "gbudge-dead"
tt_desc = "E Melopsittacus undulatus"
/mob/living/simple_mob/animal/passive/bird/parrot/budgerigar/blue
icon_state = "bbudge"
icon_rest = "bbudge-held"
icon_dead = "bbudge-dead"
desc = "A species of parrot, they are also known as the common parakeet, or in some circles, the budgie. \
This one has a mutation which altered its color to be blue instead of green and yellow."
/mob/living/simple_mob/animal/passive/bird/parrot/budgerigar/bluegreen
icon_state = "bgbudge"
icon_rest = "bgbudge-held"
icon_dead = "bgbudge-dead"
desc = "A species of parrot, they are also known as the common parakeet, or in some circles, the budgie. \
This one has a mutation which altered its color to be a mix of blue and green."
/mob/living/simple_mob/animal/passive/bird/parrot/cockatiel
name = "cockatiel"
desc = "A species of parrot. This one has a highly visible crest."
icon_state = "tiel"
icon_rest = "tiel-held"
icon_dead = "tiel-dead"
tt_desc = "E Nymphicus hollandicus"
/mob/living/simple_mob/animal/passive/bird/parrot/cockatiel/white
icon_state = "wtiel"
icon_rest = "wtiel-held"
icon_dead = "wtiel-dead"
/mob/living/simple_mob/animal/passive/bird/parrot/cockatiel/yellowish
icon_state = "luttiel"
icon_rest = "luttiel-held"
icon_dead = "luttiel-dead"
/mob/living/simple_mob/animal/passive/bird/parrot/cockatiel/grey
icon_state = "blutiel" // idk why this is blu.
icon_rest = "blutiel-held"
icon_dead = "blutiel-dead"
// This actually might be the yellow-crested cockatoo but idk.
/mob/living/simple_mob/animal/passive/bird/parrot/sulphur_cockatoo
name = "sulphur-crested cockatoo"
desc = "A species of parrot. This one has an expressive yellow crest. Their underwing and tail feathers are also yellow."
icon_state = "too"
icon_rest = "too-held"
icon_dead = "too-dead"
tt_desc = "E Cacatua galerita"
// This was originally called 'hooded_too', which might not mean the unbrella cockatoo but idk.
/mob/living/simple_mob/animal/passive/bird/parrot/white_cockatoo
name = "white cockatoo"
desc = "A species of parrot. This one is also known as the Umbrella Cockatoo, due to the semicircular shape of its crest."
icon_state = "utoo"
icon_rest = "utoo-held"
icon_dead = "utoo-dead"
tt_desc = "E Cacatua alba"
/mob/living/simple_mob/animal/passive/bird/parrot/pink_cockatoo
name = "pink cockatoo"
desc = "A species of parrot. This one is also known as Major Mitchell's cockatoo, \
in honor of a human surveyor and explorer who existed before humans fully explored their home planet."
icon_state = "mtoo"
icon_rest = "mtoo-held"
icon_dead = "mtoo-dead"
tt_desc = "E Lophochroa leadbeateri"
// AI
/datum/ai_holder/simple_mob/passive/parrot
speak_chance = 2
base_wander_delay = 8
/datum/ai_holder/simple_mob/passive/parrot/on_hear_say(mob/living/speaker, message)
if(holder.stat || !holder.say_list || !message || speaker == holder)
return
var/datum/say_list/S = holder.say_list
>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038)
S.speak |= message
@@ -41,9 +41,9 @@
// this is to prevent easy checks from the opposing force.
/mob/living/simple_mob/illusion/examine(mob/user)
if(copying)
copying.examine(user)
return
..()
return copying.examine(user)
else
return list("???")
/mob/living/simple_mob/illusion/bullet_act(obj/item/projectile/P)
if(!P)
@@ -133,18 +133,13 @@
return ..()
/mob/living/simple_mob/construct/examine(mob/user)
..(user)
var/msg = "<span cass='info'>*---------*\nThis is [bicon(src)] \a <EM>[src]</EM>!\n"
if (src.health < src.getMaxHealth())
msg += "<span class='warning'>"
if (src.health >= src.getMaxHealth()/2)
msg += "It looks slightly dented.\n"
. = ..(user)
var/max = getMaxHealth()
if (health < max)
if (health >= max/2)
. += "<span class='warning'>It looks slightly dented.</span>"
else
msg += "<B>It looks severely dented!</B>\n"
msg += "</span>"
msg += "*---------*</span>"
to_chat(user,msg)
. += "<span class='warning'><B>It looks severely dented!</B></span>"
//Constructs levitate, can fall from a shuttle with no harm, and are piloted by either damned spirits or some otherworldly entity. Let 'em float in space.
/mob/living/simple_mob/construct/Process_Spacemove()
@@ -1,3 +1,4 @@
<<<<<<< HEAD
// These slimes have the mechanics xenobiologists care about, such as reproduction, mutating into new colors, and being able to submit through fear.
/mob/living/simple_mob/slime/xenobio
@@ -276,3 +277,283 @@
lines.Add(description_info)
return lines.Join("\n")
=======
// These slimes have the mechanics xenobiologists care about, such as reproduction, mutating into new colors, and being able to submit through fear.
/mob/living/simple_mob/slime/xenobio
desc = "The most basic of slimes. The grey slime has no remarkable qualities, however it remains one of the most useful colors for scientists."
layer = MOB_LAYER + 1 // Need them on top of other mobs or it looks weird when consuming something.
ai_holder_type = /datum/ai_holder/simple_mob/xenobio_slime // This should never be changed for xenobio slimes.
var/is_adult = FALSE // Slimes turn into adults when fed enough. Adult slimes are somewhat stronger, and can reproduce if fed enough.
var/maxHealth_adult = 200
var/power_charge = 0 // Disarm attacks can shock someone if high/lucky enough.
var/mob/living/victim = null // the person the slime is currently feeding on
var/rainbow_core_candidate = TRUE // If false, rainbow cores cannot make this type randomly.
var/mutation_chance = 25 // Odds of spawning as a new color when reproducing. Can be modified by certain xenobio products. Carried across generations of slimes.
var/list/slime_mutation = list(
/mob/living/simple_mob/slime/xenobio/orange,
/mob/living/simple_mob/slime/xenobio/metal,
/mob/living/simple_mob/slime/xenobio/blue,
/mob/living/simple_mob/slime/xenobio/purple
)
var/amount_grown = 0 // controls how long the slime has been overfed, if 10, grows or reproduces
var/number = 0 // This is used to make the slime semi-unique for indentification.
var/harmless = FALSE // Set to true when pacified. Makes the slime harmless, not get hungry, and not be able to grow/reproduce.
/mob/living/simple_mob/slime/xenobio/Initialize(mapload, var/mob/living/simple_mob/slime/xenobio/my_predecessor)
ASSERT(ispath(ai_holder_type, /datum/ai_holder/simple_mob/xenobio_slime))
number = rand(1, 1000)
update_name()
. = ..() // This will make the AI and do the other mob constructor things. It will also return the default hint at the end.
if(my_predecessor)
inherit_information(my_predecessor)
/mob/living/simple_mob/slime/xenobio/Destroy()
if(victim)
stop_consumption() // Unbuckle us from our victim.
return ..()
// Called when a slime makes another slime by splitting. The predecessor slime will be deleted shortly afterwards.
/mob/living/simple_mob/slime/xenobio/proc/inherit_information(var/mob/living/simple_mob/slime/xenobio/predecessor)
if(!predecessor)
return
var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder
var/datum/ai_holder/simple_mob/xenobio_slime/previous_AI = predecessor.ai_holder
ASSERT(istype(AI))
ASSERT(istype(previous_AI))
// Now to transfer the information.
// Newly made slimes are bit more rebellious than their predecessors, but they also somewhat forget the atrocities the xenobiologist may have done.
AI.discipline = max(previous_AI.discipline - 1, 0)
AI.obedience = max(previous_AI.obedience - 1, 0)
AI.resentment = max(previous_AI.resentment - 1, 0)
AI.rabid = previous_AI.rabid
/mob/living/simple_mob/slime/xenobio/update_icon()
icon_living = "[icon_state_override ? "[icon_state_override] slime" : "slime"] [is_adult ? "adult" : "baby"][victim ? " eating" : ""]"
icon_dead = "[icon_state_override ? "[icon_state_override] slime" : "slime"] [is_adult ? "adult" : "baby"] dead"
icon_rest = icon_dead
..() // This will apply the correct icon_state and do the other overlay-related things.
/mob/living/simple_mob/slime/xenobio/handle_special()
if(stat != DEAD)
handle_nutrition()
if(victim)
handle_consumption()
handle_stuttering() // ??
..()
/mob/living/simple_mob/slime/xenobio/examine(mob/user)
. = ..()
if(hat)
. += "It is wearing \a [hat]."
if(stat == DEAD)
. += "It appears to be dead."
else if(incapacitated(INCAPACITATION_DISABLED))
. += "It appears to be incapacitated."
else if(harmless)
. += "It appears to have been pacified."
else
if(has_AI())
var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder
if(AI.rabid)
. += "It seems very, very angry and upset."
else if(AI.obedience >= 5)
. += "It looks rather obedient."
else if(AI.discipline)
. += "It has been subjugated by force, at least for now."
/mob/living/simple_mob/slime/xenobio/proc/make_adult()
if(is_adult)
return
is_adult = TRUE
melee_damage_lower = round(melee_damage_lower * 2) // 20
melee_damage_upper = round(melee_damage_upper * 2) // 30
maxHealth = maxHealth_adult
amount_grown = 0
update_icon()
update_name()
/mob/living/simple_mob/slime/xenobio/proc/update_name()
if(harmless) // Docile slimes are generally named, so we shouldn't mess with it.
return
name = "[slime_color] [is_adult ? "adult" : "baby"] [initial(name)] ([number])"
real_name = name
/mob/living/simple_mob/slime/xenobio/update_mood()
var/old_mood = mood
if(incapacitated(INCAPACITATION_DISABLED))
mood = "sad"
else if(harmless)
mood = ":33"
else if(has_AI())
var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder
if(AI.rabid)
mood = "angry"
else if(AI.target)
mood = "mischevous"
else if(AI.discipline)
mood = "pout"
else
mood = ":3"
else
mood = ":3"
if(old_mood != mood)
update_icon()
/mob/living/simple_mob/slime/xenobio/proc/enrage()
if(harmless)
return
if(has_AI())
var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder
AI.enrage()
/mob/living/simple_mob/slime/xenobio/proc/pacify()
harmless = TRUE
if(has_AI())
var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder
AI.pacify()
faction = "neutral"
// If for whatever reason the mob AI (or player) decides to try to attack something anyways.
melee_damage_upper = 0
melee_damage_lower = 0
update_mood()
// These are verbs so that player slimes can evolve/split.
/mob/living/simple_mob/slime/xenobio/verb/evolve()
set category = "Slime"
set desc = "This will let you evolve from baby to adult slime."
if(stat)
to_chat(src, span("warning", "I must be conscious to do this..."))
return
if(harmless)
to_chat(src, span("warning", "I have been pacified. I cannot evolve..."))
return
if(!is_adult)
if(amount_grown >= 10)
make_adult()
else
to_chat(src, span("warning", "I am not ready to evolve yet..."))
else
to_chat(src, span("warning", "I have already evolved..."))
/mob/living/simple_mob/slime/xenobio/verb/reproduce()
set category = "Slime"
set desc = "This will make you split into four new slimes."
if(stat)
to_chat(src, span("warning", "I must be conscious to do this..."))
return
if(harmless)
to_chat(src, span("warning", "I have been pacified. I cannot reproduce..."))
return
if(is_adult)
if(amount_grown >= 10)
// Check if there's enough 'room' to split.
var/list/nearby_things = orange(1, src)
var/free_tiles = 0
for(var/turf/T in nearby_things)
var/free = TRUE
if(T.density) // No walls.
continue
for(var/atom/movable/AM in T)
if(AM.density)
free = FALSE
break
if(free)
free_tiles++
if(free_tiles < 3) // Three free tiles are needed, as four slimes are made and the 4th tile is from the center tile that the current slime occupies.
to_chat(src, span("warning", "It is too cramped here to reproduce..."))
return
var/list/babies = list()
for(var/i = 1 to 4)
babies.Add(make_new_slime())
var/mob/living/simple_mob/slime/new_slime = pick(babies)
new_slime.universal_speak = universal_speak
if(src.mind)
src.mind.transfer_to(new_slime)
else
new_slime.key = src.key
qdel(src)
else
to_chat(src, span("warning", "I am not ready to reproduce yet..."))
else
to_chat(src, span("warning", "I have not evolved enough to reproduce yet..."))
// Used when reproducing or dying.
/mob/living/simple_mob/slime/xenobio/proc/make_new_slime(var/desired_type)
var/t = src.type
if(desired_type)
t = desired_type
if(prob(mutation_chance / 10))
t = /mob/living/simple_mob/slime/xenobio/rainbow
else if(prob(mutation_chance) && slime_mutation.len)
t = slime_mutation[rand(1, slime_mutation.len)]
var/mob/living/simple_mob/slime/xenobio/baby = new t(loc, src)
// Handle 'inheriting' from parent slime.
baby.mutation_chance = mutation_chance
baby.power_charge = round(power_charge / 4)
if(!istype(baby, /mob/living/simple_mob/slime/xenobio/rainbow))
baby.unity = unity
baby.faction = faction
baby.friends = friends.Copy()
step_away(baby, src)
return baby
/mob/living/simple_mob/slime/xenobio/get_description_interaction()
var/list/results = list()
if(!stat)
results += "[desc_panel_image("slimebaton")]to stun the slime, if it's being bad."
results += ..()
return results
/mob/living/simple_mob/slime/xenobio/get_description_info()
var/list/lines = list()
var/intro_line = "Slimes are generally the test subjects of Xenobiology, with different colors having different properties. \
They can be extremely dangerous if not handled properly."
lines.Add(intro_line)
lines.Add(null) // To pad the line breaks.
var/list/rewards = list()
for(var/potential_color in slime_mutation)
var/mob/living/simple_mob/slime/S = potential_color
rewards.Add(initial(S.slime_color))
var/reward_line = "This color of slime can mutate into [english_list(rewards)] colors, when it reproduces. It will do so when it has eatten enough."
lines.Add(reward_line)
lines.Add(null)
lines.Add(description_info)
return lines.Join("\n")
>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038)
+4 -1
View File
@@ -237,7 +237,10 @@
return 1
face_atom(A)
A.examine(src)
var/list/results = A.examine(src)
if(!results || !results.len)
results = list("You were unable to examine that. Tell a developer!")
to_chat(src, jointext(results, "<br>"))
/mob/verb/pointed(atom/A as mob|obj|turf in view())
set name = "Point To"