Merge pull request #3255 from VOREStation/aro-robocheck

Fix incorrect robolimb checks
This commit is contained in:
Aronai Sieyes
2018-03-16 20:34:10 -04:00
committed by GitHub
7 changed files with 13 additions and 10 deletions

View File

@@ -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:"

View File

@@ -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("<span class='danger'>\The [user] shoves \the [victim][E ? "'s [E.name]" : ""] into \the [src]!</span>")
@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -1291,9 +1291,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)

View File

@@ -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 << "<span class='warning'>That limb isn't robotic.</span>"
return -1
if(affecting.sabotaged)

View File

@@ -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 << "<span class='notice'>You feel a cramp in your guts.</span>"
@@ -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