From 4b1ee1eeb6e84f13ab5db4e6cb9b4679a9662a3f Mon Sep 17 00:00:00 2001 From: Granodd Date: Fri, 23 Nov 2018 19:48:18 -0500 Subject: [PATCH 1/3] Removing the mass spectrometer and replacing it with the reagent scanner. --- _maps/map_files/cyberiad/cyberiad.dmm | 2 +- code/game/asteroid.dm | 2 +- code/game/jobs/job/medical.dm | 2 +- code/game/objects/items/devices/scanners.dm | 120 +++--------------- .../chemistry/machinery/chem_dispenser.dm | 2 +- .../research/designs/medical_designs.dm | 19 --- 6 files changed, 23 insertions(+), 124 deletions(-) diff --git a/_maps/map_files/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm index 735d355d864..3dfad812d2d 100644 --- a/_maps/map_files/cyberiad/cyberiad.dmm +++ b/_maps/map_files/cyberiad/cyberiad.dmm @@ -2534,7 +2534,7 @@ "aWL" = (/obj/machinery/door/airlock{name = "Unisex Showers"; req_access_txt = "0"},/turf/simulated/floor/plasteel{icon_state = "freezerfloor"},/area/crew_quarters/toilet) "aWM" = (/obj/structure/window/reinforced{dir = 4},/obj/structure/table/reinforced,/obj/item/clothing/head/that{pixel_x = 4; pixel_y = 6},/obj/item/lighter/zippo,/turf/simulated/floor/plasteel{icon_state = "grimy"},/area/crew_quarters/bar) "aWN" = (/obj/structure/cable{icon_state = "0-2"; pixel_y = 1; d2 = 2},/obj/machinery/power/apc{dir = 1; name = "north bump"; pixel_x = 0; pixel_y = 24},/turf/simulated/floor/plasteel,/area/hallway/primary/central/ne) -"aWO" = (/obj/structure/table/glass,/obj/item/stack/packageWrap,/obj/item/mass_spectrometer/adv,/obj/machinery/light{dir = 1; in_use = 1},/obj/machinery/camera{c_tag = "Medbay Chemistry North"; network = list("SS13")},/obj/structure/extinguisher_cabinet{pixel_x = -5; pixel_y = 30},/turf/simulated/floor/plasteel{dir = 1; icon_state = "whiteyellow"},/area/medical/chemistry) +"aWO" = (/obj/structure/table/glass,/obj/item/stack/packageWrap,/obj/item/reagent_scanner/adv,/obj/machinery/light{dir = 1; in_use = 1},/obj/machinery/camera{c_tag = "Medbay Chemistry North"; network = list("SS13")},/obj/structure/extinguisher_cabinet{pixel_x = -5; pixel_y = 30},/turf/simulated/floor/plasteel{dir = 1; icon_state = "whiteyellow"},/area/medical/chemistry) "aWP" = (/obj/structure/disposalpipe/segment{dir = 4; icon_state = "pipe-c"},/turf/simulated/floor/wood,/area/crew_quarters/bar) "aWQ" = (/obj/machinery/light/small{dir = 8},/obj/item/storage/secure/safe{pixel_x = -22; pixel_y = 0},/turf/simulated/floor/wood,/area/crew_quarters/bar) "aWR" = (/obj/effect/decal/warning_stripes/north,/obj/machinery/chem_master,/obj/machinery/status_display{layer = 4; pixel_x = 0; pixel_y = 32},/turf/simulated/floor/plasteel,/area/medical/chemistry) diff --git a/code/game/asteroid.dm b/code/game/asteroid.dm index 9abe6c2bc92..c6edd09575e 100644 --- a/code/game/asteroid.dm +++ b/code/game/asteroid.dm @@ -63,7 +63,7 @@ var/global/max_secret_rooms = 6 treasureitems = list(/mob/living/simple_animal/bot/medbot/mysterious=1, /obj/item/circular_saw=1, /obj/structure/closet/critter/cat=2) fluffitems = list(/obj/effect/decal/cleanable/blood=5,/obj/item/organ/internal/appendix=2,/obj/structure/closet/crate/freezer=2, /obj/machinery/optable=1,/obj/item/scalpel=1,/obj/item/storage/firstaid/regular=3, - /obj/item/tank/anesthetic=1, /obj/item/surgical_drapes=2, /obj/item/mass_spectrometer/adv=1,/obj/item/clothing/glasses/hud/health=1) + /obj/item/tank/anesthetic=1, /obj/item/surgical_drapes=2, /obj/item/reagent_scanner/adv=1,/obj/item/clothing/glasses/hud/health=1) if("cult") theme = "cult" diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index d7bd9c1c4cb..cfb2de566ce 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -112,7 +112,7 @@ backpack_contents = list( /obj/item/clothing/head/surgery/black = 1, /obj/item/autopsy_scanner = 1, - /obj/item/mass_spectrometer = 1, + /obj/item/reagent_scanner = 1, /obj/item/storage/box/bodybags = 1) /datum/outfit/job/doctor/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index aece125c657..cf05ceb0bac 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -5,7 +5,6 @@ DETECTIVE SCANNER HEALTH ANALYZER GAS ANALYZER PLANT ANALYZER -MASS SPECTROMETER REAGENT SCANNER */ /obj/item/t_scanner @@ -432,95 +431,9 @@ REAGENT SCANNER amount += inaccurate return DisplayTimeText(max(1, amount)) -/obj/item/mass_spectrometer - desc = "A hand-held mass spectrometer which identifies trace chemicals in a blood sample. Inject sample with syringe." - name = "mass-spectrometer" - icon = 'icons/obj/device.dmi' - icon_state = "spectrometer" - item_state = "analyzer" - w_class = WEIGHT_CLASS_SMALL - flags = CONDUCT - container_type = OPENCONTAINER - slot_flags = SLOT_BELT - throwforce = 5 - throw_speed = 4 - throw_range = 20 - materials = list(MAT_METAL=150, MAT_GLASS=100) - origin_tech = "magnets=2;biotech=1;plasmatech=2" - var/details = 0 - var/datatoprint = "" - var/scanning = TRUE - actions_types = list(/datum/action/item_action/print_report) - -/obj/item/mass_spectrometer/New() - ..() - create_reagents(5) - -/obj/item/mass_spectrometer/on_reagent_change() - if(reagents.total_volume) - icon_state = initial(icon_state) + "_s" - else - icon_state = initial(icon_state) - -/obj/item/mass_spectrometer/attack_self(mob/user as mob) - if(user.stat) - return - if(!user.IsAdvancedToolUser()) - to_chat(user, "You don't have the dexterity to do this!") - return - if(reagents.total_volume) - var/list/blood_traces = list() - for(var/datum/reagent/R in reagents.reagent_list) - if(R.id != "blood") - to_chat(user, "The sample was contaminated! Please insert another sample.") - reagents.clear_reagents() - return - else - blood_traces = params2list(R.data["trace_chem"]) - break - var/dat = "" - for(var/R in blood_traces) - if(details) - dat += "[R] ([blood_traces[R]] units) " - else - dat += "[R] " - to_chat(user, "Analysis completed. Chemicals found: [dat]") - scanning = FALSE - datatoprint = dat - reagents.clear_reagents() - return - -/obj/item/mass_spectrometer/adv - name = "advanced mass-spectrometer" - icon_state = "adv_spectrometer" - details = 1 - origin_tech = "magnets=4;biotech=3;plasmatech=3" - -/obj/item/mass_spectrometer/proc/print_report() - if(!scanning) - scanning = TRUE - usr.visible_message("[src] rattles and prints out a sheet of paper.") - playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1) - sleep(50) - - var/obj/item/paper/P = new(get_turf(src)) - P.name = "Mass Spectrometer Scanner Report: [station_time_timestamp()]" - P.info = "
Mass Spectrometer

