From e69be973f0d5ad4f0d00ef6cd0cc9ede1821c93b Mon Sep 17 00:00:00 2001 From: "C.L" Date: Thu, 11 Aug 2022 05:50:22 -0400 Subject: [PATCH 1/3] Medsensor borgs can analyze patients in their belly. --- .../mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm index 97af632c946..65d0fb4d846 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm @@ -42,6 +42,7 @@ var/digest_multiplier = 1 var/recycles = FALSE var/medsensor = TRUE //Does belly sprite come with patient ok/dead light? + var/obj/item/device/healthanalyzer/med_analyzer = new /obj/item/device/healthanalyzer //Used for detailed analysis /obj/item/device/dogborg/sleeper/New() ..() @@ -216,6 +217,8 @@ dat += "Eject port: [eject_port]" if(!cleaning) dat += "Self-Clean" + if(medsensor) + dat += "Analyze Patient" else dat += "Self-Clean" if(delivery) @@ -336,6 +339,8 @@ if(cleaning) sleeperUI(usr) return + if(href_list["analyze"]) //DO HEALTH ANALYZER STUFF HERE. + med_analyzer.scan_mob(patient,hound) if(href_list["port"]) switch(eject_port) if("ingestion") From 78aa0c952dfa6ead3c96a20552b88ccca073560a Mon Sep 17 00:00:00 2001 From: "C.L" Date: Thu, 11 Aug 2022 05:59:39 -0400 Subject: [PATCH 2/3] Small improvement --- .../modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm index 65d0fb4d846..5fa8288498d 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm @@ -42,12 +42,13 @@ var/digest_multiplier = 1 var/recycles = FALSE var/medsensor = TRUE //Does belly sprite come with patient ok/dead light? - var/obj/item/device/healthanalyzer/med_analyzer = new /obj/item/device/healthanalyzer //Used for detailed analysis + var/obj/item/device/healthanalyzer/med_analyzer = null /obj/item/device/dogborg/sleeper/New() ..() flags |= NOBLUDGEON //No more attack messages files = new /datum/research/techonly(src) + med_analyzer = new /obj/item/device/healthanalyzer /obj/item/device/dogborg/sleeper/Destroy() go_out() From 947c45f96648bff0d887959df6eb176a35fc52d8 Mon Sep 17 00:00:00 2001 From: "C.L" Date: Thu, 11 Aug 2022 06:25:53 -0400 Subject: [PATCH 3/3] Adds a check to make sure dogoborgs have materials. Ran into a few runtimes https://i.imgur.com/qZdZGRq.png while eating things. Found out that if a borg that doesn't have a material (i.e. boozehound) eats something that has a material, it causes runtimes. This fixes that by making sure they actually have the material and it isn't just null. --- .../silicon/robot/dogborg/dog_sleeper_vr.dm | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm index 5fa8288498d..c9493ae8f48 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm @@ -554,7 +554,8 @@ var/actual_burn = T.getFireLoss() - old_burn var/damage_gain = actual_brute + actual_burn drain(-25 * damage_gain) //25*total loss as with voreorgan stats. - water.add_charge(damage_gain) + if(water) + water.add_charge(damage_gain) if(T.stat == DEAD) if(ishuman(T)) message_admins("[key_name(hound)] has digested [key_name(T)] as a dogborg. ([hound ? "JMP" : "null"])") @@ -591,10 +592,12 @@ if(ishuman(T)) var/mob/living/carbon/human/Prey = T volume = (Prey.bloodstr.total_volume + Prey.ingested.total_volume + Prey.touching.total_volume + Prey.weight) * Prey.size_multiplier - water.add_charge(volume) + if(water) + water.add_charge(volume) if(T.reagents) volume = T.reagents.total_volume - water.add_charge(volume) + if(water) + water.add_charge(volume) if(patient == T) patient_laststat = null patient = null @@ -618,7 +621,7 @@ for(var/tech in tech_item.origin_tech) files.UpdateTech(tech, tech_item.origin_tech[tech]) synced = FALSE - if(volume) + if(volume && water) water.add_charge(volume) if(recycles && T.matter) for(var/material in T.matter) @@ -626,14 +629,14 @@ if(istype(T,/obj/item/stack)) var/obj/item/stack/stack = T total_material *= stack.get_amount() - if(material == MAT_STEEL) + if(material == MAT_STEEL && metal) metal.add_charge(total_material) - if(material == "glass") + if(material == "glass" && glass) glass.add_charge(total_material) if(decompiler) - if(material == "plastic") + if(material == "plastic" && plastic) plastic.add_charge(total_material) - if(material == "wood") + if(material == "wood" && wood) wood.add_charge(total_material) drain(-50 * digested) else if(istype(target,/obj/effect/decal/remains))