// //Robotic Component Analyser, basically a health analyser for robots // /obj/item/device/robotanalyzer name = "cyborg analyzer" icon_state = "robotanalyzer" item_state = "analyzer" desc = "A hand-held scanner able to diagnose robotic injuries." slot_flags = SLOT_BELT throwforce = 3 w_class = ITEMSIZE_SMALL throw_speed = 5 throw_range = 10 origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 1, TECH_ENGINEERING = 2) matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 200) var/mode = 1; /obj/item/device/robotanalyzer/attack(mob/living/M as mob, mob/living/user as mob) do_scan(M, user) /obj/item/device/robotanalyzer/proc/do_scan(mob/living/M as mob, mob/living/user as mob) if((CLUMSY in user.mutations) && prob(50)) to_chat(user, "You try to analyze the floor's vitals!") for(var/mob/O in viewers(M, null)) O.show_message(text("[user] has analyzed the floor's vitals!"), 1) user.show_message(text("Analyzing Results for The floor:\n\t Overall Status: Healthy"), 1) user.show_message(text("\t Damage Specifics: [0]-[0]-[0]-[0]"), 1) user.show_message("Key: Suffocation/Toxin/Burns/Brute", 1) user.show_message("Body Temperature: ???", 1) return var/scan_type if(istype(M, /mob/living/silicon/robot)) scan_type = "robot" else if(istype(M, /mob/living/carbon/human)) scan_type = "prosthetics" else to_chat(user, "You can't analyze non-robotic things!") return user.visible_message("\The [user] has analyzed [M]'s components.","You have analyzed [M]'s components.") switch(scan_type) if("robot") var/BU = M.getFireLoss() > 50 ? "[M.getFireLoss()]" : M.getFireLoss() var/BR = M.getBruteLoss() > 50 ? "[M.getBruteLoss()]" : M.getBruteLoss() user.show_message("Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "fully disabled" : "[M.health - M.halloss]% functional"]") user.show_message("\t Key: Electronics/Brute", 1) user.show_message("\t Damage Specifics: [BU] - [BR]") if(M.tod && M.stat == DEAD) user.show_message("Time of Disable: [M.tod]") var/mob/living/silicon/robot/H = M var/list/damaged = H.get_damaged_components(1,1,1) user.show_message("Localized Damage:",1) if(length(damaged)>0) for(var/datum/robot_component/org in damaged) user.show_message(text("\t []: [][] - [] - [] - []", \ capitalize(org.name), \ (org.installed == -1) ? "DESTROYED " :"",\ (org.electronics_damage > 0) ? "[org.electronics_damage]" :0, \ (org.brute_damage > 0) ? "[org.brute_damage]" :0, \ (org.toggled) ? "Toggled ON" : "Toggled OFF",\ (org.powered) ? "Power ON" : "Power OFF"),1) else user.show_message("\t Components are OK.",1) if(H.emagged && prob(5)) user.show_message("\t ERROR: INTERNAL SYSTEMS COMPROMISED",1) user.show_message("Operating Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1) if("prosthetics") var/mob/living/carbon/human/H = M to_chat(user, "Analyzing Results for \the [H]:") if(H.isSynthetic()) to_chat(user, "System instability: [H.getToxLoss()]") to_chat(user, "Key: Electronics/Brute") to_chat(user, "External prosthetics:") var/organ_found if(H.internal_organs.len) for(var/obj/item/organ/external/E in H.organs) if(!(E.robotic >= ORGAN_ROBOT)) continue organ_found = 1 to_chat(user, "[E.name]: [E.brute_dam] [E.burn_dam]") if(!organ_found) to_chat(user, "No prosthetics located.") to_chat(user, "