Data Analysis:



Trace chemicals detected:
[datatoprint]

" - - if(ismob(loc)) - var/mob/M = loc - M.put_in_hands(P) - to_chat(M, "Report printed. Log cleared.") - datatoprint = "" - else - to_chat(usr, "[src] has no logs or is already in use.") - -/obj/item/mass_spectrometer/ui_action_click() - print_report() - /obj/item/reagent_scanner name = "reagent scanner" - desc = "A hand-held reagent scanner which identifies chemical agents." + desc = "A hand-held reagent scanner which identifies chemical agents and blood types." icon = 'icons/obj/device.dmi' icon_state = "spectrometer" item_state = "analyzer" @@ -532,9 +445,9 @@ REAGENT SCANNER throw_range = 20 materials = list(MAT_METAL=30, MAT_GLASS=20) origin_tech = "magnets=2;biotech=1;plasmatech=2" - var/details = 0 + var/details = FALSE var/datatoprint = "" - var/scanning = 1 + var/scanning = TRUE actions_types = list(/datum/action/item_action/print_report) /obj/item/reagent_scanner/afterattack(obj/O, mob/user as mob) @@ -548,14 +461,19 @@ REAGENT SCANNER if(!isnull(O.reagents)) var/dat = "" + var/blood_type = "" if(O.reagents.reagent_list.len > 0) var/one_percent = O.reagents.total_volume / 100 for(var/datum/reagent/R in O.reagents.reagent_list) - dat += "
[TAB][R][details ? ": [R.volume / one_percent]%" : ""]" + if(R.id != "blood") + dat += "
[TAB][R][details ? ": [R.volume / one_percent]%" : ""]" + else + blood_type = R.data["blood_type"] + dat += "
[TAB][R][blood_type ? " [blood_type]" : ""][details ? ": [R.volume / one_percent]%" : ""]" if(dat) to_chat(user, "Chemicals found: [dat]") datatoprint = dat - scanning = 0 + scanning = FALSE else to_chat(user, "No active chemical agents found in [O].") else @@ -565,7 +483,7 @@ REAGENT SCANNER /obj/item/reagent_scanner/adv name = "advanced reagent scanner" icon_state = "adv_spectrometer" - details = 1 + details = TRUE origin_tech = "magnets=4;biotech=3;plasmatech=3" /obj/item/reagent_scanner/proc/print_report() @@ -583,7 +501,7 @@ REAGENT SCANNER M.put_in_hands(P) to_chat(M, "Report printed. Log cleared.") datatoprint = "" - scanning = 1 + scanning = TRUE else to_chat(usr, "[src] has no logs or is already in use.") @@ -673,7 +591,7 @@ REAGENT SCANNER icon_state = "bodyanalyzer_1" else icon_state = "bodyanalyzer_2" - + var/overlayid = round(percent / 10) overlayid = "bodyanalyzer_charge[overlayid]" overlays += icon(icon, overlayid) @@ -684,18 +602,18 @@ REAGENT SCANNER /obj/item/bodyanalyzer/attack(mob/living/M, mob/living/carbon/human/user) if(user.incapacitated() || !user.Adjacent(M)) return - + if(!ready) to_chat(user, "The scanner beeps angrily at you! It's currently recharging - [round((time_to_use - world.time) * 0.1)] seconds remaining.") playsound(user.loc, 'sound/machines/buzz-sigh.ogg', 50, 1) return - + if(power_supply.charge >= usecharge) mobScan(M, user) else to_chat(user, "The scanner beeps angrily at you! It's out of charge!") playsound(user.loc, 'sound/machines/buzz-sigh.ogg', 50, 1) - + /obj/item/bodyanalyzer/proc/mobScan(mob/living/M, mob/user) if(ishuman(M)) var/report = generate_printing_text(M, user) @@ -721,12 +639,12 @@ REAGENT SCANNER time_to_use = world.time + 600 else to_chat(user, "Scanning error detected. Invalid specimen.") - + //Unashamedly ripped from adv_med.dm /obj/item/bodyanalyzer/proc/generate_printing_text(mob/living/M, mob/user) var/dat = "" var/mob/living/carbon/human/target = M - + dat = "Target Statistics:
" var/t1 switch(target.stat) // obvious, see what their status is @@ -881,5 +799,5 @@ REAGENT SCANNER dat += "Photoreceptor abnormalities detected.
" if(target.disabilities & NEARSIGHTED) dat += "Retinal misalignment detected.
" - + return dat diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 88d7318e962..c838c5469c7 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -64,7 +64,7 @@ options[/obj/item/stock_parts/manipulator/pico] = "Upgrade to a pico manipulator to fix it." options[/obj/item/stock_parts/matter_bin/super] = "Give it a super matter bin to fix it." options[/obj/item/stock_parts/cell/super] = "Replace the reagent synthesizer with a super capacity cell to fix it." - options[/obj/item/mass_spectrometer/adv] = "Replace the reagent scanner with an advanced mass spectrometer to fix it" + options[/obj/item/reagent_scanner/adv] = "Replace the reagent scanner with an advanced reagent scanner to fix it" options[/obj/item/stock_parts/micro_laser/high] = "Repair the reagent synthesizer with an high-power micro-laser to fix it" options[/obj/item/reagent_scanner/adv] = "Replace the reagent scanner with an advanced reagent scanner to fix it" options[/obj/item/stack/nanopaste] = "Apply some nanopaste to the broken nozzles to fix it." diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index b5840d82265..ce98cdd4c1e 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -1,15 +1,6 @@ ///////////////////////////////////////// ////////////Medical Tools//////////////// ///////////////////////////////////////// -/datum/design/adv_mass_spectrometer - name = "Advanced Mass-Spectrometer" - desc = "A device for analyzing chemicals in the blood and their quantities." - id = "adv_mass_spectrometer" - req_tech = list("biotech" = 3, "magnets" = 4, "plasmatech" = 3) - build_type = PROTOLATHE - materials = list(MAT_METAL = 500, MAT_GLASS = 200) - build_path = "/obj/item/mass_spectrometer/adv" - category = list("Medical") /datum/design/adv_reagent_scanner name = "Advanced Reagent Scanner" @@ -93,16 +84,6 @@ build_path = /obj/item/mmi category = list("Misc","Medical") -/datum/design/mass_spectrometer - name = "Mass-Spectrometer" - desc = "A device for analyzing chemicals in the blood." - id = "mass_spectrometer" - req_tech = list("magnets" = 2, "plasmatech" = 2) - build_type = PROTOLATHE - materials = list(MAT_METAL = 300, MAT_GLASS = 100) - build_path = /obj/item/mass_spectrometer - category = list("Medical") - /datum/design/robotic_brain name = "Robotic Brain" desc = "The latest in non-sentient Artificial Intelligences." From 4b0cef8fb6da48a5d39f955038d62638e6e8f61e Mon Sep 17 00:00:00 2001 From: Granodd Date: Fri, 23 Nov 2018 20:10:06 -0500 Subject: [PATCH 2/3] Fixes map conflicts. --- _maps/map_files/RandomRuins/SpaceRuins/deepstorage.dmm | 3 +-- _maps/map_files/RandomZLevels/example.dmm | 2 +- _maps/map_files/RandomZLevels/stationCollision.dmm | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/deepstorage.dmm b/_maps/map_files/RandomRuins/SpaceRuins/deepstorage.dmm index 21cc056bbb4..f3f89b30c13 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/deepstorage.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/deepstorage.dmm @@ -37,7 +37,7 @@ "aK" = (/turf/simulated/floor/plasteel{icon_state = "freezerfloor"},/area/ruin/unpowered) "aL" = (/obj/machinery/light/small{dir = 4; pixel_y = -8},/turf/simulated/floor/plasteel{icon_state = "freezerfloor"},/area/ruin/unpowered) "aM" = (/obj/structure/table,/obj/item/clothing/gloves/combat,/obj/item/clothing/gloves/combat,/obj/item/clothing/mask/gas,/obj/item/clothing/mask/gas,/obj/item/clothing/mask/gas,/turf/simulated/floor/plasteel,/area/ruin/unpowered) -"aN" = (/obj/structure/table,/obj/item/mass_spectrometer/adv,/obj/item/mass_spectrometer/adv,/obj/item/healthanalyzer,/obj/item/healthanalyzer,/obj/item/stack/medical/bruise_pack,/obj/item/stack/medical/bruise_pack,/turf/simulated/floor/plasteel,/area/ruin/unpowered) +"aN" = (/obj/structure/table,/obj/item/reagent_scanner/adv,/obj/item/healthanalyzer,/obj/item/healthanalyzer,/obj/item/stack/medical/bruise_pack,/obj/item/stack/medical/bruise_pack,/turf/simulated/floor/plasteel,/area/ruin/unpowered) "aO" = (/obj/structure/closet/radiation,/obj/machinery/light{icon_state = "tube1"; dir = 8},/turf/simulated/floor/plasteel,/area/ruin/unpowered) "aP" = (/obj/structure/closet/cardboard,/obj/item/reagent_containers/food/drinks/cans/cola,/obj/item/reagent_containers/food/drinks/cans/cola,/obj/item/reagent_containers/food/drinks/cans/cola,/obj/item/reagent_containers/food/drinks/cans/cola,/obj/item/reagent_containers/food/drinks/cans/cola,/obj/machinery/light{dir = 4; icon_state = "tube1"},/turf/simulated/floor/plasteel,/area/ruin/unpowered) "aQ" = (/obj/structure/closet/wardrobe/pink,/turf/simulated/floor/wood{tag = "icon-wood-broken2"; icon_state = "wood-broken2"},/area/ruin/unpowered) @@ -177,4 +177,3 @@ aaaaaaaaaaaaaaaaaaaaaaabababababababababababababcececececeababababababababababab aaaaaaaaaaaaaaaaaaaaaaaaabababababababababababababcececececeababababababababaaaaaaababababababababababababababababababaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaababababababababcececececeababaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabababababababaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "} - diff --git a/_maps/map_files/RandomZLevels/example.dmm b/_maps/map_files/RandomZLevels/example.dmm index 9c72113a674..768d213c25e 100644 --- a/_maps/map_files/RandomZLevels/example.dmm +++ b/_maps/map_files/RandomZLevels/example.dmm @@ -54,7 +54,7 @@ "bb" = (/obj/structure/table,/obj/item/healthanalyzer,/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaymission/example) "bc" = (/obj/structure/bed,/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaymission/example) "bd" = (/obj/structure/chair/stool,/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaymission/example) -"be" = (/obj/structure/table,/obj/item/mass_spectrometer/adv,/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaymission/example) +"be" = (/obj/structure/table,/obj/item/reagent_scanner/adv,/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaymission/example) "bf" = (/obj/structure/table,/obj/item/reagent_containers/glass/beaker,/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaymission/example) "bg" = (/obj/structure/table,/obj/item/folder/white,/obj/item/pen/red,/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaymission/example) "bh" = (/obj/machinery/light,/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaymission/example) diff --git a/_maps/map_files/RandomZLevels/stationCollision.dmm b/_maps/map_files/RandomZLevels/stationCollision.dmm index 72a1a9ac6af..51d3038c5aa 100644 --- a/_maps/map_files/RandomZLevels/stationCollision.dmm +++ b/_maps/map_files/RandomZLevels/stationCollision.dmm @@ -283,7 +283,7 @@ "fw" = (/obj/machinery/r_n_d/circuit_imprinter,/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plasteel{icon_state = "showroomfloor"},/area/awaymission/research) "fx" = (/obj/machinery/r_n_d/protolathe,/turf/simulated/floor/plasteel{icon_state = "showroomfloor"},/area/awaymission/research) "fy" = (/obj/machinery/r_n_d/destructive_analyzer,/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plasteel{icon_state = "showroomfloor"},/area/awaymission/research) -"fz" = (/obj/structure/table,/obj/item/analyzer,/obj/item/mass_spectrometer{pixel_x = 5; pixel_y = 5},/turf/simulated/floor/plasteel{icon_state = "showroomfloor"},/area/awaymission/research) +"fz" = (/obj/structure/table,/obj/item/analyzer,/obj/item/reagent_scanner{pixel_x = 5; pixel_y = 5},/turf/simulated/floor/plasteel{icon_state = "showroomfloor"},/area/awaymission/research) "fA" = (/obj/effect/decal/remains/human{desc = "This guy seemed to have died in terrible way! Half his remains are dust."; icon_state = "remains"; name = "Syndicate agent remains"},/obj/item/ammo_casing/c10mm,/obj/item/paper/sc_safehint_paper_caf,/obj/item/clothing/under/syndicate,/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor/plasteel,/area/awaymission/midblock) "fB" = (/obj/structure/target_stake,/obj/item/grown/sunflower,/turf/simulated/floor/plasteel{icon_state = "showroomfloor"},/area/awaymission/research) "fC" = (/obj/effect/decal/remains/human{desc = "This guy seemed to have died in terrible way! Half his remains are dust."; icon_state = "remains"; name = "Syndicate agent remains"},/obj/item/ammo_casing/c10mm,/obj/item/clothing/under/syndicate,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/item/gun/projectile/shotgun/toy/tommygun,/turf/simulated/floor/plasteel,/area/awaymission/midblock) From 2cb99f51e4bf6661869d0b499c7f516355595913 Mon Sep 17 00:00:00 2001 From: Granodd Date: Fri, 23 Nov 2018 20:41:07 -0500 Subject: [PATCH 3/3] Adds blood identification to PDA scanners --- code/modules/pda/utilities.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/modules/pda/utilities.dm b/code/modules/pda/utilities.dm index a03a36e005a..4b2d02c33d4 100644 --- a/code/modules/pda/utilities.dm +++ b/code/modules/pda/utilities.dm @@ -109,8 +109,12 @@ if(A.reagents.reagent_list.len > 0) var/reagents_length = A.reagents.reagent_list.len to_chat(user, "[reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found.") - for(var/re in A.reagents.reagent_list) - to_chat(user, "\t [re]") + for(var/datum/reagent/R in A.reagents.reagent_list) + if(R.id != "blood") + to_chat(user, "\t [R]") + else + var/blood_type = R.data["blood_type"] + to_chat(user, "\t [R] [blood_type]") else to_chat(user, "No active chemical agents found in [A].") else