From 91be8af21ba0cfd3b812f9941ee1942ee78e5b7c Mon Sep 17 00:00:00 2001 From: CRUNCH <143041327+Fordoxia@users.noreply.github.com> Date: Tue, 12 Mar 2024 11:15:28 +0000 Subject: [PATCH] Renames "Cyborg Analyzer" to "Machine Analyzer", it now scans how damaged machines are too! (#24063) * Fixing some minor typos for cyborg upgrade flavour text Throws in some missing apostrophes, capitalisation, and the letter "s." * Briefcase Full of Cash buff Increases the amount of cash in the Syndicate Briefcase Full of Cash from 600 Cr to 1000 Cr * Reverts double-feature PR * Reverts a broken revert * Reverting again because Ebba told me to * And reverting yet again * Machine Analyzer Renamed "cyborg analyzer" to "machine analyzer". It now scans machines too. * Refactor Everything is now in scanners.dm yaaaay! * Update code/game/objects/items/devices/scanners.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * Update code/game/objects/items/devices/scanners.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * Update code/game/objects/items/devices/scanners.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * Helper proc woooo * Update code/game/objects/items/devices/scanners.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * Update code/game/objects/items/devices/scanners.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * renaming stuff * Update code/modules/research/designs/medical_designs.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/research/designs/medical_designs.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update scanners.dm * Update scanners.dm --------- Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> --- code/_onclick/observer_onclick.dm | 2 +- code/game/objects/items/devices/scanners.dm | 81 ++++++++++++++----- .../mob/living/silicon/robot/!robot_mob.dm | 2 +- .../research/designs/medical_designs.dm | 8 +- 4 files changed, 69 insertions(+), 24 deletions(-) diff --git a/code/_onclick/observer_onclick.dm b/code/_onclick/observer_onclick.dm index c36c8f07a3d..d0a20b1519e 100644 --- a/code/_onclick/observer_onclick.dm +++ b/code/_onclick/observer_onclick.dm @@ -81,7 +81,7 @@ if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_GHOST, user) & COMPONENT_CANCEL_ATTACK_CHAIN) return TRUE -// health + cyborg analyzer for ghosts +// health + machine analyzer for ghosts /mob/living/attack_ghost(mob/dead/observer/user) if(!istype(user)) // Make sure user is actually an observer. Revenents also use attack_ghost, but do not have the health_scan var. return diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index a0863cf15f9..c2d93a5cb98 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -1,13 +1,18 @@ /* CONTAINS: -T-RAY -DETECTIVE SCANNER +T-RAY SCANNER HEALTH ANALYZER -ROBOT ANALYZER +MACHINE ANALYZER GAS ANALYZER -PLANT ANALYZER -REAGENT SCANNER +REAGENT SCANNERS +BODY SCANNERS +SLIME SCANNER */ + +/******************************/ +/*** T-RAY SCANNER ***/ +/******************************/ + /obj/item/t_scanner name = "T-ray scanner" desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes." @@ -66,6 +71,10 @@ REAGENT SCANNER if(length(t_ray_images)) flick_overlay(t_ray_images, list(viewer.client), flick_time) +/******************************/ +/*** HEALTH ANALYZER ***/ +/******************************/ + /proc/get_chemscan_results(mob/living/user, mob/living/M) var/msgs = list() if(ishuman(M)) @@ -329,9 +338,13 @@ REAGENT SCANNER origin_tech = "magnets=2;biotech=2" usesound = 'sound/items/deconstruct.ogg' +/******************************/ +/*** MACHINE ANALYZER ***/ +/******************************/ + /obj/item/robotanalyzer - name = "cyborg analyzer" - desc = "A hand-held scanner able to diagnose robotic injuries." + name = "machine analyzer" + desc = "A hand-held scanner able to diagnose robotic injuries and the condition of machinery." icon = 'icons/obj/device.dmi' icon_state = "robotanalyzer" item_state = "analyzer" @@ -343,18 +356,36 @@ REAGENT SCANNER throw_range = 10 origin_tech = "magnets=1;biotech=1" -/obj/item/robotanalyzer/attack(mob/living/M, mob/living/user) - if((HAS_TRAIT(user, TRAIT_CLUMSY) || user.getBrainLoss() >= 60) && prob(50)) - var/list/msgs = list() - user.visible_message("[user] has analyzed the floor's components!", "You try to analyze the floor's vitals!") - msgs += "Analyzing Results for The floor:\n\t Overall Status: Unknown" - msgs += "\t Damage Specifics: [0]/Key: Burns/Brute" - msgs += "Chassis Temperature: ???" - to_chat(user, chat_box_healthscan(msgs.Join("
"))) - return +/obj/item/robotanalyzer/proc/handle_clumsy(mob/living/user) + var/list/msgs = list() + user.visible_message("[user] has analyzed the floor's components!", "You try to analyze the floor's vitals!") + msgs += "Analyzing Results for The floor:\n\t Overall Status: Unknown" + msgs += "\t Damage Specifics: [0]/Key: Burns/Brute" + msgs += "Chassis Temperature: ???" + to_chat(user, chat_box_healthscan(msgs.Join("
"))) - user.visible_message("[user] has analyzed [M]'s components.", "You have analyzed [M]'s components.") +/obj/item/robotanalyzer/attack_obj(obj/machinery/M, mob/living/user) // Scanning a machine object + if((HAS_TRAIT(user, TRAIT_CLUMSY) || user.getBrainLoss() >= 60) && prob(50)) + handle_clumsy(user) + return + user.visible_message("[user] has analyzed [M]'s components with [src].", "You analyze [M]'s components with [src].") + machine_scan(user, M) + add_fingerprint(user) + +/obj/item/robotanalyzer/proc/machine_scan(mob/user, obj/machinery/M) + if(M.obj_integrity == M.max_integrity) + to_chat(user, "[M] is at full integrity.") + return + to_chat(user, "Structural damage detected! [M]'s overall estimated integrity is [round((M.obj_integrity / M.max_integrity) * 100)]%.") + if(M.stat & BROKEN) // Displays alongside above message. Machines with a "broken" state do not become broken at 0% HP - anything that reaches that point is destroyed + to_chat(user, "Further analysis: Catastrophic component failure detected! [M] requires reconstruction to fully repair.") + +/obj/item/robotanalyzer/attack(mob/living/M, mob/living/user) // Scanning borgs, IPCs/augmented crew, and AIs + if((HAS_TRAIT(user, TRAIT_CLUMSY) || user.getBrainLoss() >= 60) && prob(50)) + handle_clumsy(user) + return + user.visible_message("[user] has analyzed [M]'s components with [src].", "You analyze [M]'s components with [src].") robot_healthscan(user, M) add_fingerprint(user) @@ -454,6 +485,10 @@ REAGENT SCANNER to_chat(user, chat_box_healthscan(msgs.Join("
"))) +/******************************/ +/*** GAS ANALYZER ***/ +/******************************/ + /obj/item/analyzer name = "analyzer" desc = "A hand-held environmental scanner which reports current gas levels." @@ -594,6 +629,10 @@ REAGENT SCANNER amount += inaccurate return DisplayTimeText(max(1, amount)) +/******************************/ +/*** REAGENT SCANNERS ***/ +/******************************/ + /obj/item/reagent_scanner name = "reagent scanner" desc = "A hand-held reagent scanner which identifies chemical agents and blood types." @@ -671,6 +710,9 @@ REAGENT SCANNER /obj/item/reagent_scanner/ui_action_click() print_report() +/******************************/ +/*** SLIME SCANNER ***/ +/******************************/ /obj/item/slime_scanner name = "slime scanner" icon = 'icons/obj/device.dmi' @@ -725,6 +767,9 @@ REAGENT SCANNER to_chat(user, "Progress in core mutation: [T.applied] / [SLIME_EXTRACT_CROSSING_REQUIRED]") to_chat(user, "========================") +/******************************/ +/*** BODY ANALYZERS ***/ +/******************************/ /obj/item/bodyanalyzer name = "handheld body analyzer" desc = "A handheld scanner capable of deep-scanning an entire body." diff --git a/code/modules/mob/living/silicon/robot/!robot_mob.dm b/code/modules/mob/living/silicon/robot/!robot_mob.dm index f59dac65db0..74a8e7d253d 100644 --- a/code/modules/mob/living/silicon/robot/!robot_mob.dm +++ b/code/modules/mob/living/silicon/robot/!robot_mob.dm @@ -1164,7 +1164,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( if(wiresexposed) wires.Interact(user) else - ..() //this calls the /mob/living/attack_ghost proc for the ghost health/cyborg analyzer + ..() //this calls the /mob/living/attack_ghost proc for the ghost health/machine analyzer /mob/living/silicon/robot/proc/allowed(obj/item/I) var/obj/dummy = new /obj(null) // Create a dummy object to check access on as to avoid having to snowflake check_access on every mob diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 4f9c1c4d4ba..f708fb27d93 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -32,10 +32,10 @@ build_path = /obj/item/reagent_containers/glass/beaker/noreact category = list("Medical") -/datum/design/cyborg_analyzer - name = "Cyborg Analyzer" - desc = "A hand-held scanner able to diagnose robotic injuries." - id = "cyborg_analyzer" +/datum/design/machine_analyzer + name = "Machine Analyzer" + desc = "A hand-held scanner able to diagnose robotic injuries and the condition of machinery." + id = "machine_analyzer" req_tech = list("programming" = 2, "biotech" = 2, "magnets" = 2) build_type = PROTOLATHE materials = list(MAT_METAL = 300, MAT_GLASS = 200)