Files
GS13NG/code/modules/mob/living/silicon/robot/examine.dm
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

56 lines
2.0 KiB
Plaintext

/mob/living/silicon/robot/examine(mob/user)
var/msg = "<span class='info'>*---------*\nThis is [icon2html(src, user)] \a <EM>[src]</EM>!\n"
if(desc)
msg += "[desc]\n"
var/obj/act_module = get_active_held_item()
if(act_module)
msg += "It is holding [icon2html(act_module, user)] \a [act_module].\n"
msg += status_effect_examines()
msg += "<span class='warning'>"
if (src.getBruteLoss())
if (src.getBruteLoss() < maxHealth*0.5)
msg += "It looks slightly dented.\n"
else
msg += "<B>It looks severely dented!</B>\n"
if (getFireLoss() || getToxLoss())
var/overall_fireloss = getFireLoss() + getToxLoss()
if (overall_fireloss < maxHealth * 0.5)
msg += "It looks slightly charred.\n"
else
msg += "<B>It looks severely burnt and heat-warped!</B>\n"
if (src.health < -maxHealth*0.5)
msg += "It looks barely operational.\n"
if (src.fire_stacks < 0)
msg += "It's covered in water.\n"
else if (src.fire_stacks > 0)
msg += "It's coated in something flammable.\n"
msg += "</span>"
if(opened)
msg += "<span class='warning'>Its cover is open and the power cell is [cell ? "installed" : "missing"].</span>\n"
else
msg += "Its cover is closed[locked ? "" : ", and looks unlocked"].\n"
if(cell && cell.charge <= 0)
msg += "<span class='warning'>Its battery indicator is blinking red!</span>\n"
if(is_servant_of_ratvar(src) && get_dist(user, src) <= 1 && !stat) //To counter pseudo-stealth by using headlamps
msg += "<span class='warning'>Its eyes are glowing a blazing yellow!</span>\n"
switch(stat)
if(CONSCIOUS)
if(shell)
msg += "It appears to be an [deployed ? "active" : "empty"] AI shell.\n"
else if(!client)
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 like its system is corrupted and requires a reset.</span>\n"
msg += "*---------*</span>"
to_chat(user, msg)
..()
return msg