From 1625d8248793b009df2e8cdba36669abf9801c55 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sat, 21 Jun 2014 16:58:20 -0400 Subject: [PATCH] IPCs actually take heat damage from temperature now Also fixes the healthanalyzer still not scanning IPCs properly (scanning them when it shouldn't) Conflicts: code/game/objects/items/devices/scanners.dm code/modules/mob/living/carbon/species.dm code/modules/mob/living/silicon/robot/component.dm --- code/game/objects/items/devices/scanners.dm | 12 +++ code/modules/mob/living/carbon/species.dm | 10 +-- .../mob/living/silicon/robot/component.dm | 78 +++++++++++++++++++ 3 files changed, 95 insertions(+), 5 deletions(-) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 95fb8cdec87..159a62fc4e8 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -102,6 +102,18 @@ REAGENT SCANNER usr << "\red You don't have the dexterity to do this!" return user.visible_message(" [user] has analyzed [M]'s vitals."," You have analyzed [M]'s vitals.") + + + if (!istype(M, /mob/living/carbon) || (ishuman(M) && (M:species.flags & IS_SYNTHETIC))) + //these sensors are designed for organic life + user.show_message("\blue Analyzing Results for ERROR:\n\t Overall Status: ERROR") + user.show_message("\t Key: Suffocation/Toxin/Burns/Brute", 1) + user.show_message("\t Damage Specifics: ? - ? - ? - ?") + user.show_message("\blue Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1) + user.show_message("\red Warning: Blood Level ERROR: --% --cl.\blue Type: ERROR") + user.show_message("\blue Subject's pulse: -- bpm.") + return + var/fake_oxy = max(rand(1,40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss()))) var/OX = M.getOxyLoss() > 50 ? "[M.getOxyLoss()]" : M.getOxyLoss() var/TX = M.getToxLoss() > 50 ? "[M.getToxLoss()]" : M.getToxLoss() diff --git a/code/modules/mob/living/carbon/species.dm b/code/modules/mob/living/carbon/species.dm index 47bf2a4fbe5..318d85ca542 100644 --- a/code/modules/mob/living/carbon/species.dm +++ b/code/modules/mob/living/carbon/species.dm @@ -413,17 +413,17 @@ burn_mod = 1.5 warning_low_pressure = 50 - hazard_low_pressure = 10 + hazard_low_pressure = 0 cold_level_1 = 50 cold_level_2 = -1 cold_level_3 = -1 - heat_level_1 = 2000 - heat_level_2 = 3000 - heat_level_3 = 4000 + heat_level_1 = 500 //gives them about 25 seconds in space before taking damage + heat_level_2 = 1000 + heat_level_3 = 2000 - synth_temp_gain = 6.7 //round(40 / BODYTEMP_COLD_DIVISOR, 0.1) //this should cause IPCs to stabilize at ~60 C in a 20 C environment. Based on some CPU operating temperatures + synth_temp_gain = 10 //this should cause IPCs to stabilize at ~80 C in a 20 C environment. flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | IS_SYNTHETIC | NO_INTORGANS diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index 6dd37c3c8e2..7d867036d5a 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -160,3 +160,81 @@ name = "radio" icon_state = "radio" +// +//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." + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT + throwforce = 3 + w_class = 2.0 + throw_speed = 5 + throw_range = 10 + origin_tech = "magnets=1;biotech=1" + var/mode = 1; + +/obj/item/device/robotanalyzer/attack(mob/living/M as mob, mob/living/user as mob) + if(( (M_CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) + user << text("\red You try to analyze the floor's vitals!") + for(var/mob/O in viewers(M, null)) + O.show_message(text("\red [user] has analyzed the floor's vitals!"), 1) + user.show_message(text("\blue Analyzing Results for The floor:\n\t Overall Status: Healthy"), 1) + user.show_message(text("\blue \t Damage Specifics: [0]-[0]-[0]-[0]"), 1) + user.show_message("\blue Key: Suffocation/Toxin/Burns/Brute", 1) + user.show_message("\blue Body Temperature: ???", 1) + return + if(!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") + user << "\red You don't have the dexterity to do this!" + return + if(!istype(M, /mob/living/silicon/robot) && !(ishuman(M) && (M:species.flags & IS_SYNTHETIC))) + user << "\red You can't analyze non-robotic things!" + return + + user.visible_message(" [user] has analyzed [M]'s components."," You have analyzed [M]'s components.") + var/BU = M.getFireLoss() > 50 ? "[M.getFireLoss()]" : M.getFireLoss() + var/BR = M.getBruteLoss() > 50 ? "[M.getBruteLoss()]" : M.getBruteLoss() + user.show_message("\blue 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("\blue Time of Disable: [M.tod]") + + if (istype(M, /mob/living/silicon/robot)) + var/mob/living/silicon/robot/H = M + var/list/damaged = H.get_damaged_components(1,1,1) + user.show_message("\blue Localized Damage:",1) + if(length(damaged)>0) + for(var/datum/robot_component/org in damaged) + user.show_message(text("\blue \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("\blue \t Components are OK.",1) + if(H.emagged && prob(5)) + user.show_message("\red \t ERROR: INTERNAL SYSTEMS COMPROMISED",1) + + if (ishuman(M) && (M:species.flags & IS_SYNTHETIC)) + var/mob/living/carbon/human/H = M + var/list/damaged = H.get_damaged_organs(1,1) + user.show_message("\blue Localized Damage, Brute/Electronics:",1) + if(length(damaged)>0) + for(var/datum/organ/external/org in damaged) + user.show_message(text("\blue \t []: [] - []", \ + capitalize(org.display_name), \ + (org.brute_dam > 0) ? "\red [org.brute_dam]" :0, \ + (org.burn_dam > 0) ? "[org.burn_dam]" :0),1) + else + user.show_message("\blue \t Components are OK.",1) + + user.show_message("\blue Operating Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1) + + src.add_fingerprint(user) + return