From 0c2c0295377d3c6ad1371ac629feb826d20552d1 Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Fri, 16 Mar 2018 19:51:46 -0400 Subject: [PATCH] POLARIS: Fix incorrect robolimb checks --- code/game/machinery/adv_med.dm | 4 ++-- code/game/machinery/kitchen/cooking_machines/fryer.dm | 4 ++-- code/modules/mob/living/bot/farmbot.dm | 2 +- code/modules/mob/living/bot/medbot.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 5 ++++- code/modules/mob/living/carbon/human/human_defense.dm | 2 +- code/modules/virus2/effect.dm | 4 ++-- 7 files changed, 13 insertions(+), 10 deletions(-) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 8190d79fd0..121082c008 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -347,7 +347,7 @@ organStatus["destroyed"] = 1 if(E.status & ORGAN_BROKEN) organStatus["broken"] = E.broken_description - if(E.status & ORGAN_ROBOT) + if(E.robotic >= ORGAN_ROBOT) organStatus["robotic"] = 1 if(E.splinted) organStatus["splinted"] = 1 @@ -516,7 +516,7 @@ bled = "Bleeding:" if(e.status & ORGAN_BROKEN) AN = "[e.broken_description]:" - if(e.status & ORGAN_ROBOT) + if(e.robotic >= ORGAN_ROBOT) robot = "Prosthetic:" if(e.status & ORGAN_DEAD) o_dead = "Necrotic:" diff --git a/code/game/machinery/kitchen/cooking_machines/fryer.dm b/code/game/machinery/kitchen/cooking_machines/fryer.dm index 7e5cc055e8..451f84c2ff 100644 --- a/code/game/machinery/kitchen/cooking_machines/fryer.dm +++ b/code/game/machinery/kitchen/cooking_machines/fryer.dm @@ -36,7 +36,7 @@ if(H.species.flags & NO_PAIN) nopain = 2 E = H.get_organ(user.zone_sel.selecting) - if(E.status & ORGAN_ROBOT) + if(E.robotic >= ORGAN_ROBOT) nopain = 1 user.visible_message("\The [user] shoves \the [victim][E ? "'s [E.name]" : ""] into \the [src]!") @@ -45,7 +45,7 @@ E.take_damage(0, rand(20,30)) if(E.children && E.children.len) for(var/obj/item/organ/external/child in E.children) - if(nopain && nopain < 2 && !(child.status & ORGAN_ROBOT)) + if(nopain && nopain < 2 && !(child.robotic >= ORGAN_ROBOT)) nopain = 0 child.take_damage(0, rand(20,30)) else diff --git a/code/modules/mob/living/bot/farmbot.dm b/code/modules/mob/living/bot/farmbot.dm index c972ebe08e..fef17bb5ee 100644 --- a/code/modules/mob/living/bot/farmbot.dm +++ b/code/modules/mob/living/bot/farmbot.dm @@ -343,7 +343,7 @@ new /obj/item/weapon/farmbot_arm_assembly(loc, src) /obj/structure/reagent_dispensers/watertank/attackby(var/obj/item/organ/external/S, mob/user as mob) - if ((!istype(S, /obj/item/organ/external/arm)) || (!S.robotic == ORGAN_ROBOT)) + if ((!istype(S, /obj/item/organ/external/arm)) || S.robotic != ORGAN_ROBOT) ..() return diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm index 29e9cd0a9b..0e35d6b2b0 100644 --- a/code/modules/mob/living/bot/medbot.dm +++ b/code/modules/mob/living/bot/medbot.dm @@ -333,7 +333,7 @@ qdel(src) /obj/item/weapon/storage/firstaid/attackby(var/obj/item/organ/external/S, mob/user as mob) - if (!istype(S, /obj/item/organ/external/arm) || !(S.robotic == ORGAN_ROBOT)) + if (!istype(S, /obj/item/organ/external/arm) || S.robotic != ORGAN_ROBOT) ..() return diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index facc1ac438..a8d056c316 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1277,9 +1277,12 @@ if(!affecting) . = 0 fail_msg = "They are missing that limb." - else if (affecting.robotic >= ORGAN_ROBOT) + else if (affecting.robotic == ORGAN_ROBOT) . = 0 fail_msg = "That limb is robotic." + else if (affecting.robotic >= ORGAN_LIFELIKE) + . = 0 + fail_msg = "Your needle refuses to penetrate more than a short distance..." else switch(target_zone) if(BP_HEAD) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 1befd9579b..db20f7f744 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -341,7 +341,7 @@ emp_act /mob/living/carbon/human/emag_act(var/remaining_charges, mob/user, var/emag_source) var/obj/item/organ/external/affecting = get_organ(user.zone_sel.selecting) - if(!affecting || !(affecting.status & ORGAN_ROBOT)) + if(!affecting || !(affecting.robotic >= ORGAN_ROBOT)) user << "That limb isn't robotic." return -1 if(affecting.sabotaged) diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index 51774ecfac..1db7da0867 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -190,7 +190,7 @@ var/mob/living/carbon/human/H = mob var/organ = pick(list("heart","kidney","liver", "lungs")) var/obj/item/organ/internal/O = H.organs_by_name[organ] - if (!(O.robotic = ORGAN_ROBOT)) + if (O.robotic != ORGAN_ROBOT) O.damage += (5*multiplier) H << "You feel a cramp in your guts." @@ -370,7 +370,7 @@ var/mob/living/carbon/human/H = mob var/obj/item/organ/internal/O = H.organs_by_name for (var/organ in H.organs_by_name) - if (!(O.robotic = ORGAN_ROBOT)) + if (O.robotic != ORGAN_ROBOT) O.rejecting = 0