Files
GS13NG/code/modules/mob/living/carbon/examine.dm
T
SailorDave 187fb97388 [READY] A few additions, tweaks, and fixes for integrated circuits (#36270)
* A few additions, tweaks, and fixes for integrated circuits, and some very minor tweaks to hydroponics and carbon/silicon examine() to support those changes.

🆑 SailorDave
rscadd: A new manipulation circuit, the Seed Extractor. Extracts seeds from produce, and outputs a list of the extracted seeds.
rscadd: A new list circuit, the List Filter. Searches through a list for anything matching the desired element and outputs two lists: one containing just the matches, and the other with matches filtered out.
rscadd: A new list circuit, the Set circuit. Removes duplicate entries from a list.
tweak: The Plant Manipulation circuit can now plant seeds, and outputs a list of harvested plants.
tweak: Reagent circuits can now irrigate connected hydroponic trays and inject blood samples into Replica pods.
tweak: The Examiner circuit outputs worn items and other examined details of carbon and silicon mobs into the description pin.
tweak: List Advanced Locator circuit now accepts refs as well as strings.
bugfix: Fixed the Power Transmitter circuit not properly displaying a message when activated.
bugfix: Medical Analyzer circuit can now properly scan non-human mobs.
/🆑

Additional details:
- Plant Manipulation: obj/item/seeds harvest() proc and obj/machinery/hydroponics attack_hand() procs were adjusted slightly to allow this, returning a list when harvested.

- Seed Extractor Module: obj/machinery/seed_extractor /proc/seedify() was adjusted to return a list of seeds.

- Hydroponics replica pod was adjusted to be injectable|drawable, and use reagents and on_reagent_change() rather than a hardcoded attackby(), so other injection methods can use it to allow blood sampling/future reagent reactions regardless of type.

- IC Examiner Module returns a list of examine() messages from mob/living/carbon, mob/living/carbon/human, mob/living/carbon/silicon, and mob/living/carbon/silicon/ai in the description data pin, rather than outputting null since they had an empty desc var. The relevant examine procs were adjusted to return their messages.

 - IC get_data() and set_pin_data() adjusted to return text/num properly and to WEAKREF/un-WEAKREF the contents of passed lists.

* fixes errors from screwy merge conflicts and replaces illegal proc name

* re-added a traits tag that accidentally got removed

* review changes

* plant analyzer outputs irrigation status and connected trays, search circuit uses 2 Cx down from 6

* examiner outputs the occupied turf of the examined object and can also scan turfs

* string inputs on circuit pins now use multiline input; fixed edit/remove not working on list pins; fixed large screens not outputting visible messages when held

* locomotion now has a cooldown of 0.1sec and their complexity + pathfinder complexity reduced

* assemblies can open doors they have access to from a card reader through collision

* Merge master branch; fixes pathfinder AStar runtime; fixes tile pointer; fixes material manager self-ref; various grammar touchups

* review changes

* fixes improper weakref type checking

* fixes seed extractor merge confict, removes unnecessary weakref change

* dang ol merge undoing my changes HECK

* updated to robbym's tile pointer PR with clearer var names

* added missing "not scanned" results to tile analyzer, removes duplicate circuit entries(???? how)
2018-04-22 02:31:10 -05:00

111 lines
3.7 KiB
Plaintext

/mob/living/carbon/examine(mob/user)
var/t_He = p_they(TRUE)
var/t_His = p_their(TRUE)
var/t_his = p_their()
var/t_him = p_them()
var/t_has = p_have()
var/t_is = p_are()
var/msg = "<span class='info'>*---------*\nThis is [icon2html(src, user)] \a <EM>[src]</EM>!\n"
if (handcuffed)
msg += "<span class='warning'>[t_He] [t_is] [icon2html(handcuffed, user)] handcuffed!</span>\n"
if (head)
msg += "[t_He] [t_is] wearing [head.get_examine_string(user)] on [t_his] head. \n"
if (wear_mask)
msg += "[t_He] [t_is] wearing [wear_mask.get_examine_string(user)] on [t_his] face.\n"
if (wear_neck)
msg += "[t_He] [t_is] wearing [wear_neck.get_examine_string(user)] around [t_his] neck.\n"
for(var/obj/item/I in held_items)
if(!(I.flags_1 & ABSTRACT_1))
msg += "[t_He] [t_is] holding [I.get_examine_string(user)] in [t_his] [get_held_index_name(get_held_index_of_item(I))].\n"
if (back)
msg += "[t_He] [t_has] [back.get_examine_string(user)] on [t_his] back.\n"
var/appears_dead = 0
if (stat == DEAD)
appears_dead = 1
if(getorgan(/obj/item/organ/brain))
msg += "<span class='deadsay'>[t_He] [t_is] limp and unresponsive, with no signs of life.</span>\n"
else if(get_bodypart(BODY_ZONE_HEAD))
msg += "<span class='deadsay'>It appears that [t_his] brain is missing...</span>\n"
var/list/missing = get_missing_limbs()
for(var/t in missing)
if(t==BODY_ZONE_HEAD)
msg += "<span class='deadsay'><B>[t_His] [parse_zone(t)] is missing!</B></span>\n"
continue
msg += "<span class='warning'><B>[t_His] [parse_zone(t)] is missing!</B></span>\n"
msg += "<span class='warning'>"
var/temp = getBruteLoss()
if(!(user == src && src.hal_screwyhud == SCREWYHUD_HEALTHY)) //fake healthy
if(temp)
if (temp < 25)
msg += "[t_He] [t_has] minor bruising.\n"
else if (temp < 50)
msg += "[t_He] [t_has] <b>moderate</b> bruising!\n"
else
msg += "<B>[t_He] [t_has] severe bruising!</B>\n"
temp = getFireLoss()
if(temp)
if (temp < 25)
msg += "[t_He] [t_has] minor burns.\n"
else if (temp < 50)
msg += "[t_He] [t_has] <b>moderate</b> burns!\n"
else
msg += "<B>[t_He] [t_has] severe burns!</B>\n"
temp = getCloneLoss()
if(temp)
if(temp < 25)
msg += "[t_He] [t_is] slightly deformed.\n"
else if (temp < 50)
msg += "[t_He] [t_is] <b>moderately</b> deformed!\n"
else
msg += "<b>[t_He] [t_is] severely deformed!</b>\n"
if(has_trait(TRAIT_DUMB))
msg += "[t_He] seem[p_s()] to be clumsy and unable to think.\n"
if(fire_stacks > 0)
msg += "[t_He] [t_is] covered in something flammable.\n"
if(fire_stacks < 0)
msg += "[t_He] look[p_s()] a little soaked.\n"
if(pulledby && pulledby.grab_state)
msg += "[t_He] [t_is] restrained by [pulledby]'s grip.\n"
msg += "</span>"
if(!appears_dead)
if(stat == UNCONSCIOUS)
msg += "[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.\n"
else if(InCritical())
msg += "[t_His] breathing is shallow and labored.\n"
if(digitalcamo)
msg += "[t_He] [t_is] moving [t_his] body in an unnatural and blatantly unsimian manner.\n"
GET_COMPONENT_FROM(mood, /datum/component/mood, src)
if(mood)
switch(mood.shown_mood)
if(-INFINITY to MOOD_LEVEL_SAD4)
msg += "[t_He] look[p_s()] depressed.\n"
if(MOOD_LEVEL_SAD4 to MOOD_LEVEL_SAD3)
msg += "[t_He] look[p_s()] very sad.\n"
if(MOOD_LEVEL_SAD3 to MOOD_LEVEL_SAD2)
msg += "[t_He] look[p_s()] a bit down.\n"
if(MOOD_LEVEL_HAPPY2 to MOOD_LEVEL_HAPPY3)
msg += "[t_He] look[p_s()] quite happy.\n"
if(MOOD_LEVEL_HAPPY3 to MOOD_LEVEL_HAPPY4)
msg += "[t_He] look[p_s()] very happy.\n"
if(MOOD_LEVEL_HAPPY4 to INFINITY)
msg += "[t_He] look[p_s()] ecstatic.\n"
msg += "*---------*</span>"
to_chat(user, msg)
return msg